Search code examples
vimmodetext-cursor

Vim cursor going outside of character bounds in normal mode


Some setting changed on my vim. In normal mode, I can now click anywhere and my cursor will go there. (This is in normal mode.)

The behavior used to be that if I clicked past the end of the line, the cursor would go to the last character of the line.

I hope I've explained this sufficiently, but is there a way to get the old behavior back?

Thanks!


Solution

  • You probably set the option virtualedit somewhere. To turn it off for the instance you can use :set virtualedit=. Or to permanently disable it remove it from your vimrc.