ClearOS Documentation



301 error for file:

User Tools

Site Tools

Getting Started with vi

The 'vi' program is a command line editor for posix systems (Linux systems like ClearOS and Unix systems like Solaris and Mac OSX are posix systems). The command vi is short for visual and is described as: a screen-oriented (visual) display editor. A simpler alternative which is also pervasive is 'nano'.

It is worth our attention because it is so pervasive among so many systems. If you are already used to using a different command line editor then vi may not be for you. We mention it here because it is pervasive and not because we advocate it above any other editor. If you are happy with the editor you know, keep using it. If you have never used an editor before or you want to learn vi, then this article is for you.

The basics

Vi has two basic modes, command mode and insert mode. When you are in command mode you can do things like:

  • Navigate the document
  • Switch to different documents
  • Save the document
  • Search for words or phrases
  • Find and replace

In edit mode you can:

  • Insert text

To enter command mode from insert mode, hit the key. To enter insert mode, from command mode type the 'i' key. When you are in insert mode, the word – INSERT – will appear at the bottom line of the screen. When you escape insert mode, the word – INSERT – will no longer appear at the bottom of the screen. Also, when you press while in command mode already, your system may beep at you. This is ok and useful feedback.

content/en_us/kb_howtos_getting_started_with_vi.txt · Last modified: 2015/02/11 10:15 (external edit)