Vi Summary
Vi Summary
This vi editor command summary is provided to help students get a quick start in the use of this editor in
the Harris Computer Lab. Bold letters indicate the command and italics indicate a sample file name or a real
file which you would enter in your command line. It is recommended that you obtain a current UNIX manual
to use in conjunction with this guide. Use the UNIX command “man vi” to learn additional vi commands.
The vi editing session operates in two modes, <Esc>+<i> for insert mode for entering text, and
<Esc>+<other command> for operating in command mode. + indicates keystrokes to be entered in sequence.
_ indicates a space.
Append text <Esc>+a+<input Enter text after cursor until finished, then <Esc>
text>+<Esc>
Delete text <Esc>+x Position cursor, strike x for each character
you wish to remove
Delete line <Esc>+dd Position cursor, strike key for each line you wish to remove
Search for pattern <Esc>+/+<input pattern> Position cursor, strike <Esc>+/+”findthis”
Delete word <Esc> + dw Delete word (into buffer)
Join two lines <Esc> + J Join next line to end of current line
Line number <Esc> + <:> + nu Display current line number