T S Vallender

vi

vi things I need to get in my head:
  • In a search and replace, & is the matched text (so you can, for example, reinsert it with extra text)
  • /d at the end of a search string will delete the matched line
  • Match groups are referenced with \n (pretty standard)
  • :.,+5 matches the next five lines
  • :g!/Paid/s/$/ Overdue (appends Overdue to all lines not containing Paid)
  • /m$ moves a line to the end of the file 
Tags: