Before the confusion begins, this question is about Code, the new lightweight Visual Studio Editor. You can get it from here: https://code.visualstudio.com/
I have a textfile (.txt) with CSS in it and want to get syntax hightlighting. You can open the command palette with ctrl+shift+p. But there you can not set syntax like in Sublime.
Is there any other way to get the CSS coloring in from my textfile?
To change the text and syntax colors in visual studio code follow the steps given below: Open VS Code editor to change the syntax colors. Go to Settings, which is on the bottom left corner of the VS Code window. In the search field type JSON, and click on the 'Edit in settings.
Press Ctrl+Shift+P to bring up the Command Palette then start typing "display" to filter and display the Configure Display Language command. Press Enter and a list of installed languages by locale is displayed, with the current locale highlighted.
You can change (or apply) syntax highlighting for the active file by using the View as language drop down in the Formatting group of the Coding tab, or the syntax highlighting selector in the Status bar.
VS Code uses TextMate grammars as the syntax tokenization engine.
In the very right bottom corner, left to the smiley there was the icon saying "Plain Text". When you click it, the menu with all languages appears where you can choose your desired language.
Press Ctrl + KM and then type in (or click) the language you want.
Alternatively, to access it from the command palette, look for "Change Language Mode" as seen below:
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