Created
October 22, 2013 14:14
-
-
Save Pitometsu/7101488 to your computer and use it in GitHub Desktop.
postfix whitespace
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
;; insert postfix whitespace | |
(defun insert-postfix-whitespace () | |
"Just insert SPC symbol next to point." | |
(interactive) | |
(save-excursion | |
(insert ?\s) | |
(backward-char))) | |
;; whitespace next to cursor | |
(global-set-key (kbd "S-SPC") 'insert-postfix-whitespace) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You don't have to do
backward-char
, sincesave-excursion
will take you back to your original position anyway. :)I'm adding this to my .emacs.d and seeing how I like it. Thanks for the tip!