Skip to content

Instantly share code, notes, and snippets.

@baron
Created December 20, 2010 04:18
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save baron/748007 to your computer and use it in GitHub Desktop.
(defun point-to-middle ()
"Put cursor on middle line of window"
(interactive)
(let ((win-height (if (> (count-screen-lines) (window-height))
(window-height)
(count-screen-lines))))
(move-to-window-line (/ win-height 2))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment