Cheatography
https://cheatography.com
Personal vim cheatsheets including lots of plugins. Vimrc available at https://github.com/jwldk/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-whitespace 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 |
|
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 |
|
Jump to a line below |
|
Jump to a line above |
|
Jump behind of cursor |
|
Jump forward of cursor |
n |
Next result |
N |
Previous result |
<TAB> |
Search on next screen |
Javascript snippes
cl |
console.log("stuff"); |
fun |
function function_name(arg... |
re |
var fs = require('fs'); |
if |
if(true) ... |
ife |
if(true) ... else ... |
for |
for(var i....) |
ford |
for(var prop in obj) ... |
f |
function() { ... } |
ter |
<cond> ? true : false; |
ret |
return result; |
s |
"key": "value", |
a |
[ ], |
o |
{ }, |
|
|
Programming
<leader>pf |
Previous function |
<leader>nf |
Next function |
<leader>pc |
Previous class |
<leader>nc |
Next class |
<leader>c |
Toggle comment selection |
<leader>tg |
Goto definition |
<leader>tp |
Definition in preview window |
<leader>d |
Goto variable definition |
<leader>i |
Insert ipdb line |
<leader>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 |
<leader>a |
Ack search |
<leader>x |
Toggle autoclose |
<leader>v |
Vertical split |
<leader>s |
Horisontal split |
qa |
Record into macro a |
@a |
Replay macro a |
- |
" (To access yank registers) |
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 |
|
Created By
Metadata
Favourited By
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets