6

Ok, have a very specific setup question. I'm using Mac OS X, iTerm, and vim. I really like using my mouse for clicking tabs in normal mode, scrolling in normal mode etc. (e.g. I already have the mouse working within iTerm/vim).

However, I dislike using visual mode for selecting. I just want to use OS X selection not vim's visual select. The next logical step? Disable visual selection in the mouse options:

set mouse=nicr

The problem with this is that when I try to select (using the mouse) vim intercepts the mouse click and doesn't allow me to select at all!

Anyone know how deal with this issue? It feels like its solvable if one knew the proper character/control codes (which I obviously do not).

Goal: use the mouse in vim for everything except "select". Let iTerm/OS do the selection.

Nate Murray
  • 3,841
  • 5
  • 32
  • 33

1 Answers1

11

I don't have a Mac, but under Linux holding Shift while highlighting allows you to use the mouse to copy with the mouse settings you mentioned.

See the "Note:" in :h mouse

Randy Morris
  • 39,631
  • 8
  • 69
  • 76
  • 11
    rson, thanks for you response. On my mac the correct key is alt/option. That works perfectly, thanks so much! (It seems so obvious now...) – Nate Murray Aug 14 '09 at 13:48
  • Thanks! Now, if only there was a way to block select in iTerm (otherwise you are also selecting line numbers, which is annoying). – Chris May 31 '12 at 22:25
  • This answer helped me figure out how to send a right-click to an ncurses program (XaoS) running in iTerm2: when using XaoS with the aalib driver on a Macbook, clicking on the trackpad zooms in and SHIFT+two-finger click on the trackpad zooms out! Awesome! – Bill Agee Jun 10 '12 at 17:58
  • Thanks. The alt works great. But meanwhile, all my vims work perfectly (fedora, debian, etc) but I can't work with my slackware vim. Weird! -- in fact, set mouse= without options does what I want. I do not use mouse for anything on vim. – Alberto Aug 21 '14 at 14:27