vim like a boss

Jan 07 2012 Published under Linux,Programming | Tags:

What do these Vim commands do?
basics:

:help
:split
:q
:w
:q!
.

page navigation:

hjkl
10j
10G
{
}
H
M
L
[[
]]
gg
G
zt
zz
zb
Ctrl + f
Ctrl + b
Ctrl + d
Ctrl + u

line navigation:

0
^
$
g_
w
W
e
E

function navigate:

[{
]}
][
%
gd

make&run

:make
:!<command>
:!%
:cn
:cc
:sh & exit

delete/change:

de
dw
di>
diw
diW
daw
c%
ceHello
S

insert:

iHello
A
o
O

autocompletion:

Ctrl + p
Ctrl + n

uppercase/lowercase:

gu
gU
~

visual:

v
V
va
ctrl+v
:set nu

undo/redo:

u
U
Ctrl-r

search:

#
*
/sometext
n
N
:s/searchtext/replacetext/
:%s/searchtext/replacetext/gc
:set hlsearch
:set nohlsearch

indentation:

>aB
v + >
1G=G

tab:

:tabnew
:tabn
:tabp
:tabc
:tabo
gt
gT
Ctrl+PgUp
Ctrl+PgDn

ref:
http://www.viemu.com/a-why-vi-vim.html
http://www.thegeekstuff.com/2009/03/8-essential-vim-editor-navigation-fundamentals/
http://www.catswhocode.com/blog/100-vim-commands-every-programmer-should-know
http://www.moolenaar.net/habits.html
http://gedare-csphd.blogspot.jp/2010/05/vim-productivity.html

Tags:

No responses yet

Comments are closed at this time.

Login