Select multiple lines in VS Code

How to select multiple lines to edit at once within VS Code

If you want to make edits to multiple places in a file and Find and Replace isn’t an option, you might want to make use of VS Code’s ability to select multiple locations at once.

By holding down the Option / Alt key you can use the mouse cursor to select different places you want to set a cursor to. You will notice that multiple cursors appear on screen at once and will respond to keyboard commands, so using the arrow keys will move all cursors in the same direction etc.

A screenshot of this post in a text editor showing two text cursors, one after the word Screen and one after the word Direction.
An example from this very post

If all your edits are happening in the same column of text, but across multiple lines, you can also hold Command + Option / Alt and use the Up or Down keys to add a new text cursor above or below where you are.

Recent posts View all

RubyFreelancing

Belfast Rails Supper Club

I recently attended the Belfast Rails Supper Club here are my thoughts and some more information about this meet up.

SEO

Google follows URLs in text

Today I learned that Google follows URLs even when they are plain text