Reputation: 3128
My Bash scripts do not have any extensions nor shebang line. How can I avoid having to select the syntax highlighter when I open every file for this project?
Upvotes: 2
Views: 451
Reputation: 34128
The files.associations
setting allows matching against arbitrary glob patterns, not just file extensions. For instance, for a Bash script named start
, you could have the following in your workspace's settings.json
:
"files.associations": {
"start": "shellscript"
}
You can also have a comma-separated list of file names between {}
:
"files.associations": {
"{start,stop}": "shellscript"
}
Upvotes: 4