VI Editor - Commands
Most Linux distributions use VI as their default editor. Although VI is very convenient to use after learning certain shortcuts, it is not exactly self-explanatory, especially for beginners.
edit/paste
i
save and close
:wq
close without save
:q!
search
search forward
/Searchtext
back
?Searchtext
continue search "n" next
Search / Replace
:1,$s/Unix/Linux/g
replace "Unix" with "Linux" (range: 1,$ -> from beginning to end, g: replace all)
:%s/Unix/Linux/g
delete the whole document
:1,$d
({{pro_count}})
Rate Post:{{percentage}} % positive
({{con_count}})