Sublime 2, how to auto close HTML tags and place c

2019-06-16 20:54发布

问题:

I'm trying to figure out how to get Sublime 2 to create the following behavior:

Type

<strong

then, upon typing >

Sublime will then immediately print

<strong></strong>

And then your cursor will be placed inside of the tag.

I feel like it did this automatically not more than a few months ago, or maybe I was just hallucinating, or was using a different bundle... but regardless, is there a setting or script I can build that will perform this tag behavior that Aptana gets 100% right but for some reason no other text editor can catch on to?

回答1:

  1. CTRL + SHIFT + W (in Mac) / ALT + SHIFT + W (in Windows)
  2. type "strong"
  3. TAB


回答2:

To get auto-complete of HTML in sublime text 2 I had follow this step :-

open sublime -> view -> syntax -> HTML

I hope this will provide you auto-complete of sublime.