I have some .txt
files in a subfolder of my project which contain SQL
code. I want SQL
syntax highlighting so I added this to my workspace folder settings:
{
"files.associations": {
"**/somefolder/*.txt": "sql"
}
}
This works when there are the two stars in front of the folder name. But somefolder
actually is a folder direct under my project's root.
Why can I not write the glob like somefolder/**/*.txt
?
Just use Ctrl and Shift to select multiple files and folders, then right-click and choose Combine Files. If you select a folder, all matching files in subfolders will also be included. The result will be a single file containing the content of all the selected files.
The code formatting is available in Visual Studio Code through the following shortcuts: On Windows Shift + Alt + F. On Mac Shift + Option + F. On Linux Ctrl + Shift + I.
Seems like this new version of VSCode requires you to use the **
at the start regardless:
{
"files.associations": {
"**/somefolder/**/*.txt": "sql"
}
}
That should work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With