Vim Scoops / Lessons / Jump to a character
How to jump to a character in Vim
Press f then a character to jump to the next one on the line, so f( lands on the next bracket. Press ; to repeat the jump and , to go back.
The keys
| Keys | What they do |
|---|---|
fx / Fx | Jump forward / back onto x |
tx / Tx | Stop just before / after x |
| ; | Repeat the last jump |
| , | Repeat it the other way |
These only search the current line, so they're quick and predictable. Use / to search further.
They're best paired with an operator: dt, deletes up to the next comma, and cf) changes everything up to and including the closing bracket.
Related
Want all of Vim, in order? Vim Scoops is a free game that starts at h j k l and builds up to macros.
Play the full game