VSCode: Insert Cursor at the Beginning of Every Line

Learn how to insert a cursor at the beginning or end of every line in VSCode to enable mass-edit mode, and save a lot of time!

Insert cursor at the beginning of every selected line:

  • Mac: Cmd + A to select all lines
  • Windows: Ctrl + A to select all lines
  • Alt/Option + Shift + I to insert cursor at the end of every line

As soon as you see the cursor blinking at the end of every line, do the following:

  • Mac: Hold down the Fn button and tab your keyboard’s left arrow key
  • Windows: tab twice on your keyboard’s home button.

Now you can add whatever you need to at the beginning of your lines.

You can also use your mouse to manually select the lines you want to edit, instead of selecting them all with Cmd/Ctrl + A

When you’re done you can disable mass-edit mode by clicking anywhere with your mouse.

Has this been helpful to you?

You can support my work by sharing this article with others, or perhaps buy me a cup of coffee 😊


Share & Discuss on