VSCode Shortcuts

This guide will show you all the common VSCode shortcuts that I use to accelerate my programming speed into hyper-space!

By Smoljames 💛

VSCode Theme

The theme is use in VSCode is the FreeCodeCamp theme which can be installed via the extensions tab!

open terminal

Windows Mac
ctrl + ` ctrl + `

This command will open up your terminal from within VSCode and automatically cd you into the project directory.

kill terminal

Windows Mac
ctrl + c ctrl + c

This command will kill your current terminal execution, which is handy if you ever get stuck in any infinite or near abouts executions!

Auto Code Format

Windows Mac
alt + shift + f option + shift + f

This command will automatically format your code with indentations and spacing and all that good stuff.

If you don't have an auto-formatter extension installed in VSCode for the programming language you are using, then you will be prompted to install one!

Code Wrap

Windows Mac
alt + z option + z

This command will toggle on and off code wrapping, which determines whether or not your code will overflow the screen, or wrap onto a new line (without breaking any syntax).

Line Swap

Windows Mac
alt + up / down option + up / down

This command will swap the currently selected line, with either the line above or below depending on the arrow key chosen.

Duplicate Line or Selection

Windows Mac
shift + alt + up / down shift + option + up / down

This command will duplicate the currently selected lines of code, and place the duplication either above or below the currently selected code depending on the arrow key chosen.

Multi-Cursor

Windows Mac
alt + cursor select (click) option + cursor select (click)

Create multiple cursors which will allow you to write in multiple places at the same time. This can be super helpful if you are making the same adjustment to numerous lines.

Jump to End of Line

Windows Mac
home / end cmd + left / right

This command will jump your cursor to either the start of end of a line, which can be very convenient when the alternative is often having to click.

Jump to End of Code

Windows Mac
ctrl + home / end cmd + up / down

This command will jump your cursor to either the top of your code body or the very bottom, which can be very convenient when the alternative is often having to click.

Adjacent Select

Windows Mac
shift + left / right / up / down shift + left / right / up / down

Select the character to the immediate side of your current cursor position.

Horizontal Jump Select

Windows Mac
shift + ctrl + home / end shift + cmd + up / down

Select all the text to either the left, or right of your current cursor position.

comment line(s)

Windows Mac
ctrl + / cmd + /

This command will comment out (or uncomment) the currently selected line or lines.


This code was created by Smoljames using the FantaCSS stylesheet.

If you spot a mistake or issue, or have any suggestions, be sure to let me know on the GitHub code for this project!