My Favorite Shortcuts for VS Code
Feb 2, 2024 06:30 · 165 words · 1 minute read
General advice: You can access a list of all keyboard shortcuts via the “Preferences: Open Keyboard Shortcuts” menu (shortcut: ⌘+K, ⌘+S.
Essentials
- ⌘+Shift ⇧+P: Show all commands (and search through them)
Navigating
- F12: Go to Definition
- ⌥+F5: Go to Next Change
- Likewise, ⌥+⇧+F5 lets you “Go to Previous Change”
- ⌃+-: Go back (go to last cursor position)
- Likewise, ⌃+⇧+- lets you “Go forward (navigate to the next cursor position)”
Selecting
- ⌃+⇧+← / → lets you un-expand/expand the selection (e.g. for selecting the whole word, the whole method…)
Refactoring
- F2: Rename symbol (e.g. variable, class, method…)
- You are in control
- Customizing my shell: From bash to zsh to fish
- JSON5: JSON with comments (and more!)
- jq: Analyzing JSON data on the command line
- Get Total Directory Size via Command Line
- Changing DNS server for Huawei LTE router
- Notes on Job & Career Development
- Adding full-text search to a static site (= no backend needed)
- Generating a random string on Linux & macOS
- Caddy web server: Why use it? How to use it?