microsoft / vscode-htmltagwrap

Wraps a chunk of HTML code in tags
Other
24 stars 18 forks source link

HTML Wrap selection with tags and adding class adds it to both tags #3

Open aeschli opened 8 years ago

aeschli commented 8 years ago

From @mizujin on April 21, 2016 13:35

Steps to Reproduce:

  1. In an HTML document, make a text selection to wrap and using Alt + W to wrap them with tags
  2. Define the tags and immediately continue with a class statement.
  3. class="" is added to both starting/ending tags.

Copied from original issue: Microsoft/vscode#5607

bgashler1 commented 7 years ago

@aeschli and @bpasero, long time no talk! Hope you are all doing well. I'm working on updating this extension to address some user requests, including this one. Is there a way to address this issue with the current extension API? I don't know how to listen for a whitespace character to turn off the second cursor. I know that the Vim extension can listen for certain keyboard input to change modes, but I heard from Ben a while ago that this wasn't an ideal approach for my extension. Would love your 2 cents on how to address this. Thanks!

aeschli commented 7 years ago

Hi @brad! Great to hear from you! If I understand right, you want to enter template mode, with one or more cursor positions. Check out the TextEditor.insertSnippet API.

brad commented 7 years ago

Hi @aeschli, I think you mean @bgashler1 :smile:

bgashler1 commented 6 years ago

This issue was moved to bgashler1/vscode-htmltagwrap#8