PDL PDL - 1 year ago 102
Bash Question

Sublime 3 - Add specific plugin syntax highlight for no file type

I'm trying to implement the solution I found here:
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.

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download