There are two modes in VI editor: insert mode and command mode. Insert mode allows typing text into the file while command mode allows manipulating text via commands. Common commands include i to insert before the cursor, dd to delete a line, hjkl to move the cursor, / and ? to search forwards and backwards, and :wq to write and quit a file.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
76 views2 pages
Vi Editor
There are two modes in VI editor: insert mode and command mode. Insert mode allows typing text into the file while command mode allows manipulating text via commands. Common commands include i to insert before the cursor, dd to delete a line, hjkl to move the cursor, / and ? to search forwards and backwards, and :wq to write and quit a file.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2
VI EDITOR
There are two file modes
1)INSERT MODE: The insert mode puts anything typed on the keyboard into the current file 2)COMMAND MODE: The command mode allows the entry of commands to manipulate text.
i Insert before current cursor position
I Insert at beginning of current line a Insert (append) after current cursor position A Append to end of line r Replace 1 character R Replace mode <ESC> Terminate insertion or overwrite mode
Deletion of text
Deleting
x delete character under cursor
dd delete line under cursor
dw delete word under cursor
ndd Delete n lines (n is a number) and put them in buffer
db delete word before cursor
u Undo last command
cut and paste
:w Write the current file.
:w new.file Write the file to the name 'new.file'.