My .vimrc
has the following lines
set mouse=a
map <ScrollWheelUp> <C-Y>
map <ScrollWheelDown> <C-E>
But when I scroll up using the mouse wheel, I'd get the text above Vim. For example, I'd get my terminal session text if I'd just started Vim. I'm initially experimenting with the mouse scroll wheel on help files, then move on to other files, hence the a
option.
What else do I need to set? I'm using Snow Leopard and Vim 7.3 inside a Terminal.
Here, I just did a wheel up. See the Terminal session at the top.
mouse=<mode>
as mentioned below, but when vim sets the terminal in window mode (sorry if that's not the correct terminology) some terms retain past history while others hide it and scroll within the window, mimicking vim's behavior. I think that's a terminal emulator issue though, but vim 8.1 apparently has some workaround - https://mcmap.net/q/238559/-how-do-i-scroll-through-a-terminal-using-vim-8-1-39-s-new-terminal-termpack-support-closed/969196 (I already use CTRL-Z for that though...) – Kaikaia