Find on Line

f, F, t, T โ€” jump to a character without leaving the line.

Keys: f, F, t, T, ;, ,

f{c} jumps to the next {c} on the line; F{c} jumps to the previous one. t{c} stops one character before; T{c} stops one character after. ; and , repeat in the same and opposite directions.

/ is overkill for jumping to a paren on the same line. f{c} jumps to the next {c} without ever leaving the line. F jumps backward. t ("till") stops one short. Then ; repeats the jump.

To next occurrence of {c}
KeyNote
f
{c}
To previous occurrence of {c}
KeyNote
F
{c}
Up to (but not on) next {c}
KeyNote
t
{c}
Up to (but not on) previous {c}
KeyNote
T
{c}
Repeat last f/F/t/T in same direction
KeyNote
;
Repeat last f/F/t/T in opposite direction
KeyNote
,
f โ€” find character forward
F โ€” find character backward
t โ€” till character forward
T โ€” till character backward
; โ€” repeat
, โ€” reverse repeat

Reference

Key Lands on Type
f{c} Next {c} on line Inclusive
F{c} Previous {c} on line Exclusive
t{c} Char before next {c} Inclusive
T{c} Char after previous {c} Exclusive
; Repeat last find (same direction) Same as original
, Repeat last find (opposite) โ€”

Worked example โ€” f and t

Inline character search.

Step 1 ยท
search.find-on-line
Step 2 ยท ff ยท ff โ€” find 'f' on this line.
ff โ€” find 'f' on this line.
Step 3 ยท 0tx ยท tx โ€” till x: stops one before.
tx โ€” *till* x: stops one before.

f lands ON the char; t lands JUST before. ; repeats; , reverses. Operator-friendly: dtx deletes up to but not including 'x'.

โ–ถ Try this in the simulator

See also: Pattern Search, Delete, Change