Auto close of html tags and jsp, php, asp tags in notepad++ and a semicolon at the end of the line written of scriptlets

后端 未结 3 1206
执念已碎
执念已碎 2020-12-24 12:03

I use notepad++ and I like it

I specifically want it to do this :

  1. Close automatically HTML tags. (eg.
)
  • Close tags af
  • 3条回答
    •  我在风中等你
      2020-12-24 12:39

      If you are editing a PHP file and want it to auto-complete the HTML tags, in addition to turning on "Auto-insert HTML/XML tags" in Preferences, you have to change the programming language to HTML while editing that file.

      In Notepad++, go to the Language menu, and find HTML and click on it.

      This will set the file's language to HTML so that auto-complete tags will work in a PHP file.

      Even with the language set to HTML, it still highlights anything in tags as PHP code, and it does not affect auto-closing of brackets, if you have that enabled.

      You must have Auto-Insert html/xml close tags on, as mentioned in Noha's answer.

      • Settings > Preferences
      • Auto-Completion tab > Auto-Insert section > html/xml close tag

    提交回复
    热议问题