VI Editor Quick Reference :
===================
1) Comment Line from 3 to Line 5
:3,5 s/^/##/g
2) Remove ## from line 3 to Line 5
:3,5 s/##//g
3) To remove sentence from current point
Shift + d (In Escape Mode)
4) To Ignore case in VI editor:
:set ignorecase : you nearly always want this
5) Delete Line 15 till 22
:15,22d
6) Re-edit a messed-up file.
:e!
7) Undo last changes in vi editor
<esc> u or :undo
8) Setting Numbers in Line :
:set nu
9) How to redo something you undid:
:redo
10) Go to start of File :
Shift + (
11) Go to end of File :
Shift + )
12) Go to start of current Line :
0
13) Go to end of Current Line :
$
No comments:
Post a Comment