A collection of exercises focused on using keyboard shortcuts in VSCode.
- Clone the repo
- Run
npm install
The objective isn't to write code; instead, you should use keyboard shortcuts (and an occasional mouse click) to edit the code as efficiently as possible within each exercise file, as specified by each instructions.md
.
- Pick an exercise
- Run the tests for the exercise, e.g.
npm run test 01
- Read the instructions and try to make the tests pass
The exercises are located within separate directories inside src.
Each exercise directory contains three files:
exercise.ts
- The file you should work inexpected.ts
- Provides expected types for each exercise. This will give you an idea of what theexercise
file should look like when you've finishedinstructions.md
- Instructions for how to modify the exercise file
The offical VSCode Key Bindings are far more in-depth. However, these are my most commonly used keyboard shortcuts.
Not all shortcuts are assigned a key binding by default, so I have indicated whether the shortcut is my custom override in the end column.
You can always search for these by using F1
Description | ID | Shortcut | Custom Override |
---|---|---|---|
Show All Commands | workbench.action.showCommands |
F1 | - |
File Search | workbench.action.quickOpenNavigateNextInFilePicker |
Ctrl + P | - |
Go To Symbol | workbench.action.gotoSymbol |
Ctrl + Shift + O | - |
Go To Symbol (Globally) | Ctrl + P, # | - | |
Open Keyboard Shortcuts | workbench.action.openGlobalKeybindings |
Ctrl + K, Ctrl + S | - |
Open Settings | workbench.action.openSettings |
Ctrl + , | - |
Toggle Terminal | workbench.action.terminal.toggleTerminal |
Ctrl + ' | - |
View: Toggle Primary Side Bar Visibility | workbench.action.toggleSidebarVisibility |
Ctrl + B | - |
Show Search | workbench.view.search |
Ctrl + Shift + F | - |
Show Explorer | workbench.view.explorer |
Ctrl + Shift + E | - |
Show Extensions | workbench.view.extensions |
Ctrl + Shift + X | - |
Move Line Up | editor.action.moveLinesUpAction |
Alt + UpArrow | - |
Move Line Down | editor.action.moveLinesDownAction |
Alt + DownArrow | - |
Duplicate Current Line Up | editor.action.copyLinesUpAction |
Shift + Alt + UpArrow | - |
Duplicate Current Line Down | editor.action.copyLinesDownAction |
Shift + Alt + DownArrow | - |
Jump To Start Of Line | cursorHome |
Home | - |
Jump To End Of Line | cursorEnd |
End | - |
Jump To Start Of File | cursorTop |
Ctrl + Home | - |
Jump To End Of File | cursorBottom |
Ctrl + End | - |
Select Everything From Cursor Until Start Of Line | cursorHomeSelect |
Shift + Home | - |
Select Everything From Cursor Until End Of Line | cursorEndSelect |
Shift + End | - |
Select Everything From Cursor Until Start Of File | cursorTopSelect |
Ctrl + Shift + Home | - |
Select Everything From Cursor Until End Of File | cursorBottomSelect |
Ctrl + Shift + End | - |
Add Selection To Next Find Match | editor.action.addSelectionToNextFindMatch |
Ctrl + D | - |
Move Last Selection To Previous Find Match | editor.action.moveSelectionToPreviousFindMatch |
Ctrl + Shift + D | Yes |
Toggle Case Sensitive Search | Alt + C | - | |
Grow Selection Of Everything Inside A Bracket | editor.action.smartSelect.expand |
Shift + Alt + RightArrow | - |
Shrink Selection Of Everything Inside A Bracket | editor.action.smartSelect.shrink |
Shift + Alt + LeftArrow | - |
Change All Occurrences | editor.action.changeAll |
Ctrl + F2 | - |
Rename A Variable/Symbol | editor.action.rename |
Select symbol > F2 | - |
Create Multiple Cursors | Alt + Click anywhere | - | |
Create Multiple Cursors | Click the mouse scroll wheel and drag the mouse anywhere | - | |
Add Cursor Above | editor.action.insertCursorAbove |
Ctrl + Alt + UpArrow | - |
Add Cursor Below | editor.action.insertCursorBelow |
Ctrl + Alt + DownArrow | - |
Add Cursor Above (Grow/Shrink) | cursorColumnSelectUp |
Ctrl + Shift + Alt + UpArrow | - |
Add Cursor Below (Grow/Shrink) | cursorColumnSelectDown |
Ctrl + Shift + Alt + DownArrow | - |
Go To Definition | editor.action.revealDefinition |
F12 | - |
Go To Line/Column | workbench.action.gotoLine |
Ctrl + G | - |
Find All References | references-view.findReferences |
Shift + Alt + F12 | - |
Show Quick Fix Suggestions | problems.action.showQuickFixes |
Ctrl + . | - |
Transform To Upper Case | editor.action.transformToUppercase |
Ctrl + Alt + U | Yes |
Transform To Lower Case | editor.action.transformToLowercase |
Ctrl + Alt + L | Yes |
Transform To Camel Case | editor.action.transformToCamelcase |
Ctrl + Alt + C | Yes |
Transform To Title Case | editor.action.transformToTitlecase |
Ctrl + Alt + T | Yes |
Transform To Snake Case | editor.action.transformToSnakecase |
Ctrl + Alt + S | Yes |
Transform To Kebab Case | editor.action.transformToKebabcase |
Ctrl + Alt + K | Yes |
Change Document Langauge Mode | workbench.action.editor.changeLanguageMode |
Ctrl + K, M | - |