Created
January 27, 2015 22:10
-
-
Save pr00thmatic/f36a78c29214b5c51cb0 to your computer and use it in GitHub Desktop.
.emacs for global keystrokes C-c C-c comment-region and C-c C-u uncomment-region
This file contains hidden or 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
| (defun comment-marked-region () | |
| "comments the marked region, just like M-x comment-region" | |
| (interactive) | |
| (comment-region (mark) (point))) | |
| (defun uncomment-marked-region () | |
| "uncoments the marked region, just like M-x uncomment-region" | |
| (interactive) | |
| (uncomment-region-default (mark) (point))) | |
| (global-set-key "\C-c\C-c" 'comment-marked-region) | |
| (global-set-key "\C-c\C-u" 'uncomment-marked-region) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment