Vi

From DVRpedia

Revision as of 19:55, 2 July 2007 by Admin (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

VI is a text editor that requires the user know a series of keystrokes before being able to use it properly. The University of Hawaii has a useful vi reference page.

The basics of vi are as follows. Prior to editing a file make sure you tivo is in read/write mode (see above). To edit a file with vi at bash type vi <filename>. In vi it is important to remember that vi has 2 modes, insert mode and command mode.

  1. On start vi is in command mode, to enter command mode (or assure you are in command mode)press the escape key.
  2. to enter the insert mode from command mode press either a or i. use the arrow keys to navigate and enter text as needed.
  3. To delete text you must be in command mode. press x and the letter under the cursor is deleted.
  4. To exit WITHOUT saving, assure you are in command mode and type :q!
  5. To SAVE and exit, assure you are in command mode and type :wq