I think the subject says it all. I create files with the .conf extension that are actually bash scripts. Sublime does not highlight them correctly. Can it? I’m aware I can do this by going to View >> Syntax >> Shell Script but I’m looking for a way for Sublime to always load these as bash scripts. Thanks
How do I tell sublime to treat '.conf' files as if they were bash scripts?
wbond
#2
You can accomplish this by using the submenu View > Syntax > Open all with current extension as….
2 Likes
wealthychef
#3
That worked, thanks! Just out of curiosity, I looked at Preferences >> Settings – More >> Syntax Specific – User and it now contains this:
{
“extensions”:
[
“conf”
]
}
I’m wondering how it knows “conf” is “bash”…
0 Likes
wbond
#4
The name of that settings file will be Shell-Unix-Generic.sublime-settings
, where Shell-Unix-Generic.sublime-syntax
is the name of the syntax file for Shell Script (Bash)
.
0 Likes