Brad Fitzpatrick (brad) wrote,
Brad Fitzpatrick
brad

Mousewheel in emacs!

OMG how did I forgot to post about this!?! I figured out how to get my wheel mouse working in emacs.... yay for info pages!

Put this in your ~/.emacs file:

(fset 'scroll-up-lines
   "\C-u2\C-[xscroll-up\C-m")
(fset 'scroll-down-lines
   "\C-u2\C-[xscroll-down\C-m")
(global-set-key [mouse-5] 'scroll-up-lines)
(global-set-key [mouse-4] 'scroll-down-lines)


Bad. Ass.

I tried getting it to focus the buffer it was over instead of having to click once (when you have a window split) but couldn't quite figure it out. I'll keep working on it in my copius copious free time.
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 10 comments