Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running VIM in tmux,

When I'm try to select a range of texts in VIM, the mouse kept resetting its position, thus I can only select one line (the last line where mouse occurs).

Does anyone know how to solve this?

share|improve this question
up vote 4 down vote accepted

There are two settings that you need to configure for this to work.

  1. In your .vimrc add set mouse=a
  2. In your tmux.conf add set -g mode-mouse on

You will then be able to use the mouse to select blocks of text.

share|improve this answer
Hmm, mouse is slower in tmux, I can feel that, but it works anyway – warl0ck Oct 13 '12 at 0:29
Try to set ttymouse=xterm2 in your vimrc. For my setup (urxvt-unicode, tmux) it vastly improved the speed and responsiveness of mouse selecting in vim/tmux. – imbaer Aug 15 '14 at 12:04
@imbaer Thanks, the mouse did not work at all in vim until I set that var as well. – Matthew Jul 30 '15 at 18:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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