Last active
December 15, 2015 14:29
-
-
Save EricCrosson/54cb70705fd64d9e67d6 to your computer and use it in GitHub Desktop.
Some defuns to insert pairs of useful programming delimeters.
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
(define-key global-map (kbd "C-M-j") | |
(defun insert-surrounding-parentheses (&optional arg) | |
(interactive "p") | |
(dotimes (i arg) (insert "()") | |
(backward-char 1)))) | |
(define-key global-map (kbd "C-M-k") | |
(defun insert-surrounding-braces (&optional arg) | |
(interactive "p") | |
(dotimes (i arg) (insert "{}") | |
(backward-char 1)))) | |
(define-key global-map (kbd "C-M-l") | |
(defun insert-surrounding-brackets (&optional arg) | |
(interactive "p") | |
(dotimes (i arg) (insert "[]") | |
(backward-char 1)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment