且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

自动关闭html标记和jsp,php,记事本++中的asp标记以及脚本末尾的分号

更新时间:2023-12-05 21:05:58

关于自动关闭html标记,对于我来说,只有html作为语言并没有办法。



(这个答案是不完整的,但是对于给出图片的评论来说太大了。)




更改自动完成偏好设置,如下所示:


  • 设置 首选项






  • 自动完成标签> 自动插入部分> html / xml关闭标记





我使用Notepad ++ v6.5.2


I use and I like it

I specifically want it to do this :

  1. Close automatically HTML tags. (eg. </div>)
  2. Close tags after starting with proper indention for .jsp, .asp, .php files. (eg.<% %>, <?php ?>)
  3. Put a semicolon at the line end by default (whenever I start a new line inside <?php ?>)

For (1), it is really frustrating for me, when I want to write HTML tags in php files. I upgraded to 6.5.1, and tried the TextFX, but it works only with files which have the extension .html or .htm

Could someone please guide me in achieving these features?

Regarding auto-closing html tags, for me only having html as the language didn't do the trick.

(This answer is incomplete, but is too large for a comment given the images.)


Changing the auto-complete preferences, as below, worked:

  • Settings > Preferences

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

I use Notepad++ v6.5.2