Vim Revisited

  1. P for pasting before the cursor
  2. cc delete entire line and goto insert mode
  3. zt Move the current line to the top of the screen
  4. zz Move the current line to the middle of the screen
  5. zb Move the current line to the bottom of the screen
  6. H Move the cursor to the top of the screen
  7. M Move the cursor to the middle of the screen
  8. L Move the cursor to the last of the screen
  9. Replace a word just with in a function
    • goto to the function starting { brace.
    • Change to visual mode by press v
    • then press % to select entire function body.
    • then : once the scope of the replacement is already filled by vim
    • start typing the substitute command as s/word/replace

2 thoughts on “Vim Revisited

Leave a Reply