VI Editor
VI Editor
Vi editor
• is a visual editor used to create and edit text
files, doc and programs.
• Displays content of the files.
• Available for all the versions of unix and linux.
• In Red hat linux it links in the form of vim
editor.
• View command is used to open a file in the
read only mode.
Getting started
• Type vi filename then press enter key in the prompt mode.
• E.g. vi lab1.sh
• After pressing enter key vi editor mode will open a editor mode like this
• |
• ~
• ~
• ~
• ~
• ~
• ~
• ~
• ~
• ~
• ~
• ~
• ~
• "testfile" [New File]
• Then press I key to insert text.
• You will notice a tilde (~) on each line
following the cursor. A tilde represents an
unused line. If a line does not begin with a
tilde and appears to be blank, there is a space,
tab, newline, or some other non-viewable
character present.
Operation Modes