I am working an some library headers that do not have a .h
or .hpp
extension. Visual Studio does not give me syntax highlighting and other features for those files. Is there any way to turn them on?
After opening login.sh file in vim editor, press ESC key and type ':syntax on' to enable syntax highlighting. The file will look like the following image if syntax highlighting is on. Press ESC key and type, “syntax off” to disable syntax highlighting.
Syntax highlighting determines the color and style of source code displayed in the Visual Studio Code editor. It is responsible for colorizing keywords like if or for in JavaScript differently than strings and comments and variable names.
You can enable / disable semantic highlighting in the VS Code settings. Press F1 to open the command window, and then enter "Open Settings (UI)". Search "semantic" to find the Editor>Semantic Highlighting item . Set the value to true to enable semantic highlighting; otherwise set it to false .
Found it. In the German version of Visual Studio, the option can be found under "Extras / Optionen /Text-Editor / Dateierweiterung / [x] Dateien ohne Erweiterung zuordnen zu: Microsoft Visual C++".
In Visual Studio 2015:
Tools -> Options -> Text Editor -> File Extension:
Map extensionless files to: < Microsoft Visual C++ >
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