Usefull vi commands

by Jul 5, 2016Linux

Reading Time: < 1 minute

Some useful commands to work with vi

iinsert
rreplace
9ylcopy nine characters from cursor position, e.g 192.168.1.0 192.168.1 will be copied
ppaste what you have copied
xdelete character
:wqwrite and quit (save and close)
/search_stringfind search_string
ngo to next occurrence of search_string
Ngo to previous occurrence of search_string
dddelete line
10dddelete next 10 lines
yycopy line
10yycopy next 10 lines
rreplace current character at cursor
Rreplace current word at cursor
Harold Preyers

Harold Preyers

Solution Architect

Archives

Categories