I’ve been getting used to Vim/MacVim for the last few weeks. One of main problems I seem to be having is when I scroll around using the mouse (especially when I’m trying to select large portions of text) the text insertion cursor moves too and doesn’t stay where it was (like in TextMate for example). This means I’ve selected a large piece of text, when I scroll back up to review my selection the cursor will move which messes with the selection that I’ve made.
I do realise I should get used to text selection with visual mode, and I am one bit of a time, but sometimes it’s the best tool to use the mouse.
Is there a way of fixing this behaviour?
:help scrollingtells you:So basically I would say that it is not possible to leave the cursor where it was when you are scrolling. The cursor is always visible in your window, and therefore your visual selection will extend.
Probably you would like to
xnoremap <ScrollWheelUp> <esc><ScrollWheelUp>and same for ScrollWheelDown. Use thengvto restore your selection.