Next Previous Contents

12. Vim Reference Card

12.1 Vi states

Vi has 3 modes:

  1. command mode - Normal and initial state; others return here (use ESC to abort a partially typed command)
  2. input mode - entered by specific commands a i A I o O c C s S R and ended by ESC or abnormally with interrupt
  3. line mode - i.e. waiting for input after a : , / , ? or a ! command (end with CR, abort with CTRL-c). CTRL is the control key: CTRL-c means "control c"

12.2 Shell Commands

  1. TERM= code Puts a code name for your terminal into the variable TERM
  2. export TERM Conveys the value of TERM (the terminal code) to any UNIX system program that is terminal dependant.
  3. tput init Initializes the terminal so that it will function properly with various UNIX system programs.
  4. vi filename Accesses the vi screen editor so that you can edit a specified file.
  5. vi file1 file2 file3 Enters three files into the vi buffer to be edited. Those files are file1, file2, and file3.
  6. view file Invoke vi editor on file in read-only mode
  7. vi -R file Invoke vi editor on file in read-only mode
  8. vi -r file Recover file and recent edits after system crash
  9. vi -r file Recover file and recent edits after system crash

12.3 Setting Options

  1. :set option Activate option
  2. :set option=value Assign value to option
  3. :set no option Deactivate option
  4. :set Display options set by user
  5. :set all Display list of all current options, both default and those set by the user
  6. :set option? Display values of option

12.4 Notations used

Notations:

  1. CTRL-c CTRL is the control key: CTRL-c means "control c"
  2. CR is Carriage return (ENTER key)

12.5 Interrupting, cancelling

12.6 File Manipulation

12.7 Movement

12.8 Line Positioning

12.9 Character positioning

12.10 Words, sentences, paragraphs

12.11 Marking and returning

12.12 Corrections during insert

12.13 Adjusting the screen

12.14 Delete

12.15 Insert, change

12.16 Copy and Paste

The "yank buffer" is filled by EVERY delete command, or explicitely by Y and yy.

12.17 Operators (use double to affect lines)

12.18 Search and replace

12.19 General

12.20 Line Editor Commands

12.21 Other commands


Next Previous Contents