Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does vscode editor support .inc file highlight?

I'm using .inc files in vscode, but I find that vscode does not support .inc files' highlight.Does vscode support inc file syntax highlighting?

enter image description here

like image 513
ChenLee Avatar asked Mar 15 '17 06:03

ChenLee


3 Answers

.inc files are used in multiple languages; what language are you using them in?

You can tell VSCode to apply language-specific syntax highlighting by editing the settings.json (File > Preferences > Settings) by adding the file extension to the highlighting category.

For example, to highlight .inc files as PHP,

{
"files.associations": { "*.inc": "php"}
}  

See this link for more details.

like image 100
codemacabre Avatar answered Nov 17 '22 04:11

codemacabre


enter image description here

version : 1.64.2 File > Preferences > Settings

like image 40
Larry Liang Avatar answered Nov 17 '22 02:11

Larry Liang


2018 Update - Visual Studio Code 1.24.1

Its;

File > Preferences >  Settings

You will get a dual pane as below ;

Default User Settings     || User Settings
"files.associations": {}

Copy that over to the User Settings Pane ( right pane ) and paste at the bottom ( before the closing parentheses );

 ... || User Settings
          "files.associations": {
           "*.inc": "php"
          }
        } // closing parentheses
like image 2
MarcoZen Avatar answered Nov 17 '22 02:11

MarcoZen