vetur icon indicating copy to clipboard operation
vetur copied to clipboard

Have Auto Close / Rename Tag for html section

Open octref opened this issue 8 years ago • 18 comments

https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag

octref avatar Nov 29 '17 21:11 octref

HTML tags are auto closed in HTML files but not in Vue files.

w1ndy avatar Dec 06 '17 05:12 w1ndy

Any updates on this?

omidb avatar Mar 14 '19 23:03 omidb

I'll make it work similarly to the HTML support: https://github.com/microsoft/vscode/issues/47069#issuecomment-557644701

octref avatar Nov 26 '19 22:11 octref

Any news on this?

thebrownfox avatar Feb 12 '20 09:02 thebrownfox

@octref Is there a WIP branch to handle autoClosingTags or can one of us go ahead and contribute a PR?

chances avatar Mar 10 '20 20:03 chances

will this feature be available soon?

ylc395 avatar Apr 22 '20 16:04 ylc395

I'm new to Vue and decided to use the recommended Vetur extension with VS Code. It started to feel strange that my tags were not auto-closing, which is the standard behavior in .html files. Will this feature come soon?

Alexn117 avatar Sep 25 '20 03:09 Alexn117

If you are interested in making this happen, PR / bug bounty / sponsorship are all welcome.

octref avatar Sep 25 '20 08:09 octref

In the interim you can use the packages mentioned in the OP. For those who were using Auto Rename Tag, but stopped because it was constantly crashing VS Code's extension host, the extension was overhauled back in April and is now safe to use again.

icleolion avatar Sep 25 '20 08:09 icleolion

microsoft/language-server-protocol#1092 👀

EDIT: it's merged now, and is a part of lsp 3.16

EDIT2: It's renamed from onTypeRename to LinkedEditing now

sethidden avatar Sep 27 '20 11:09 sethidden

With editor.renameOnType, will this plugin be able to utilize a similar mechanism for renaming tags?

vegerot avatar Nov 24 '20 19:11 vegerot

@vegerot the editor.renameOnType works in SFCs so no need to use additional plugin for this feature

thebrownfox avatar Nov 25 '20 02:11 thebrownfox

I had apparently the plugin installed somehow and it was why it worked for me. The editor.renameOnType got deprecated and is now under editor.linkedEditing.

thebrownfox avatar Dec 29 '20 18:12 thebrownfox

Any updates on this?

Keavon avatar Feb 17 '21 00:02 Keavon

Can vetur at least stop controlling the autorename behaviour so that we can enable

"editor.linkedEditing": true

Lucien950 avatar May 04 '21 15:05 Lucien950

"editor.linkedEditing": true forces auto rename only in html files. Not woking in vue files. Can this be fixed?

CMQNordic avatar Jan 17 '22 02:01 CMQNordic

for renaming, F2 works well. ( I'm using volar )

daolanfler avatar Feb 03 '23 03:02 daolanfler

Any updates?

CodeCubeNeo avatar Aug 19 '23 11:08 CodeCubeNeo