Skip to content

Latest commit

 

History

History
23 lines (22 loc) · 1.07 KB

vimbits.md

File metadata and controls

23 lines (22 loc) · 1.07 KB

A truly random list of useful vim-bits :)

  • ctrl-a or ctrl-x to increment/decrement numbers
  • ctrl-g to see what file and line you're at
  • g8 to see the ASCII of the character on your cursor
  • g< to see previous output
  • g& to replay last substitute command
  • gu or gU + motion will upcase/downcase
  • g? to turn selection into rot13 or g?? for the line
  • gq put a long line on multiple lines. Mainly for comments
  • gv to highlight previous highlighted region
  • gi to last insert location
  • :<,'>g/Word/norm! diw to execute command on highlighted section for only lines with Word on
  • ~ to capitalize / uncapitalize a letter
  • q followed by a letter to record a macro
  • m followed by a letter to mark a spot in a file. If the letter is a capital then it's bound globally
  • `a move to the mark
  • ctrl-v and ctrl-x to open split panes from telescope
  • ctrl-w = to equal size the panes
  • ctrl-w r to swap pane positions
  • :cdo g/word/norm! D to action on a quickfix list
  • % to go from beginning to the end of wrappers
  • :%s/findand/replace/g