Here are some basic shortcuts you should learn for highly productive source code editing.
If there’s one shortcut to speed up your coding it’s mastering multiple selectors.
VS Code supports multiple cursors for fast simultaneous edits. You can add secondary cursors with โฅ+Click
.
You can select multiple selections via a mouse drag by holding down โงโฅ
โD selects the word at the cursor, or the next occurrence of the current selection
You can also add more cursors with โงโL, which will add a selection at each occurrence of the current selected text.
Quickly shrink or expand the current selection. Trigger it with โโงโโ
and โโงโโ
.
You can fold regions of source code using the folding icons on the gutter between line numbers and line start.
These shortcuts will save your wrist some miles:
โฅโ[
folds the innermost uncollapsed region at the cursor.โฅโ]
unfolds the collapsed region at the cursor.โK then โL
folds or unfolds the region at the cursor.โK โ0
folds all regions in the editor.โK โJ
unfolds all regions in the editor.Developer, Designer, UX Zealot. Ember & Tailwind