Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The problem with ; is that it doesn't work with t. It just leaves the cursor in the same place, because that's exactly what your t command would do if you typed it again.

It's now some years since I used vim regularly but I recall this regularly annoying me when trying to create visual selections. For example, I'd do "vt," (or whatever) expecting the selection to extend to a given point, and then find myself stuck at a , that I hadn't noticed. And then I'd have to move the cursor by hand to fix things, just like you would in some ordinary text editor.



That's odd. With my configuration I can use ; with t and it will skip over an occurrence of the target if it is the next character, like it seems you expect it to behave. I don't know if this has been fixed/improved in Vim itself or by some plugin that I use, but it does seem to be fixed now.


In vim, the β€˜new’ behaviour (skipping the target if there would be no motion) is the default, and the original vi behaviour can be selected using cpoptions; see

  :help cpo-;




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: