U
U
Underdoggit2018-10-26 12:18:10
HTML
Underdoggit, 2018-10-26 12:18:10

How to wrap content in desired tag in VScode with hotkey?

I recently switched to VScode, before that I was on Sublime, I can’t find a hotkey to wrap content in the right tag. Let's say:

<img src="#" width="220px" height="165" alt="Набор для путешествий">

I want to wrap it in a link, in Sublime it was if I'm not mistaken in Ctr + Shift + G, after which an additional window opened. On vscode, for the life of me, I did not find this hotkey

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Proskurin, 2018-10-26
@Underdoggit

For vscode there is vscode-htmltagwrap

A
Aleksey Solovyev, 2018-10-26
@alsolovyev

  1. Ctrl+Shift+P
    You can add your shortcut like in sb3(file->keyboard shortcuts->keybinding,json):
    [
      {
        "key": "ctrl+shift+g",
        "command":"editor.emmet.action.wrapWithAbbreviation",
        "when": "editorTextFocus && !editorReadonly"
      }
    ]

    Use as in sb3
    Or install plugin:ext install htmltagwrap

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question