Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
5 of 6 tasks
ababaian opened this issue Dec 30, 2017 · 6 comments
Closed
5 of 6 tasks
Assignees
Labels

Comments

@ababaian
Copy link
Member

ababaian commented Dec 30, 2017

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)
@ababaian
Copy link
Member Author

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.

@ababaian
Copy link
Member Author

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

@alyeffy
Copy link
Member

alyeffy commented Jan 16, 2018

Right. I'll get on it!

@alyeffy
Copy link
Member

alyeffy commented Jan 19, 2018

@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.

@ababaian
Copy link
Member Author

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.

@ababaian
Copy link
Member Author

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
Labels
Projects
None yet
Development

No branches or pull requests

2 participants