Tuesday, December 3, 2019

Vim commands

Python class commands (with vim-pythontextobj):
  • >ic to outdent a class
  • <ic to indent a class
  • cic to change a class
  • dic to delete a class
  • vic to visually select a class
  • yic to yank a class
Paragraph commands:
  • >ip to indent the current paragraph
  • <ip to outdent the current paragraph
  • dip to delete the current paragraph
  • yip to yank the current paragraph
Paragraph commands:
  • 6J to join six lines
Paragraph commands (visual mode):
  • vapJ to join all lines in a paragraph (version of {visual}J)
Line commands:
  • Y to yank the current line
  • yj to yank two lines (starting with the current line)
  • 3yy to yank three lines (starting with the current line)
  • 4yy to yank four lines (starting with the current line)
Matchfix commands:
  • % to jump between delimiters
  • %x``x to delete matching delimiters
Word commands:
  • guw to lowercase the current word
  • gUw to uppercase the current word
Character commands (current character):
  • r to replace the current character
  • x to delete the current character
  • yl to yank the current character
  • ylp to duplicate the current character
Character commands:
  • p to paste one character
Delete commands:
  • "_d to delete into Vim's "_ black hole register.
  • "_dG to black-hole-delete to end of file.
  • dt" to delete until (but not including) quotes:
    • abjad.label(leaves).color_leaves(color="red")
    • dt"
    • abjad.label(leaves).color_leaves("red")       

No comments: