4

The ; movement is supposed to repeat t, T, f, and F movements. For f and F this works fine as the cursor is placed on the character. However, pressing ; after t or T does not work as VIM finds the same character again and again (i.e., the cursor will not continue to move).

Is there a workaround for this? Might it be considered a VIM bug even though technically it is correct?

dotancohen
  • 11,720

2 Answers2

5

That behavior is controlled by the ; flag of 'cpoptions'. Execute

:verbose set cpo?

to see how yours are set.

This is a vi-compatibility issue. If your Vim is configured to be vi-compatible, the ; will be included in 'cpoptions' and you will get the behavior you observe. See

:help 'cpoptions'
:help cpo-;
:help 'compatible'

The solution to your problem depends on how you got Vim into this vi-compatible state. One usually has to go to extra effort to do that, such as starting Vim as "vim -u NONE", with -C or with no .vimrc file in your home directory.

Edit:

This was a problem that was fixed in Vim 7.3.235 with the addition of the ; flag to 'cpoptions'. In earlier versions, Vim always behaves as described in dotancohen's question.

garyjohn
  • 36,494
2

As I recall this was a bug that has now been fixed.

It seems fixed in vim version 7.3.584

What version of vim are you using?

Bill

broomdodger
  • 3,200