Vim


enter text at end of multiple lines

  1. <c-V> - Enter Visual Block mode
  2. Use j/k to select the lines
  3. $ - Move cursor to last character
  4. A - Enter insert mode after last character
  5. Insert desired text
  6. <Esc> Exit insert mode and finish block append

Hotkeys

  • x - delete under cursor
  • viB - select curly brace block
  • vib - select paren block
  • vi' - select text within single quote
  • vi“ - select text within double quote
  • vit/cit - Select text between html brackets / c = and insert
  • c - delete selected and go to insert mode
  • ggVG - select entire file
  • cW - delete from cursor to end of word
  • r<char> - replace under cursor with <char>
  • f<char> - go forward to next instance of <char> in line ; to repeat
  • F<char> - go backward to previous instance of <char> in line ; to repeat

$ needs escaped to be \$ as $ represents end of line