![]() My advice to you would be to switch to macvim ( brew install macvim) which installs a gui frontend for vim. So when you're using the option key to be able to select even though the running app has control of the cursor, this is a hack on the terminal emulator ( iTerm2 in your case) to get the behaviour you're actually expecting. It's what happens when you set mouse=a: you change your terminal capabilities to tell that all mouse events are directed to the running application, so then it's up to vim to bind or not the actions (such as scrolling, selecting, pasting etc.). But sometimes, an application requests control of the terminal capabilities to be able to bind mouse events to do "stuff". Your terminal on "normal" conditions, handles the mouse and the command line application doesn't know anything about that. ![]() So I'll try to give my thought on that, and I hope for you that I'm wrong. Short answer: I believe it's not possible!īut it is usually hard to prove the absence of an answer. For example, default to the behavior that is accomplished by holding down alt/option and enable the visual mode behavior when I want it with a key.but oh well, this is good enough. And if I really want better selection ergonomics I can hold down alt/option and get the original iTerm2 selection behavior. Now if I'm willing to put up with not seeing my highlight in progress as a select text then I can at least still get it in the clipboard by yanking it after visual-mode selection. I needed to recompile vim so that +clipboard is enabled: brew install vim Thanks to the suggestions in the comments I was able to get a bit closer. I would really like not to need to hold down the option key every time I select. Thanks to this post I realized I can get almost the behavior I want by holding down the option key, but this is rather tedious. Which prevents the text from getting highlighted when I try and select, but it also prevents iTerm2 from highlighting text. ![]() Is there a way to allow mouse/trackpad-based scrolling in vim without using the mouse for visual-mode text selection? Now when I select text it's very slow to highlight (only highlighting after the highlight dragging is complete) and the highlighted text is not automatically copied into my clipboard, as it used to be when using iTerm2 to select. Which I love for scrolling but is awful for highlighting text. I recently enabled mouse mode in vim: set mouse=a
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |