ChenLee
ChenLee

Reputation: 1499

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

Upvotes: 16

Views: 11067

Answers (3)

Larry Liang
Larry Liang

Reputation: 159

enter image description here

version : 1.64.2 File > Preferences > Settings

Upvotes: 3

codemacabre
codemacabre

Reputation: 1122

.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.

Upvotes: 44

MarcoZen
MarcoZen

Reputation: 1683

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

Upvotes: 2

Related Questions