Vi editor

From GHER

Revision as of 08:50, 9 April 2013 by Charles (Talk | contribs)
Jump to: navigation, search

vi is a text editor originally created for Unix.

Several guides are available through internet. Here we just summarize a few useful commands with which you can survive with vi:

vi file.txt

will open the text file with the editor. Once with the editor, type

  • i to inserts text to the left of the cursor (insert mode)
  • Esc to stop the insert mode
  • :w to write the changes you made
  • :q to quit the editor
  • :wq to write and quit
  • :q! to quit without saving the file

Guides and tutorials

More complete guides available at:

Turn on/off color syntax

cd
vi .vimrc

then put in file .vimrc

syntax on
Personal tools