Reputation: 5549
How does one do this:
I found many useful tricks here Multiline editing in VSCode
I know I could use Ctrl+Alt+Shift+Up/Down I know I could just press Shift+Up/Down to and delete the opening li tags together. But the closing li tags are not in the same line of sight.
How does one do what is being shown in the above example.
Upvotes: 3
Views: 9077
Reputation: 1206
You have the entire keyboard shortcut overview directly in VSC Ctrl + K or Ctrl + R or Help menu 'Keyboard Shortcuts Reference'
Upvotes: 1
Reputation: 182641
There is an emmet command that will remove a tag for you: editor.emmet.action.removeTag
. It is currently unbound to any keybinding but you could easily make your own. Here is a demo without binding that command:
<li>
's however you choose [I use Ctrl-Shift-L in the demo - but that selects all of them in the file which may or may not be appropriate for your use case.]editor.emmet.action.removeTag
Pretty easy especially if you give that emmet command a keybinding.
Upvotes: 2
Reputation: 5549
Alright, combining valuable comments by @Nick and @Strelok (thanks guys), Here is the answer:
Step 1: Select <li>
using Shift+Right
Step 2: Press Ctrl+D several times till all the <li>
tags are selected.
Step 3: Press Del
Step 4: Press End
Step 5: Press Backspace to delete closing </li>
tags
Step 6: Press Home
Step 7: Press Left key till you are at the right spot inside <a>
tag. And then type whatever you wish to.
Even though I could deduce this answer only from the comments by @Nick and @Strelok, I decided to post the answer myself because it would be unfair to mark one as answer when both the comments were equally helpful. I am going to keep the question open for now just in case someone comes up with a better way. Perhaps a way to avoid pressing Ctrl+D multiple times.
Upvotes: 3