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

KeysWhat they do
fx / FxJump forward / back onto x
tx / TxStop 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