3 ms·
They are documented in :help left-right-motions, which you can also read at http://vimdoc.sourceforge.net/htmldoc/motion.html#left-right-motions http://vimdoc.s
by rav 11y ago
They are documented in :help left-right-motions, which you can also read at http://vimdoc.sourceforge.net/htmldoc/motion.html#left-right-motions http://vimdoc.sourceforge.net/htmldoc/motion.html#left-right....
fx moves the cursor to the next occurrence of x, and semicolon repeats the search. To repeat the search in the opposite direction, use comma. 4tx moves the cursor right before the 4th occurrence of x right of the cursor in the line. F and T move backwards instead of forwards; in that case, semicolon continues moving backwards and comma moves forwards (similar to / ? n N).
It takes a while to get used to, but it has made me much more efficient compared to when I just pressed wwwww or eeeee or bbbb to get where I wanted in a line.
- rifung 11y agoOh my god this is amazing. Thank you!
- aidos 11y agoI also make liberal use of '/' to get around. Sometimes the bit you want is a line or two down so 't' doesn't quite cut it. I use t / f a lot when cutting things, though there's probably a better way (from the article, I just discovered gn to visually select the next item matching the previous search). eg, I might have a name that I want to replace in a couple of spots so I find it easy to do something like: /AIDOS<CR>cfSNEWNAME<ESC>n.n.n. It's generally when it's a bit less calculated. If I knew I was replacing a load of stuff I'd use :%s/AIDOS/NEWNAME/gc