I can use the mouse to highlight, copy and paste text in VIM. So clearly VIM is aware of the mouse. As such it must be possible to get it to put the cursor where the mouse pointer is. Does anybody know how? This could remedy the biggest shortcoming of VIM.
I assume you're using Vim in a terminal?
The way the mouse works in a terminal is kinda weird: by default, it's the terminal that handles the mouse and Vim never sees anything. Because it's all text-based this actually works reasonably well: you can select, copy, paste, etc. But this is all on the terminal level, rather than the application (Vim) level.
One of the effects of this is that the text displayed is copied as-is; for example if you use
set list then the list characters will be copied as well, as the terminal has no way of knowing they're not actual characters not present in the text file. Depending on what you want to do, this can be either a good or bad thing.
Vim can be made "mouse-aware" with the
mouse setting; using
set mouse=a enables it everywhere, but there's some more finer-grained controls for it if you want (see