In this section, we will explore the layout of VS Code. We will focus on shortcuts for working with files, text manipulation, and optimizing your development layout.
-
The Interface
- What We'll Cover
- Explore VS Code layout
- Discuss Activity Bar, Side Bar, Status Bar, Panels, and MiniMap
- Resources
- What We'll Cover
-
Optimizing Your Development Layout
- What We'll Cover
- Shortcuts for opening/closing panels
- Zen Mode for optimal development
- the command palette
- Resources
- Pro Tips
ctrlCmd + Shift + B
- toggle side barctrlCmd + Shift + D
- toggle debug panelctrlCmd + Shift + E
- toggle file explorer panelctrlCmd + Shift + X
- toggle extensions panelctrlCmd + Shift + G
- toggle git panelctrlCmd + Shift + F
- toggle search panelctrlCmd + Shift + P
- open Command PalettectrlCmd + Shift + K
– delete linectrlCmd + Shift + \
- jump to matching bracketCommand + Ctrl + Shift + Left/Right
(Mac) |Shift + Alt + Left/Right
(Windows) - expand/shrink selectionctrlCmd K Z
– toggle Zen Mode
- What We'll Cover
-
Split Editor and Grid Tab System
- What We'll Cover
- Opening multiple files side by side
- Displaying multiple files in Grid Tab system
- Resources
- Pro Tips
- Working on a monitor can provide extra editing space and improve efficiency!
- Drag files around to display side by side or in grid
ctrlCmd + number
- switch to Nth editor groupctrlCmd + \
- move file to split editor
- What We'll Cover
-
Opening and Working with Files
- What we’ll cover
- Creating files in the Explorer and via Shortcuts
- Tabbing through open files
- Creating Multiple Workspaces
- Shortcut for quickly opening files
- Resources
- Pro Tips
Ctrl + Tab
(Mac) |Alt + Tab
(Windows) – tab to next fileCtrl + Shift + Tab
(Mac) |Alt + Shift + Tab
(Windows) - tab to previous filectrlCmd + P
to quick open filesctrlCmd + N
to create new filectrlCmd + W
to close filectrlCmd + S
to save file- Creating a file and defining the directory path will create any missing directories automatically
- What we’ll cover
-
Navigating and Manipulating Text
- What we’ll cover
- Shortcuts for navigating, copying, pasting, and moving text
- Multiline edits with multiple cursors
- Resources
- Pro Tips
- Speed up key repeat and key delay to fly through code
- To perform a shortcut on an entire line, you do not need to select the line itself. Most shortcuts will be applied to the entire line by default.
Option + Arrow Left/Right
– Navigate word by wordCmd + Left/Right
(Mac) |Home/End
(Windows) – Go to beginning/end of lineCmd + Up/Down
(Mac) |Ctrl + Home/End
(Windows) – Go to beginning/end of filectrlCmd + D
– select current wordctrlCmd + Shift +Ctrl + Left/Right
- expand/shrink selectionAlt + Up/Down
- move lineShift + Alt + Up/Down
– Duplicate linectrlCmd + Option + Shift + Arrow Up/Down
- Multiple Cursors]
- What we’ll cover
-
Search and Replace Like a Ninja
- What we’ll cover
- Search and replace within a file
- Search and replace within a workspace
- Replace one at a time or all at once
- Resources
- Pro Tips
- Selecting a piece of text and then searching (and replacing) will auto populate the search field with the copied text
ctrlCmd + F
– Search in current fileAlt + Cmd + F
(Mac) |Ctrl + H
(Windows) – Search and replace in current filectrlCmd + Shift + F
– Search in workspacectrlCmd + Shift + H
– Search and replace in workspacectrlCmd + Alt + Enter
– replace allctrlCmd + Shift + L
– select all occurrences of current selectionctrlCmd + F2
– select all occurrences of current selection
- What we’ll cover
-
Intellisense
-
What we’ll cover
- What intellisense is and how it can increase efficiency and speed of development
- Explore built in intellisense functionality in VS Code
-
Resources
-
Pro Tips
- Thanks to TypeScript typings, VS Code can provide intellisense for basic JavaScript objects like DOM elements with types parameters, valid parameter inputs options, etc.
-
-
Emmet
- What we’ll cover
- What Emmet is and how it can speed up HTML and CSS development
- Basic Emmet snippets
- Resources
- Pro Tips
!
– Emmet shortcut to generate HTML5 boilerplate
- What we’ll cover