Next Previous Contents

10. Vim Reference Card

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

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

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

10.4 Notations used

Notations:

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

10.5 Interrupting, cancelling

10.6 File Manipulation

10.7 Movement

10.8 Line Positioning

10.9 Character positioning

10.10 Words, sentences, paragraphs

10.11 Marking and returning

10.12 Corrections during insert

10.13 Adjusting the screen

10.14 Delete

10.15 Insert, change

10.16 Copy and Paste

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

10.17 Operators (use double to affect lines)

10.18 Search and replace

10.19 General

10.20 Line Editor Commands

10.21 Other commands


Next Previous Contents