Created
August 13, 2024 13:09
-
-
Save jamescherti/2aa95dc674ba024114d25824ddef8d7b to your computer and use it in GitHub Desktop.
Emacs Evil: Comment or uncomment line or visual selection
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
| ;; Description: Emacs Evil: Comment or uncomment line or visual selection | |
| ;; Gits URL: https://gist.github.com/jamescherti/2aa95dc674ba024114d25824ddef8d7b | |
| ;; License: MIT | |
| (with-eval-after-load "evil" | |
| (evil-define-operator my-evil-comment-or-uncomment (beg end) | |
| "Toggle comment for the region between BEG and END." | |
| (interactive "<r>") | |
| (comment-or-uncomment-region beg end)) | |
| (evil-define-key 'normal 'global (kbd "gc") 'my-evil-comment-or-uncomment)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment