Mouse not working correctly when running vim in tmux


daisy

I am running vim in tmux,

When I try to select a text range in VIM, the mouse keeps resetting its position so I can only select one line (the last line where the mouse happens).

Does anyone know how to solve this problem?

Jason Voyan

You need to configure two settings for this to work.

  1. In your .vimrcaddition:

    set ttymouse=xterm2
    set mouse=a
    
  2. In your .tmux.confaddition:

    set -g mouse on
    

You'll then be able to use the mouse to select blocks of text, resize split windows, ...

Related


Mouse not working correctly when running vim in tmux

daisy I am running vim in tmux, When I try to select a text range in VIM, the mouse keeps resetting its position so I can only select one line (the last line where the mouse happens). Does anyone know how to solve this problem? Jason Voyan You need to configur

Mouse not working correctly when running vim in tmux

daisy I am running vim in tmux, When I try to select a text range in VIM, the mouse keeps resetting its position so I can only select one line (the last line where the mouse happens). Does anyone know how to solve this problem? Jason Voyan You need to configur

Keys are messed up in vim when running in tmux

Ivan I've been playing with tmux and I love it. However, I run into an annoying problem when running vim in it. The arrow keys are remapped in some way, but only at certain times, e.g. when starting Command-T, if I try to scroll down the file list, the command

Keys are messed up in vim when running in tmux

Ivan I've been playing with tmux and I love it. However, I run into an annoying problem when running vim in it. The arrow keys are remapped in some way, but only at certain times, e.g. when starting Command-T, if I try to scroll down the file list, the command

scroll with mouse in vim in tmux

aharris88 I have mouse scrolling turned on in vim and tmux, and I use iTerm 2 because it has mouse support. However, when I run vim inside tmux, I sometimes run into problems, tmux captures or steals scroll events from vim and I can scroll down in vim. That mi

scroll with mouse in vim in tmux

aharris88 I have mouse scrolling turned on in vim and tmux, and I use iTerm 2 because it has mouse support. However, when I run vim inside tmux, I sometimes run into problems, tmux captures or steals scroll events from vim and I can scroll down in vim. That mi

Vim not running in tmux

Bikin When I try to vimopen the file using the entire window , it tmuxfreezes. I have to kill windows with C-a &. Here is my ~/.vimrcsetup: :set autoindent :set ts=4 :set number :set shiftwidth=4 :set showmode :filetype on :filetype plugin on :syntax enable :s

Vim not running in tmux

Bikin When I try to vimopen the file using the entire window , it tmuxfreezes. I have to kill windows with C-a &. Here is my ~/.vimrcsetup: :set autoindent :set ts=4 :set number :set shiftwidth=4 :set showmode :filetype on :filetype plugin on :syntax enable :s

Vim requires .vimrc every time when running in tmux

Duncan Hall I made some changes to the .vimrcfile which included several vim-plug plugins, some syntax/color options and some keymaps. However, whenever I open a new Vim session, not all are applied (most notably coloring and syntax highlighting). If I run :so

How to make tmux apply options only when vim is not running?

Tropilio I would like to have an option in the tmux config file that can only be activated if vim is not running in the current panel/window. Specifically, the line is as follows: bind-key -n MouseDown2Pane run "tmux set-buffer \"$(xclip -o -sel primary)\"; tm

Vim requires .vimrc every time when running in tmux

Duncan Hall I made some changes to the .vimrcfile which included several vim-plug plugins, some syntax/color options and some keymaps. However, whenever I open a new Vim session, not all are applied (most notably coloring and syntax highlighting). If I run :so

Vim requires .vimrc every time when running in tmux

Duncan Hall I made some changes to the .vimrcfile which included several vim-plug plugins, some syntax/color options and some keymaps. However, whenever I open a new Vim session, not all are applied (most notably coloring and syntax highlighting). If I run :so

How to make tmux apply options only when vim is not running?

Tropilio I would like to have an option in the tmux config file that can only be activated if vim is not running in the current panel/window. Specifically, the line is as follows: bind-key -n MouseDown2Pane run "tmux set-buffer \"$(xclip -o -sel primary)\"; tm

How to make tmux apply options only when vim is not running?

Tropilio I would like to have an option in the tmux config file that can only be activated if vim is not running in the current panel/window. Specifically, the line is as follows: bind-key -n MouseDown2Pane run "tmux set-buffer \"$(xclip -o -sel primary)\"; tm

Vim requires .vimrc every time when running in tmux

Duncan Hall I made some changes to the .vimrcfile which included several vim-plug plugins, some syntax/color options and some keymaps. However, whenever I open a new Vim session, not all are applied (most notably coloring and syntax highlighting). If I run :so

Vim requires .vimrc every time when running in tmux

Duncan Hall I made some changes to the .vimrcfile which included several vim-plug plugins, some syntax/color options and some keymaps. However, whenever I open a new Vim session, not all are applied (most notably coloring and syntax highlighting). If I run :so

How to make tmux apply options only when vim is not running?

Tropilio I would like to have an option in the tmux config file that can only be activated if vim is not running in the current panel/window. Specifically, the line is as follows: bind-key -n MouseDown2Pane run "tmux set-buffer \"$(xclip -o -sel primary)\"; tm

How to make tmux apply options only when vim is not running?

Tropilio I would like to have an option in the tmux config file that can only be activated if vim is not running in the current panel/window. Specifically, the line is as follows: bind-key -n MouseDown2Pane run "tmux set-buffer \"$(xclip -o -sel primary)\"; tm

Mouse scrolling in vim via tmux, how to configure?

have I am using a combination of PuTTY, tmux and vim. If I just open an SSH connection to PuTTY, and then open vim, mouse scrolling works as expected. However, if I open tmux and then vim in tmux, the scrolling only works partially, meaning I can scroll down a

Mouse scrolling in vim via tmux, how to configure?

Have I am using a combination of PuTTY, tmux and vim. If I just open an SSH connection to PuTTY, and then open vim, mouse scrolling works as expected. However, if I open tmux and then vim in tmux, the scrolling only works partially, meaning I can scroll down a

Mouse scrolls down in vim inside tmux via PuTTY, but not up

Dmitri DB I'm having issues with multiple platforms, when using vim in a tmux session in PuTTY, scrolling down with the mouse wheel works fine, but not up. Any ideas? Maybe that can fix some putty issues (specifically, I'm using PuTTYTray, but this seems to ha