Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File associations in vscode

Does anyone know is it possible to set file associations in vscode?

I'm working with .pt files which contain html and was looking to set the editor, so that when it opens these files it automatically set the type to html.

like image 634
Keith Darragh Avatar asked May 21 '15 09:05

Keith Darragh


1 Answers

Currently changing a mode is not persisted on a file. For the future we will look into an option to allow the user to associate file extensions to modes and persist this setting.

Update for our VS Code 1.0 release:

You can now persist a file to language association in settings. The newly introduced files.associations setting can be used like this:

files.associations: {
   "*.php4": "php",
   "*.php3": "php"
}
like image 193
Benjamin Pasero Avatar answered Jan 04 '23 04:01

Benjamin Pasero