Reputation: 75
I'm trying to implement the solution I found here: https://stackoverflow.com/questions/38737683/how-to-change-the-default-syntax-for-new-files-in-sublime-text-3
But what I am unable to do is apply the specific syntax I need to use. I need the Bash Shell syntax highlighting, which sublime refers to as Shell-Unix-Generic. However when I adjust this setting outlined in the link above to "Shell-Unix-Generic" it doesn't work. I've also tried "Shell-Unix-Generic/Shell-Unix-Generic"
Any ideas? The goal is to have every new file open with Shell syntax highlighting, instead of the default plain text.
Upvotes: 1
Views: 674
Reputation: 16065
The correct path to use for ApplySyntax for the bash shell syntax highlighting is ShellScript/Shell-Unix-Generic
, as per the Package path:
https://github.com/sublimehq/Packages/blob/master/ShellScript/Shell-Unix-Generic.sublime-syntax
In Sublime Text, a package can have multiple syntax definitions, and just knowing the name of the definition isn't enough. Essentially, you need to know the path to the package file, although ApplySyntax seems to not require the Packages/
folder root or the .sublime-syntax
prefix. See http://facelessuser.github.io/ApplySyntax/usage/#syntax for more information.
Upvotes: 1