Cheatsheet Pages / Vim Cheatsheet

How to find a character on the current line in Vim — f F t T with ; and ,

The cursor needs to land on — or just before — the next comma, bracket or quote on this line.

Almost every entry was run headless in Vim 9.1 and the resulting file checked; the few entries a tiny build cannot run (system clipboard, persistent undo, the sudo save) were verified against Vim's own documentation instead.

f,          " jump ONTO the next comma     F,  onto the previous comma
t,          " jump to JUST BEFORE the next comma   T,  just after the previous one
;           " repeat the last f/F/t/T        ,  repeat it in the opposite direction
Vim Cheatsheet one-page card — commands that actually work
The full one-page card — Vim Cheatsheet. Get the complete cheatsheet on GitHub