
Native scrolling and iTerm2 - FiloSottile
http://filippo.io/native-scrolling-and-iterm2/
======
sdrothrock
Nice! Until now I've been using

    
    
        imap <silent> <Down> <C-o>gj
        imap <silent> <Up> <C-o>gk
        nmap <silent> <Down> gj
        nmap <silent> <Up> gk
    

in my .vimrc to give me mousewheel scrolling in vim.

The advantage of putting it in my .vimrc is that I have mousewheel scrolling
on the server no matter what computer I log in from.

The disadvantage is that I'm locked into vim and it won't work for someone
using, say, emacs.

~~~
weslly
"set mouse=a" works better

~~~
markus2012
Thank you for posting that. I can now use my mouse wheel on my mac to scroll
through documents in vim.

I can also SSH into a Linux box from my mac and the mouse wheel works in the
same way.

------
Watabou
Hmm, I always had scrolling with iTerm2, even with vim, weechat, htop, etc

~~~
swift
Yup, same here. Just tested it. I don't understand what's new here; can anyone
explain?

~~~
nieve
This is for applications that put the terminal into a specific mode (or modes)
that don't work. The example given in the patch linked to is man, but really
it seems to be an issue with most pagers. What the patch does is hook into
that mode being set and start translating mouse scroll events to arrow key
events. The easiest way to see the problem is to run "man man" and try to
scroll up, then scroll down. Up looks like it works because iTerm is saving
that output, but scrolling down doesn't. If you do something like "less +200
rfc1918.txt" to start in the middle of the file you'll find that you can't
scroll up either.

------
nasalgoat
Does iTerm2 support the old bookmark system from iTerm yet? I'd love to
upgrade but that's essential to my workflow.

