VSCode Shortcuts - SEIR-59/course-wiki GitHub Wiki
Keyboard Symbols | Name |
---|---|
β | command |
β | control |
β₯ | option/alt |
β§ | shift |
Overview of the VS Code Interface
- Note: all the shortcuts shown below are for macOS.
- Note: Shortcuts can vary based on your current Linux distributon.
- Pull down menu:
Code
->Preferences
->Keyboard Shortcuts
- You can run VS Code from the terminal by typing
code
after adding it to your PATH. - To add
code
to the PATH, open the Command Palette (β§βP) and typeshell command
to find the Shell Command:Install 'code' command in PATH
command.
- Restart the terminal for the new
$PATH
value to take effect. You'll be able to typecode .
in any folder to start editing files in that folder orcode filename.txt
to open that file in VS Code.
βS
-
βZ
- undo typing -
β§βZ
- redo typing
-
β+
- increase -
β-
- decrease
- highlight the text you want to wrap in quotes
- press
'
or"
- Note: you can use the same process to wrap text in parenthesis, curly braces, and square brackets!
- start with a file that has an
.html
extension - type
! + tab
βF
- Close by pressing
esc
ββ§F
- Close by pressing
esc
-
You can open as many editors as you like side by side vertically and horizontally. If you already have one editor open, there are multiple ways of opening another editor to the side of the existing one:
-
β\
to split the active editor into two. -
Open to the Side (
βEnter
) from the Explorer context menu on a file. -
Click the Split Editor button in the upper right of an editor. (it looks like a square split into two)
-
Drag and drop a file to any side of the editor region.
-
Ctrl+Enter
(macOS:Cmd+Enter
) in the Quick Open (βP
) file list
- Highlight the code block you want to comment out, then
β/
- Press
β/
again to uncomment the code. - Note: as long as you have saved your file with the proper extension:
.html
,.css
,.js
(etc.) the correct comment characters will be used for that language
- highlight the block of code you want
-
β]
- Move code to the right (alternativetab
) -
β[
- Move code to the left (alternativeβ§tab
)
-
β₯ Up
(Up - up arrow) -
β₯ Down
(Down - down arrow )
- Note: some indentation may be lost in some cases
- Highlight text to be replaced
-
βD
- to highlight next instance (as many as you'd like ) -
β§βL
- to highlight all isntances -
Screenshot Highlight One Instance of Text
-
Screenshot Highlight Subsequent Text `βD`
-
Start Typing (See multiple blinking cursors)
-
Click outside of selected area