Skip to content

Instantly share code, notes, and snippets.

@punchagan
Created October 5, 2012 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save punchagan/3839995 to your computer and use it in GitHub Desktop.
Save punchagan/3839995 to your computer and use it in GitHub Desktop.
Normal scrolling for emacs
(defun bhanu/scroll-up (&optional num)
"Scroll up num number of lines."
(interactive "p")
(scroll-down num)
(previous-line num))
(defun bhanu/scroll-down (&optional num)
"Scroll down num number of lines."
(interactive "p")
(scroll-up num)
(next-line num))
(global-set-key (kbd "C-v") (lambda () (interactive) (bhanu/scroll-up 3)))
(global-set-key (kbd "M-v") (lambda () (interactive) (bhanu/scroll-down 3)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment