Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Visual Insert

  1. Type vim hello.txt. The editor opens, the cursor is on the "H" of the "Hello".
  2. Press 2yy followed by p. The first 2 lines were yanked into memory (copied) and the pasted above the current line.
  3. Press Ctrl-v to switch to visual mode.
  4. Press 2j to mark 2 more lines under the current line.
  5. Press I (Shift i) to switch to insert mode.
  6. Type in "vim! "
  7. Press ESC
  8. After a second "vim! " will appear on the second and third lines as well.
  9. Type :wq to write file and quit vim.