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?
As of Vim version 7.3.235 this annoyance has been amended. Now the default is the behaviour you had expected in the first place: ; makes the cursor jump to right before the second "r".
This was the patch announcement:
Patch 7.3.235
Problem: ";" gets stuck on a "t" command, it's not useful.
Solution: Add the ';' flag in 'cpo'. (Christian Brabandt)
The old behaviour has been demoted to a compatibility option. You can bring it back with :set cpo+=;. See :h cpo-;.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With