compulim / vscode-closetag

Quickly close last opened HTML/XML tag in Visual Studio Code
14 stars 5 forks source link

Option to position the cursor before or after the tag #3

Closed Yann-Trevin closed 8 years ago

Yann-Trevin commented 8 years ago

Nice work.

After invoking the command, the cursor is currently placed right "after" the closing element. That could be interesting to have a option for placing it "before" as well.

That would enable to following use case:

  1. I type my opening element (e.g <element>)
  2. I invoke the command with Alt+. to auto-close it (e.g <element></element>)
  3. I type immediately the inner content of the element without having to move the cursor (e.g. <element>content</element>)
compulim commented 8 years ago

Good call.

Maybe another different command that do the append without moving the cursor.

Will do, stay tuned.

compulim commented 8 years ago

Your wish is my command.

The fix is in 5215a3924a66c3d790338aa361e2cfd909e5930d and released as 0.0.9.

Yann-Trevin commented 8 years ago

Awesome!