DEV Community

Cover image for Common Vscode Shortcuts
Abayomi Ogunnusi
Abayomi Ogunnusi

Posted on • Edited on

Common Vscode Shortcuts

Have you ever been in the middle of a tutorial and wondered how the tutor copied and pasted lines of code in just one click? đź‘‹
Enter fullscreen mode Exit fullscreen mode

Shortcut: the time saver

As a developer, our focus should be on the applications and solutions we want to provide. In a bid to achieve this, it is pertinent to remove every hurdle that slows our performance while coding. A good example is finding the tilde key for as low as 4 seconds. This process when cumulated can hamper productivity and wear us down quickly. Time is precious, we want to work smart and waste it wisely👨‍💻.

Our focus today will be on Visual studio Code

vscode

Visual Studio Shortcuts_

Accessing Pallete and settings

ctrl + shift + p open the command palette
ctrl + , Accessing global settings
ctrl + w to close a tab
Enter fullscreen mode Exit fullscreen mode

Sidebar, terminal and split screens

ctrl + b to open and close sidebar
ctrl + shift + E to focus on the sidebar
ctrl + ` to open and close terminal
Hold down ctrl + enter to split-screen
Enter fullscreen mode Exit fullscreen mode

Window navigation

ctrl + shift + N to open a new window
ctrl + shift + W to close entire window
Enter fullscreen mode Exit fullscreen mode

Files and Folders

open a folder ctrl + down
close a folder Ctrl + up
to open a file ctrl + down
ctrl + n to create a new file
ctrl + o to open files in explorer
Enter fullscreen mode Exit fullscreen mode

Switch tabs

ctrl + tab to switch tabs and press tab to choose
ctrl + shift + t to open recently closed tabs
Enter fullscreen mode Exit fullscreen mode

Zoom

ctrl + or - to zoom in and out
Enter fullscreen mode Exit fullscreen mode

Cursor navigations

ctrl + left arrow or right arrow to jump to the front or end of the line 
alt + left arrow or right arrow to move the cursor by words
ctrl + down or up to go to the end and beginning of the line
alt + up arrow or down arrow to move lines up and down
Enter fullscreen mode Exit fullscreen mode

Copy, cut and paste

shift + alt + down to copy a line down
shift + alt + up to copy a lineup
shift + ctrl + k to cut a line
Enter fullscreen mode Exit fullscreen mode

Matching brackets

shift + ctrl + / to jump to matching bracket
Enter fullscreen mode Exit fullscreen mode

Comments

ctrl + / comment
shift + alt + a (for multi-line comment)
Enter fullscreen mode Exit fullscreen mode

Selecting next matching words

ctrl + d to select next match
alt + click at the different lines insert multiple cursors
Enter fullscreen mode Exit fullscreen mode

Action point:

- [x] Don't aspire to cram the shortcuts at one go (this is practically impossible).
- [x] Instead, have snippets of your favorite vscode shortcuts saved in your notepads on your PC or phones.
- [x] Practice conscious learning and refer to the snippets when you are stuck or trying to trigger an action the long way.
Enter fullscreen mode Exit fullscreen mode

Drop your favorite shortcut below

đź“« How to reach me abayomiogunnusi@gmail.com

Top comments (0)