Insert Multiple Cursors at the Start of Every Line with VSCode
Who would have thought, after 22 years of using a keyboard I learned a new trick by multi-tapping the Home key.
The TL;DR is:
- Press
CTRL + A
to select all of the text - Press
SHIFT + ALT + I
to insert multiple cursors at the end of each line - Press
Home
twice to jump to the start of every line
That’s it. There’s no Visual Studio Code extensions needed!
Here’s a demo video:
It’s also worth mentioning that you can do this on a subset of text of your
choosing. It’s controlled by whatever you have selected, so if you only select
3 lines (instead of pressing CTRL + A
), it will insert the cursors at the
start of those 3 lines.
By the way, if you’re wondering which VSCode extensions I use, I did a full write up here.