Created
July 14, 2016 18:57
-
-
Save andrewgiessel/392bea1eac057679f84e79a9e262eca5 to your computer and use it in GitHub Desktop.
.emacs for mouse mode over ssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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