From FOG Project
Revision as of 22:40, 28 May 2016 by Wayne-workman.28155 (talk | contribs) (Added video tutorial.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Quick reference for basic editing in Vi

Vi is a very basic (yet incredibly powerful) text editor that comes with just about every single Linux Distribution. Using Vi allows you to avoid installing other text editors.

Basic Instructions:

Note: Avoid using the number pad in Vi.

Go into insert mode, here you may use arrows to navigate text, and edit it with the keyboard as normal:


Exit insert mode:

Esc (the escape key)

WHEN NOT in insert mode you may use:

Write changes:

:w   (then enter)

Exit vi:

:q   (then enter)

Exit vi without saving changes:

:q!   (then enter)

Example of usage...

[root@localhost ~]# vi /README.txt
This is my first readme file, wrote with vi!
(Esc key)
[root@localhost ~]# cat /README.txt
This is my first readme file, wrote with vi!

External Video Link:

Linux Vi - Basic Tutorial