omid
omid

Reputation: 1194

Change language mode for multiple files

apologies if this is a silly question, but does anyone know if it's possible to change the language mode for a bunch of files at once? I'm working on a project with hundreds of Jinja templates, but as all the files are .html I have to manually switch the language mode for each one to get the correct syntax highlighting.

Ideally I'd just like to select them all in the file sidebar and update the language settings for each file, but I imagine pretty much any solution would be quicker than the current method!

Cheers! :)

Upvotes: 2

Views: 1344

Answers (1)

rioV8
rioV8

Reputation: 28663

VSC does not store the languageId of the file, it uses the file extension that can be overruled by a setting.

Add this to your project settings in .vscode/settings.json

  "files.associations": {
    "*.html": "jinja"
  }

Upvotes: 3

Related Questions