vscode icon indicating copy to clipboard operation
vscode copied to clipboard

[html] Improve auto completion of html closing tags

Open osjn opened this issue 11 years ago • 8 comments

For html closing tags, auto completions will show after typing </, can they show after typing < and needn't type /, and then the cursor is positioned between > and < after auto-completing?

osjn avatar Nov 28 '15 08:11 osjn

Many editors all do like this, such as Komodo Edit.

osjn avatar Nov 28 '15 08:11 osjn

@aeschli Not sure if this is low hanging

alexdima avatar Nov 30 '15 09:11 alexdima

@osjn do you mean to have the closing tag be a higher priority than other tag auto-completions? Enabling this:

  • Type <div>
  • Type <
  • Press enter to auto-complete /div>

Related: https://github.com/Microsoft/vscode/issues/877

Tyriar avatar Dec 04 '15 18:12 Tyriar

@Tyriar not mean that, just the means of providing for auto completion, and the affect after auto completing. As below :

  1. type <div>
  2. type<
  3. needn't press enter, it becomes <div></div>, and the cursor is between > and < Resources : `1. Komodo Edit
  4. Brackets` the key point, just for html tags, needn't select for closing tags, it's a real auto completion.

osjn avatar Dec 05 '15 01:12 osjn

@osjn This Extension would nearly meet with your requirement. It will automatically add closing tag when you type in the closing bracket of the opening tag.

GIF

formulahendry avatar Jul 04 '16 14:07 formulahendry

@formulahendry thank you so much...

osjn avatar Sep 09 '16 02:09 osjn

Not sure when we added that, but closing proposals are shows also right after <. Note they only show up if there are tags to be closed.

aeschli avatar Nov 21 '17 15:11 aeschli

There's a related issue: #38880

aeschli avatar Nov 21 '17 15:11 aeschli