Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

1 Answer 1

up vote 3 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

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.