Keyboard shortcuts essential in Visual Studio Code

Author
By Darío Rivera
Posted On in Visual Studio Code

In another article we saw some of the most important settings of Visual Studio code after installation. In this post, we will see a complement which are the most important shortcuts that you should know to better navigate the editor.

Global

Shortcut Description
Ctrl+Shift+P, F1 Access to all commands and shortcuts
Ctrl+, User settings

Side Bar

These shortcuts access the options in the side bar.

Shortcut Description
Ctrl+B Show/Hide side bar
Ctrl+Shift+F Open search panel
Ctrl+Shift+G Open version control system
Ctrl+Shift+G Open run and debug panel
Ctrl+Shift+X Open extensions panel
Ctrl + Shift + X
references in vscode

Text Editing

Shortcut Description
Ctrl+K Ctrl+C Comment/uncomment current line or selection
Ctrl+K Ctrl+U Uncomment current line or selection
Ctrl+/ Comment/uncomment current line or selection
Ctrl+K Ctrl+F Format selection
Ctrl+Shift+K Delete line

Search and Replace

Shortcut Description
Ctrl+F Search for text
Ctrl+H Replace text
Ctrl+F3 Find next occurrence (on a word or selection)
Ctrl+Shift+F3 Find previous occurrence (on a word or selection)

Selection

Shortcut Description
Ctrl+L Select current line
Ctrl+Shift+L Select all occurrences - multicursor (on a word or selection)

Following are some examples of these shortcuts.

Ctrl + Shift + L
references in vscode

Navigation

Shortcut Description
Ctrl+P Go to file
F12 Go to definition (function, class, etc)
Shift+F12 Show references (usages in the whole project)
Ctrl+K F12 Open definition in another panel
Ctrl+Shift+F10 Peek definition

Following are some examples of these shortcuts.

Shift + F12
references in vscode

Ctrl + K F12
definition in new panel

Modes

Shortcut Description
Ctrl+K M Select language (mode)

Acerca de Darío Rivera

Author

Application Architect at Elentra Corp . Quality developer and passionate learner with 10+ years of experience in web technologies. Creator of EasyHttp , an standard way to consume HTTP Clients.

LinkedIn Twitter Instagram

Sólo aquellos que han alcanzado el éxito saben que siempre estuvo a un paso del momento en que pensaron renunciar.