For example, when outside of Vim, I can select text then press cmd+c to copy text. But when I am inside of Vim, I can no longer do that because the mouse interacts with Vim.

Is there some way to get the Terminal selection ability back?

For example, in iTerm, this can be done by holding down the alt key, which causes the mouse to stop interacting with Vim, and to highlight text inside the terminal without caring that Vim is running.

  • Why not do :set mouse=all and then you don't have to worry about whether the mouse is handled by vim or your terminal? – DJMcMayhem Feb 1 '17 at 22:34
  • @DJMcMayhem, I'm not sure what do you mean. First of all, :set mouse=all results in E539: Illegal character <l> for me, but I assume you mean :set mouse=a. Then, Vim behaves as @trusktr explains, and he wants to stop that. :set mouse= does the trick (as I wrote in my answer). – Dmitry Frank Feb 1 '17 at 22:53
  • @DmitryFrank Ah, that was just a typo. – DJMcMayhem Feb 1 '17 at 22:54

I do this:

:set mouse=

And Vim stops handling mouse. If you want Vim to start handling it again:

:set mouse=a

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.