Created
January 29, 2014 10:35
-
-
Save rberenguel/8685391 to your computer and use it in GitHub Desktop.
Defining an operator in evil is easy. Example: evil-capitalise (bound to gc, then followed by a motion or text object)
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
(evil-define-operator evil-capitalise (beg end type) | |
"Convert text to lower case." | |
(if (eq type 'block) | |
(evil-apply-on-block #'evil-capitalise beg end nil) | |
(capitalize-region beg end))) | |
(define-key evil-normal-state-map "gc" 'evil-capitalise) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment