Skip to content

Instantly share code, notes, and snippets.

@nobitagit
Last active April 29, 2021 07:10
Show Gist options
  • Save nobitagit/649fd57e6d7871a2dd263251c51f7f3e to your computer and use it in GitHub Desktop.
Save nobitagit/649fd57e6d7871a2dd263251c51f7f3e to your computer and use it in GitHub Desktop.
VS Code shortcuts

πŸ’₯ - you should never forget this one

See all open files CTRL + p

Show command palette CMD + p

Show suggestions (intellisense style) CTRL + SPACE either on a new line or by highlighting a word

Select whole line CMD + i

Move all highlighted up or down ALT + ARROW UP/DOWN

Open integrated terminal CTRL + `

Focus terminal CMD + Β§πŸ’₯

Focus tab number 1 CMD + 1

Show Project Explorer CMD + SHIFT + E

Go to line CTRL + g or (VIM style) ESC + :

Go to Symbol πŸ’₯ CMD + SHIFT + o Add a : and group them by type

Go to Symbol within workspace πŸ’₯ CMD + t

Go to previous cursor location πŸ’₯ Ctrl + -

List recent files within the tab πŸ’₯ CTRL + SHIFT

VIM mode only

Delete the char under the cursor x

Back to start of line 0

Back to start of line and insert mode I

To end of line and enter edit mode A

Back to start of file gg

Back to end of file G

Find matching parens %

substitute 'new' for 'old' where g is globally :s/old/new/g

jump to definition of method πŸ’₯ gd

jump to another tab (see more here) CTRL+ww

delete from cursor until (till) X character πŸ’₯ dtX To expand this combination (to prev and exclusive/inclusive see https://askubuntu.com/a/781012/289123)

delete or change a block inside (surrounded by) a character. πŸ’₯ For example to delete everything inside parens (THIS WILL BE REMOVED) => () di( or ci( See https://leanpub.com/boostyourcodingfuwithvscodeandvim/read#leanpub-auto-editing-like-magic-with-vim-operators for more

Breadcrumbs

Focus breadcrumbs CMD + SHIFT + .

Navigate breadcrumbs ALT + LEFT ARROW AND ALT + RIGHT ARROW

Searching

  • Focus next result in search ALT+u

  • Focus prev result in search SHIFTALT+u

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment