5 ms·
Native scrolling and iTerm2
- sdrothrock 13y agoNice! 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 13y ago"set mouse=a" works better
- sdrothrock 13y agoI have that set... and that's what I meant to copy/paste instead of wrapped line navigation. Oops.
- markus2012 13y agoThank 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 13y agoHmm, I always had scrolling with iTerm2, even with vim, weechat, htop, etc
- swift 13y agoYup, same here. Just tested it. I don't understand what's new here; can anyone explain?
- nieve 13y agoThis 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.
- diroussel 13y agoMouse wheel scolling works in vim, less etc when using Mintty and cygwin on windows. Worked out of the box.
- clarkm 13y agoYeah, but getting everything to place nicely while inside tmux is a bit of a challenge, especially if you want to have proper clipboard support.
- Watabou 13y agoI do run tmux and don't have any problems. For clipboard support, I just use reattach-to-user-namespace.
- nasalgoat 13y agoDoes iTerm2 support the old bookmark system from iTerm yet? I'd love to upgrade but that's essential to my workflow.