March 14, 2023
min read

6 Great VS Code Keyboard Shortcuts

Ashutosh Mishra
Looking for a job?
Create a free profile and automatically get matched with companies that meet your requirements.
Get job offers

VS Code Shortcuts

Visual Studio Code is a leading code editor that has been widely adopted by software developers worldwide. Developed by Microsoft, this IDE supports cross-platform coding on Linux, Mac, and Windows, making it an excellent choice for modern-day developers. However, with so many features and options, it can be challenging to keep up with all the latest tricks and techniques to use the editor efficiently.

In this regard, we have compiled a list of six keyboard shortcuts and handy tricks that can help you maximise your productivity and make the most of Visual Studio Code. So, let's jump in and explore the top Visual Studio Code tips to help you code more efficiently.

1. Command Palette

Command Palette is the go-to place to find all the functionality and shortcuts you have in VS Code. It gives you access to all the operations you have and needs to work productively. To open the Command Palette, you have to type [Ctrl + Shift + P].

2. Search Files

VS Code allows you to search for a particular text inside your current files and also in all the files in the current directory. Type [Ctrl + F] to search in the current file and [Ctrl + Shift + F] to search in all files.

3. Multiple Cursors

Multiple Cursors allow you to make edits in multiple lines simultaneously. It is very useful on occasions when you to similar changes across lines.

To create multiple cursors, type [Ctrl + Alt + Up/Down(keyboard button)].

4. Delete the Line

Delete the Line allows you to delete a whole line at once instead of deleting it letter by letter or word by word. To delete a line in VS Code, you have to go to the line you wish to delete and type [Ctrl + Shift + K].

5. Copy Line Up/Down

This shortcut allows you to copy a line, up or down in VS Code. Go to the line you want to copy and type Shift + Alt + Up/Down(keyboard button) to create a copy of the current line up or down the current line.

6. Preview Markdown

VS Code not only allows you to write in Markdown but also allows you to preview the file. To do so, open the Markdown preview window by typing [Ctrl + Shift + V].

VS Code Shortcut Commands for Mac

  1. Command Palette: Cmd + Shift + P
  2. Search Files: Cmd + Shift + F
  3. Multiple Cursors: Cmd + Opt + ↓ / ↑
  4. Delete the line: Cmd + Shift + K
  5. Copy Line Up/Down: Opt + Shift + ↓ / ↑
  6. Preview Markdown: Cmd + Shift + V


6 Great VS Code Keyboard Shortcuts

March 14, 2023
min read

Subscribe to DevDigest

Get a weekly, curated and easy to digest email with everything that matters in the developer world.

Learn more

120,000+ subscribers. No spam.