Vim can't scroll in iTerm2

My vim cannot scroll in iTerm2, even set mouse=a added to the .vimrc file.

Inside tmux, however, the vim scroll function works correctly.

What happened to my vim?

+7
vim iterm2
source share
1 answer

Recent versions of vim support the SGR protocol, you can add below code to your .vimrc:

 set mouse=a if has("mouse_sgr") set ttymouse=sgr else set ttymouse=xterm2 end 
+24
source share

All Articles