its time to go down the vim rabbit hole. i did vimtutor and i like ce a lot. also searching. it will take me a while to learn the cut and paste shortcuts.

https://thoughtbot.com/upcase/videos/onramp-to-vim-motions-and-moving

some things i like here:

  • H/M/L for quick position jumps on a screen
  • w/b to move fwd/back a word
  • f for quick find.
  • ; to repeat search commands, . to repeat change commands
  • /foobar to search and n/N to go back/forth
  • ctrl+U/D to page up/down
  • command language:
    • ciw to “change a word” from inside the word (prefer this over caw for more reusability)
    • ci( or ci) to change inside a parenthesis (or dib for block deletes)
    • cit to change inside a tag (incl jsx!)
    • ct> to change the params in a tag
    • ci" to change inside quotes
    • dat to delete tag and contents
    • the difference between a and i is “around” vs “inside”

text objects > motions

  • from any location

navigating camelcasing is awkward so may want to use https://github.com/bkad/CamelCaseMotion or vim-wordmotion.


windows

  • create new window: :new or :vnew or :split or :vsplit
  • ctrl+W h/j/k/l to navigate these windows
  • ctrl+W H/J/K/L to move these windows
  • ctrl+W -/+/</>/= to resize these windows
  • zz center the line, zt/zb to move to top/bottom
  • :tab new and gt to navigate between tabs. keep 2 at most
  • ctrl+W T to break a window out into a tab

modes

  • ctrl+E I (some actions) Esc

file explorer

  • nerdtree no, :e . yes!