OneBite.Dev - Coding blog in a bite size

Select all new line in VS Code (shotcut)

Here is how you can directly select all new line (or end of line) in VS Code text editor

You can directly select all new line in VS Code by:

  1. Put your cursor in the end of line and new line below (by pressing shift + arrow down at end of line)

2. Choose all by pressing

ctrl + shift + l
cmd + shift + l //mac

When is it useful ?

I use it when I want to format things together.
For example I have a raw text, that I want to wrap in double quote.
So I’ll select all the text line and put this quote at the end of line, and pressing cmd+left, to go to first line, then put double quote for the start as well.

How do I select multiple lines of code in VS Code?

cmd + option + arrow down

It wil select all the rows below one by one

How do I select same words in VS Code?

cmd + d

You can press it multiple times, to find all the words, you can then edit the words after selecting all the occurances.