vs.md 4.8 KB

VS Code πŸ—’οΈ

Notes

11/26/21 - added Visual Studio Code (Insiders) to Ovid and need to make some notes as I get along.

https://github.com/github/copilot-docs/blob/main/docs/visualstudiocode/gettingstarted.md#getting-started-with-github-copilot-in-visual-studio-code

Ctrl+Enter. GitHub Copilot will open a new tab and suggest multiple options

Keyboard Shortcuts

  • unassigned shortcuts available at aka.ms/vscodekeybindings

General

β‡§βŒ˜P, F1 (^) Show Command Palette
⌘P Quick Open, Go to File...
β‡§βŒ˜N (^) New window/instance
⌘W (^) Close window/instance
⌘, (^) User Settings
⌘K ⌘S (^) Keyboard Shortcuts

Basic editing

⌘X (^) Cut line (empty selection)
⌘C (^) Copy line (empty selection)
βŒ₯↓ / βŒ₯↑ (^) Move line down/up
⇧βŒ₯↓ / ⇧βŒ₯↑ (^) Copy line down/up
β‡§βŒ˜K (^) Delete line
⌘Enter / β‡§βŒ˜Enter (^) Insert line below/above
β‡§βŒ˜\ (^) Jump to matching bracket
⌘] / ⌘[ (^) Indent/outdent line
Home / End (^) Go to beginning/end of line
βŒ˜β†‘ / βŒ˜β†“ (^) Go to beginning/end of file
βŒƒPgUp / βŒƒPgDn (^) Scroll line up/down
⌘PgUp /⌘PgDn (^) Scroll page up/down
βŒ₯⌘[ / βŒ₯⌘] Fold/unfold region
⌘K ⌘ / ⌘K ⌘ Fold/unfold all subregions
⌘K ⌘ 0 / ⌘K ⌘J (^) Fold/unfold all regions
⌘K ⌘C (^) Add line comment
⌘K ⌘U (^) Remove line comment
⌘/ (^) Toggle line comment
⇧βŒ₯A (^) Toggle block comment
βŒ₯Z Toggle word wrap

Multi-cursor and selection

βŒ₯ + click (^) Insert cursor
βŒ₯βŒ˜β†‘ (^) Insert cursor above
βŒ₯βŒ˜β†“ (^) Insert cursor below
⌘U (^) Undo last cursor operation
⇧βŒ₯I (^) Insert cursor at end of each line selected
⌘L (^) Select current line
β‡§βŒ˜L (^) Select all occurrences of current selection
⌘F2 (^) Select all occurrences of current word
βŒƒβ‡§βŒ˜β†’ / ← (^) Expand / shrink selection
⇧βŒ₯ + drag mouse (^) Column (box) selection
⇧βŒ₯βŒ˜β†‘ / ↓ Column (box) selection up/down
⇧βŒ₯βŒ˜β† / β†’ (^) Column (box) selection left/right
⇧βŒ₯⌘PgUp (^) Column (box) selection page up
⇧βŒ₯⌘PgDn (^) Column (box) selection page down

Search and replace

⌘F (^) Find
βŒ₯⌘F (^) Replace
⌘G / β‡§βŒ˜G (^) Find next/previous
βŒ₯Enter Select all occurrences of Find match
⌘D (^) Add selection to next Find match
⌘K ⌘D (^) Move last selection to next Find match

Rich languages editing

βŒƒSpace, ⌘I (^) Trigger suggestion
β‡§βŒ˜Space (^) Trigger parameter hints
⇧βŒ₯F (^) Format document
⌘K ⌘F (^) Format selection
F12 (^) Go to Definition
βŒ₯F12 (^) Peek Definition
⌘K F12 (^) Open Definition to the side
⌘. (^) Quick Fix
⇧F12 (^) Show References
F2 (^) Rename Symbol
⌘K ⌘X (^) Trim trailing whitespace
⌘K M Change file language

Navigation

⌘T Show all Symbols
βŒƒG (^) Go to Line...
⌘P (^) Go to File...
β‡§βŒ˜O (^) Go to Symbol...
β‡§βŒ˜M (^) Show Problems panel
F8 / ⇧F8 (^) Go to next/previous error or warning
βŒƒβ‡§Tab (^) Navigate editor group history
βŒƒ- / βŒƒβ‡§- (^) Go back/forward
βŒƒβ‡§M (^) Toggle Tab moves focus

Editor management

⌘W (^) Close editor
⌘K F (^) Close folder
⌘\ (^) Split editor
⌘ 1 / ⌘2 / ⌘ (^3) Focus into 1 st, 2nd, 3rd editor group
⌘K βŒ˜β† / ⌘K βŒ˜β†’ (^) Focus into previous/next editor group
⌘K β‡§βŒ˜β† / ⌘K β‡§βŒ˜β†’ Move editor left/right
⌘K ← / ⌘K β†’ (^) Move active editor group

File management

⌘N (^) New File
⌘O (^) Open File...
⌘S (^) Save
β‡§βŒ˜S (^) Save As...
βŒ₯⌘S (^) Save All
⌘W (^) Close
⌘K ⌘W (^) Close All
β‡§βŒ˜T (^) Reopen closed editor
⌘K Enter (^) Keep preview mode editor open
βŒƒTab / βŒƒβ‡§Tab (^) Open next / previous
⌘K P (^) Copy path of active file
⌘K R (^) Reveal active file in Finder
⌘K O (^) Show active file in new window/instance

Display

βŒƒβŒ˜F (^) Toggle full screen
βŒ₯⌘ (^0) Toggle editor layout (horizontal/vertical)
⌘= / β‡§βŒ˜- (^) Zoom in/out
⌘B (^) Toggle Sidebar visibility
β‡§βŒ˜E Show Explorer / Toggle focus
β‡§βŒ˜F (^) Show Search
βŒƒβ‡§G (^) Show Source Control
β‡§βŒ˜D (^) Show Debug
β‡§βŒ˜X (^) Show Extensions
β‡§βŒ˜H (^) Replace in files
β‡§βŒ˜J (^) Toggle Search details
β‡§βŒ˜U Show Output panel
β‡§βŒ˜V (^) Open Markdown preview
⌘K V (^) Open Markdown preview to the side
⌘K Z (^) Zen Mode (Esc Esc to exit)

Debug

F9 (^) Toggle breakpoint
F5 (^) Start/Continue
F11 / ⇧F11 (^) Step into/ out
F10 (^) Step over
⇧F5 (^) Stop
⌘K ⌘I (^) Show hover

Integrated terminal

βŒƒ(^) Show integrated terminal βŒƒβ‡§ Create new terminal
⌘C (^) Copy selection
βŒ˜β†‘ / ↓ (^) Scroll up/down
PgUp / PgDn (^) Scroll page up/down
⌘Home / End (^) Scroll to top/bottom