Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save andrewgiessel/392bea1eac057679f84e79a9e262eca5 to your computer and use it in GitHub Desktop.
Save andrewgiessel/392bea1eac057679f84e79a9e262eca5 to your computer and use it in GitHub Desktop.
.emacs for mouse mode over ssh
;; mouse stuff
(xterm-mouse-mode)
(defvar alternating-scroll-down-next t)
(defvar alternating-scroll-up-next t)
(defun alternating-scroll-down-line ()
(interactive "@")
(when alternating-scroll-down-next
; (run-hook-with-args 'window-scroll-functions )
(scroll-down-line 5))
(setq alternating-scroll-down-next (not alternating-scroll-down-next)))
(defun alternating-scroll-up-line ()
(interactive "@")
(when alternating-scroll-up-next
; (run-hook-with-args 'window-scroll-functions)
(scroll-up-line 5))
(setq alternating-scroll-up-next (not alternating-scroll-up-next)))
(global-set-key (kbd "<mouse-4>") 'alternating-scroll-down-line)
(global-set-key (kbd "<mouse-5>") 'alternating-scroll-up-line)
(defun track-mouse (e))
(setq mouse-sel-mode t)
(setq mouse-wheel-follow-mouse 't)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment