How to turn on Visual Studio 2010 .css Intellisense on .less file

前端 未结 9 967
遇见更好的自我
遇见更好的自我 2020-12-13 01:30

Does anyone know how to enable css intellisense in a non .css file extension? I have a .less file that is basically a .css file but visual studio will not use .css intellis

9条回答
  •  执念已碎
    2020-12-13 02:09

    Visual Studio allows you to map custom extensions to the different editors by going to Tools->Options->Text Editor->File Extension. You simply supply the custom extension and select the editor you wish to associate it with. Sadly, the Visual Studio team has seemed to overlook the CSS editor in the list of editors.

    A possible work around is to associate the extension with the Html Editor and then type in the bottom of the file. This will give you CSS intellisense support between the sets of tags. You can then remove the HTML tags and the file association when your done editing.

提交回复
热议问题