Getting started with vi editor command under linux

  
        

VI File Editing

There are three modes,

Command mode is used to enter vi commands, such as editing, saving, and exiting.

Edit mode is used to modify the contents of the file.

Last line mode is an extension of the command mode.

Mode 1 Command Mode

a or i enter edit mode

ZZ Exit

x Delete

Mode 2 Edit Mode
>

: Go to last line mode

esc go to command mode

mode 3 last line mode

:x save

:q exit

:w Save as

Copyright © Windows knowledge All Rights Reserved