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 screenw/b
to move fwd/back a wordf
for quick find.;
to repeat search commands,.
to repeat change commands/foobar
to search andn/N
to go back/forthctrl+U/D
to page up/down- command language:
ciw
to “change a word” from inside the word (prefer this overcaw
for more reusability)ci(
orci)
to change inside a parenthesis (ordib
for block deletes)cit
to change inside a tag (incl jsx!)ct>
to change the params in a tagci"
to change inside quotesdat
to delete tag and contents- the difference between
a
andi
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 windowsctrl+W H/J/K/L
to move these windowsctrl+W -/+/</>/=
to resize these windowszz
center the line,zt/zb
to move to top/bottom:tab new
andgt
to navigate between tabs. keep 2 at mostctrl+W T
to break a window out into a tab
modes
ctrl+E I (some actions) Esc
file explorer
- nerdtree no,
:e .
yes!