Skip to content

Sublime: Automatically apply bioSyntax.theme when opening bio-format. #7

Closed

Description

@ababaian

It would be nice to not force users to use one global theme in Sublime when installing/using bioSyntax but use the syntax-settings to change to the bioSyntax.tmTheme for only those formats.

See: Commit

I've gotten this working on Linux, we'll need to test it on other systems before deployment. The installer will also have to be updated for this.

  1. Every <syntax>.sublime-syntax file has an associated <syntax>.sublime-settings file which applies settings for that syntax. They both need to be stored in sublime's Packages/User/ folder.

Note:
On Linux the dir is: ~/.config/sublime-text-3/Packages/User

  1. The bioSyntax.tmTheme file can be stored here too Packages/User/ and the settings files refer to this file.

  2. I've added a $bioSyntax/dev/scripts/set_sublime-settings.sh script which when run in sublime/ will make/update the setting files for every syntax.

Note:
This set-up also means that the Color Scheme - bioSyntax.sublime-package file is not needed since it will be replaced by bioSyntax.tmTheme
In terms of installation this is beneficial because this means we don't have to access the sublime installation folder (don't require superuser privledges) and all of bioSyntax can be installed into the user configuration folder. Should making implementation into Package Control much smoother too.

Checklist for implementation

  • Test the installer works for Mac
  • Test the installer works for Linux
  • Test the installer works for Windows
  • Update installer script for this set-up
  • Update manual installation instructions
  • Test installation via PackageControl works (once online)

Activity

  1. ababaian commented on Dec 31, 2017

    @ababaian
    MemberAuthor

    Since this and the submodules are quite big changes; all work on implementing the changes above for sublime should be done on the submodules2 branch of bioSyntax.

  2. ababaian commented on Jan 16, 2018

    @ababaian
    MemberAuthor

    Bump @alyeffy, would you be able to test the installer on Windows/Mac. I've updated it a bit over the holiday.

  3. alyeffy commented on Jan 16, 2018

    @alyeffy
    Member

    Right. I'll get on it!

  4. alyeffy commented on Jan 19, 2018

    @alyeffy
    Member

    @ababaian So the installer on Mac works for less and sublime. It's not working for vim right now because of a permission error, which is weird because this was never an issue with vim previously. Even after adding sudo before all the cp's and chmod's, the permission error is still there. I'll figure it out and test it on Windows soon.

    It's also worth mentioning (because I didn't see it in the installation instructions on the site) that if anyone is cloning the biosyntax repo (or already has a local copy of it before the submodules were added), they need to also run git submodule init and git submodule update since the vim and sublime files are now in submodules rather than folders. Otherwise the required files for installation of vim/sublime won't be in their respective folders in the local bioSyntax repository and the installer script won't work for vim/sublime.

  5. ababaian commented on Jan 19, 2018

    @ababaian
    MemberAuthor

    Heya, you're up late too : ).

    That's weird. No permission errors on linux. Try throwing in a bunch of descriptive echo commands for debugging to see when the error is being thrown (i.e echo copying over $theme...), the vim folder shouldn't have any permission restrictions to begin with since it's in ~/.

    Adding a very short Cloning / Forking bioSyntax to the install page would be a good idea to explain exactly that and provide the commands. There's no reason to clone the repo for installing it since the installer zip is a separate file in the release and contains all the vim and sublime folders. I can do this.

  6. ababaian commented on Jan 23, 2018

    @ababaian
    MemberAuthor

    Note to self: Downloading sublime package off of package control doesn't work at the moment. In the sublime-settings files need to change Packages/User/bioSyntax.tmTheme to Packages/bioSyntax/bioSyntax.tmTheme

    This means that the manual installer also needs to be changed everywhere to install bioSyntax at ~/.config/sublime-text-3/Packages/bioSyntax/* instead of user/* as it is now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions