Learn Docker With My Newest Course

Dive into Docker takes you from "What is Docker?" to confidently applying Docker to your own projects. It's packed with best practices and examples. Start Learning Docker →

Insert Multiple Cursors at the Start of Every Line with VSCode

blog/cards/insert-multiple-cursors-at-the-start-of-every-line-with-vscode.jpg

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.

Never Miss a Tip, Trick or Tutorial

Like you, I'm super protective of my inbox, so don't worry about getting spammed. You can expect a few emails per month (at most), and you can 1-click unsubscribe at any time. See what else you'll get too.



Comments