I recently turned on mouse mode in vim:
set mouse=a
I love to scroll, but terribly highlight the text. I am using vim in iTerm2 on Mac. Now, when I select the text, it is very slowly selected (it is selected only after dragging and dropping the selection), and the selected text is not automatically copied to my clipboard, as it was when using iTerm2 to select.
Is there a way to enable mouse or trackpad scrolling in vim without using the mouse to select text in visual display mode?
I tried:
set mouse=n
This prevents text from being highlighted when you try and select, but also prevents iTerm2 text from being highlighted.
Update:
Thanks to this post, I realized that I can achieve almost what I want by holding the option key, but this is pretty tedious. I would really like not to hold down the select key every time I select. Thoughts?
Update2:
Thanks to the suggestions in the comments, I managed to get closer. I needed to recompile vim so that +clipboard was turned on:
brew install vim
Now, if Iβm ready to put up with the fact that I donβt perform selection as selected text, I can at least still get it to the clipboard by pulling it out after choosing the visual mode. And if I really need a better ergonomics of choice, I can hold on to the alt/option and get the original iTerm2 choice behavior.
I would like to change these modes. For example, by default, the behavior that is executed is by holding down the alt/option and activating the behavior of the visual mode when I want it using the key ... but, oh, well, that's good enough.
source share