Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97327

"vim:filetype" equivalent in vscode

$
0
0

Vim has a nice way of dictating what syntax highlighter shall be used with a specific file (disregarding the file extension by specifying the keyword vim:filetype in the beginning or at the end of the file.)

Is there an equivalent way of suggesting vscode to use a syntax highlighter with a file without paying attention to its file extension?

Example: in vim

# vim:filetype=i3
set $mod Mod4
set $alt Mod1
...

I am not looking for files.associations or the Change Language Mode settings. I want to state the language mapping within the file itself and I understand that probably this is not a builtin feature just hoping an extension can do this

Why I am interested in this? because many of the so-called dotfiles in Linux don't have any special extension and when you open the file in another vscode instance (in another machine) you want the IDE to be intelligent enough to deduce the correct syntax highlighter.


Viewing all articles
Browse latest Browse all 97327

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>