Show Menu

My VIM cheatsheet Cheat Sheet by

Personal vim cheatsheets including lots of plugins. Vimrc available at https://github.com/jwldk/vim
vim

Movement

j
Move cursor down
k
Move cursor up
h
Move cursor left
l
Move cursor right
e
To end of word
b
To beginning of word
w
To beginning of next word
^
To the first non-wh­­it­e­space character of a line
$
To the end of a line
H
To the first line of the screen
M
To the middle line of the screen
L
To the the last line of the screen
space
Center current line in screen
Ctrl^d
Page down
Ctrl^u
Page up
Ctrl^o
Previous position
Ctrl^i
Forward position
G
End of file
g,
Previous edit
g;
Next edit

EasyMotion

sab
Search for ab in screen
/abcd
Search for abcd in file
<l­ead­er>j
Jump to a line below
<l­ead­er>k
Jump to a line above
<l­ead­er>h
Jump behind of cursor
<l­ead­er>l
Jump forward of cursor
n
Next result
N
Previous result
<TA­B>
Search on next screen

Javascript snippes

cl
consol­e.l­og(­"­stu­ff");
fun
function functi­on_­nam­e(a­rg...
re
var fs = requir­e('­fs');
if
if(true) ...
ife
if(true) ... else ...
for
for(var i....)
ford
for(var prop in obj) ...
f
function() { ... }
ter
<co­nd> ? true : false;
ret
return result;
s
"­key­": "­val­ue",
a
[ ],
o
{ },
 

Speak vim examples

ciw
Change inside word
cab
Change around bracket
dtx
Delete till character x
cs’”
Change surround from ' to "
viwS”
Surround word with "

Insert mode

C^t
Increase line indent
C^d
Decrease line indent
C^ra
Insert from register a

Progra­mming

<le­ade­r>pf
Previous function
<le­ade­r>nf
Next function
<le­ade­r>pc
Previous class
<le­ade­r>nc
Next class
<le­ade­r>c
Toggle comment selection
<le­ade­r>tg
Goto definition
<le­ade­r>tp
Definition in preview window
<le­ade­r>d
Goto variable definition
<le­ade­r>i
Insert ipdb line
<le­ade­r>u
Show undo tree

F keys

F13
NERDTree
F14
List buffers
F15
Taglist
F16
Close preview windows
F17
Previous buffer
F18
Next buffer

Misc

jk
ESC
<le­ade­r>a
Ack search
<le­ade­r>x
Toggle autoclose
<le­ade­r>v
Vertical split
<le­ade­r>s
Horisontal split
qa
Record into macro a
@a
Replay macro a
-
" (To access yank registers)

Download the My VIM cheatsheet Cheat Sheet

2 Pages
//media.cheatography.com/storage/thumb/jwldk_my-vim-cheatsheet.750.jpg

PDF (recommended)

Alternative Downloads

Share This Cheat Sheet!

 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          VI Editor Cheat Sheet
          Vim NERDTree Cheat Sheet
          cVim Keyboard Shortcuts