Skip to content

Instantly share code, notes, and snippets.

@Arnot
Created September 18, 2017 08:36
Show Gist options
  • Save Arnot/cc6334fd0161d209adbbed6a01800576 to your computer and use it in GitHub Desktop.
Save Arnot/cc6334fd0161d209adbbed6a01800576 to your computer and use it in GitHub Desktop.
(defun my/move-to-middle ()
(interactive)
(let* ((begin (line-beginning-position))
(end (line-end-position))
(middle (+ begin (/ (- end begin) 2))))
(goto-char middle)))
(global-set-key (kbd "C-c m") 'my/move-to-middle)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment