The behavior of ; to repeat the last t command bothers me. Can you help me make it better?

Viewed 11145

Okay, suppose we have a line of text:

[s]tackoverflow rocks

where the brackets show the location of the cursor, in normal mode. After pressing tr, you get:

stackov[e]rflow rocks

Now for the fun part. What happens if you push ; to repeat the command? Nothing! Vim finds the next 'r' (immediately to the right of the cursor) and positions itself just left of that (where it already was).

I would prefer that ; advance the cursor to this position:

stackoverflow[ ]rocks

This can be achieved by using l to move right one character before pressing ;, but the extra step is irritating. There is a similar issue with T, but not with f and F. Is there some way to make ; behave the way I want with t and T?

4 Answers
Related