My vim cannot scroll in iTerm2, even set mouse=a added to the .vimrc file.
set mouse=a
.vimrc
Inside tmux, however, the vim scroll function works correctly.
What happened to my vim?
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