Skip to content

Instantly share code, notes, and snippets.

@edw
Created April 4, 2019 12:03
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 edw/0b54ae6f53279188173961b88f836343 to your computer and use it in GitHub Desktop.
Save edw/0b54ae6f53279188173961b88f836343 to your computer and use it in GitHub Desktop.
Recent Emacs Dotfile Finds
(add-hook 'before-save-hook 'whitespace-cleanup)
(defun smart-open-line-above ()
"Insert an empty line above the current line.
Position the cursor at it's beginning, according to the current mode."
(interactive)
(move-beginning-of-line nil)
(newline-and-indent)
(forward-line -1)
(indent-according-to-mode))
(global-set-key [(control shift return)] 'smart-open-line-above)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment