Search code examples
visual-studio-codekeyboard-shortcutskey-bindingsemmet

Emmet keyboard shortcuts not working in vscode


I'm not talking about the abreviations (which works fine); but rather keyboard shortcuts.

Like this one for instance, Ctrl+k is supposed to remove a tag(opening and closing) and re-arrange the inner HTML's indentation.

This is just one example, but most shortcust found in emmet's page, doesnt work on vscode, why is that ? how can I fix it ?


Solution

  • If you look at the Keyboard Shortcuts page and search for emmet you will see many emmet commands unbound to a keybinding. Including

    editor.emmet.action.removeTag

    [I think there are just too many emmet commands for vscode to have devoted keybindings to them when most people wouldn't use them.]

    If you hover over any command and click on the + sign to its left vscode will open an input box where you can enter your desired shortcut keybinding.

    I wouldn't recommend Ctrl+K as that is used as a part of a lot of default keybindings in vscode.

    emmet shortcut demo