Search code examples
htmlvisual-studio-codekey-bindings

Add cursor to ending HTML tag shortcut


I want a keybinding which will automatically add a cursor to ending tag for HTML in vscode.

Such that <h3> tag closes with </h3>, If I want to change <h3> to <h4>, I want to change closing tag also by any way to add a cursor at ending tag too.

Please help me, I am new to code in vscode.


Solution

  • You don't need a special keybinding, there is a setting you can enable:

    Editor: Linked Editing

    so that when you click inside one tag, a curor is added to the matching tag.

    (same as "editor.linkedEditing": true, in your settings.json)