Next Previous Contents

11. Vim Reference Card

11.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"

11.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

11.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

11.4 Notations used

Notations:

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

11.5 Interrupting, cancelling

11.6 File Manipulation

11.7 Movement

11.8 Line Positioning

11.9 Character positioning

11.10 Words, sentences, paragraphs

11.11 Marking and returning

11.12 Corrections during insert

11.13 Adjusting the screen

11.14 Delete

11.15 Insert, change

11.16 Copy and Paste

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

11.17 Operators (use double to affect lines)

11.18 Search and replace

11.19 General

11.20 Line Editor Commands

11.21 Other commands


Next Previous Contents