Normal |
--- |
zz /zt /zb |
set current line at top/middle/bottom of the screen |
ZZ |
save and quit |
ZQ |
quit without saving |
C-y /C-e |
scroll one line |
C-u /C-d |
scroll half-page |
C-b /C-f |
scroll full-page |
0 /$ |
go to the beginning/end of line |
^ /g_ |
go to the first/last char on line |
e /E |
go to the end of next "word"/"big word" (including '-') |
w /W |
go to the beginning of next "word"/"big word" (including '-') |
b /B |
go to the beginning of last "word"/"big word" (including '-') |
{ /} |
go to next/previous paragraph |
C-u/d |
move half page up/down |
C-b/f |
move one page backward/foreward |
' ' |
go back to the line where the cursor was before the last go to |
' . |
go to last changed where the cursor was before the last go to |
f x |
find the next 'x' character |
* |
search for current word and go to next occurence |
# |
search for current word and go to previous occurence |
gd |
go to definition (first occurence) of current word |
% |
go to corresponding (){}[] |
dfx |
delete text to the next occurence of 'x' included |
qx |
record macro named x |
@x |
call marco named x |
>> |
indent line |
<< |
unindent line |
C-w w or C-w C-w |
switch between panes |
C-l |
go to next buffer |
C-h |
go to previous buffer |
C-o or C-i |
go to previous/next cursor place |
, b |
git blame |
, n |
toggle line numbers |
, r |
toggle relative line numbers |
, f |
fuzzy find files |
, bs |
fuzzy search buffers |
, e c |
edit vimrc |
, s c |
source vimrc |
, p i |
run PlugInstall |
, c Space |
toggle comment |
Space |
toggle NERDTree |
"kyy |
copy current line to register k |
"Kyy |
append current line to register k |
"kp |
paste register k |
"+y |
yank to system clipboard (Linux) |
"+p |
paste from system clipboard (Linux) |
:reg |
list all defined registers |
v |
go to visual mode |
V |
go to visual line mode |
C-v |
go to visual block mode |
Visual |
--- |
f x |
select to the next 'x' character |
e |
select to the end of word |
$ |
select to the end of line |
i " |
select everything between the double quote |
o |
go to the opposite corner of the block selection |
cs"' |
replace surrounding " with ' |
ds" |
delete surrounding " |