ViEditor

To open o create new text file in vi enter

vi textfile

vi opens in a command mode. to enter input mode press i. To return to command mode press Esc

CommandDescription
iinput mode
:q!quit
:wq!save and quit
:save file
dddelete line
uundo
ostart new line
/textsearch text
ggreturn to first line
:%s/text1/text2/search text1 and replace it with text2 for one instance
:%s/text1/text2/gsearch text1 and replace it with text2 for all instance
Page last modified on July 15, 2021, at 04:24 AM
Powered by PmWiki