Skip to content

Instantly share code, notes, and snippets.

@mlhoutel
Last active June 28, 2022 14:13
Show Gist options
  • Save mlhoutel/e5bde2100334118aa31f34bfe73ae457 to your computer and use it in GitHub Desktop.
Save mlhoutel/e5bde2100334118aa31f34bfe73ae457 to your computer and use it in GitHub Desktop.

Vim & VS Code shortcuts

VS Code

Cheat Sheet Config

Navigation

Switch Tab Ctrl + {n}
Quit Tab Ctrl + F4
Commands Ctrl + Shift + P
Navigate in open files Ctrl + Tab
New Terminal Ctrl + Shift + ù

File Utils

VSCode Extension

Vim

VSCode Extension

Cheat Sheet

:set encoding=utf-8

Modes

┌──────────────┐     [Ctrl+C] >     ┌──────────────┐        [:] >       ┌───────────────┐
│  --Insert--  │   <════════════>   │  --Normal--  │   <════════════>   │  --Command--  │  
└──────────────┘      < [i]         └──────────────┘     < [Ctrl+C]     └───────────────┘
                                            ∧
                                            ║    ∧
                                      [v]   ║ [Ctrl+C]
                                       ∨    ║
					    ∨
                                    ┌──────────────┐
                                    │  --Visual--  │
                                    └──────────────┘

--Normal--

Navigation

Navigation {n} lines {n} + i j k l
Navigation {n} words {n} + w b / W B
Move start/end of line 0 / $
Goto line {n} {n} + gg
Search char in line f{char} / F{char}
Navigate in search Enter then ; / ,
Search text in file /{text} / ?{text}
Navigate in search Enter then n / N
Find and replace :%s/find/replace/g
Move half page up/down Ctrl + D / U
Center screen on cursor zz

V (visual) at (go closing bracket) o / O (go back and forth)

Selection

Selection v
Copy/Cut selection y / d
Paste before/after cursor P / p

Macros

Record macro {name} q{name}
Stop recording q
Play macro {name} @{name}

Chrome

Cheat Sheet

Search Ctrl + F
Open selected link Ctrl + Enter
New tab Ctrl + t
Navigate to tab Ctrl + {n}
Close tab Ctrl + F4
Reopen closed tab Ctrl + Shift + t
Precedent / Next Alt + {arrows}
Search bar Ctrl + l

Cmder

Config Cheat Sheet

New tab Ctrl + t
Close tab Ctrl + w
Swap to tab {n} Ctrl + {n}
New Powershell tab Shift + Alt + 2
Copy current tab right/bottom Ctrl + Shift + R/B
Move to tab Ctrl + Shift + {arrows}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment