VSCode not auto completing HTML

后端 未结 13 1890
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-07 19:32

I\'m having trouble with my new installed Visual Studio Code on Windows 7. On Mac the editor automatically closes html tags but on my Win7 not. I assume there must be some o

相关标签:
13条回答
  • 2020-12-07 20:12

    I've encountered same problem on Mac Sierra (10.12.6) with VSCode (1.30.2), while editing an HTML file. According to the vscode documentations https://code.visualstudio.com/docs/languages/html, the intellisense should work out of box.

    Turned out that the "Language Detection" (on the right corner of editor status bar at the bottom of screen) is set to Automatic Detection, and recognized the file as django-html. When manually switched back to plain Html, everything works.

    0 讨论(0)
  • 2020-12-07 20:13

    From the 0.3.0 release notes

    HTML auto closing of tags has now been removed and replaced with smarter IntelliSense on </.

    0 讨论(0)
  • 2020-12-07 20:14

    You could try this extension for VS Code. It has implemented the auto close tag function and would meet with your requirement:

    • Automatically add closing tag when you type in the closing bracket of the opening tag
    • After closing tag is inserted, the cursor is between the opening and closing tag
    0 讨论(0)
  • 2020-12-07 20:14

    Just check the bottom of your vscode and change the language mode to HTML It might have been showing django-html or click ctrl + shift + p to change the language mode Screenshot

    Now click [!] + TAB voila it's done!!!

    0 讨论(0)
  • 2020-12-07 20:15

    Press

    0 讨论(0)
  • 2020-12-07 20:19

    I was suffering from the same problem,then I uninstalled unnecessary extensions from VS Code along with JavaScript (SE) extension and it worked for me.

    0 讨论(0)
提交回复
热议问题