Professional Documents
Culture Documents
Vi ShortCuts
Vi ShortCuts
General Startup
=============
Open a file: vi filename
insert before cursor:-
line
0
move cursor to the first
column on the
current line
w
move to the beginning of
the next word or
punctuation mark
b
move to the beginning of the
previous word
or punctuation mark
H
move cursor to the top of
the screen
M
move cursor to the middle
of the screen
L
move cursor to the bottom
of the screen
:$ move to last line of file
^f
^b
Copying Code
yy
copy line
p
paste the copied line
Find Commands
/string-you-wanna-seach
finds a word going forwards
n - find next matched
Misc:
dw - delete immediate word
.
- repeat last command
Line Number:
:set number
VI EDITOR DEFAULT SETTINGS FILE:
===========
- Create a file called .vimrc in your
$USER_HOME.
- Each time you open a file in vim
editor, vim loads the short cuts that
you defined in your .vimrc. So you
dont need to set them up every
time.
set
set
set
set
set
set
number
hlsearch
incsearch
wildmode=longest,list
scrolloff=2
tabstop=4
===================
===
http://www.openvim.com/tutori
al.html