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 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
positive Bewertung({{pro_count}})
Rate Post:
{{percentage}} % positive
negative Bewertung({{con_count}})

THANK YOU for your review!

Questions / Comments


By continuing to browse the site, you agree to our use of cookies. More Details