Skip to content

Staying in evil-god-state #5

@duplode

Description

@duplode

A minor issue I had been having with evil-god-state was that evil-execute-in-god-state doesn't sem to handle prefix arguments, and so I found no way to use it for Intero's C-u C-c C-t. The workaround I eventually found was setting up a key that in effect, swaps evil-normal-state and evil-god-state (personally, I chose ç because it is an extra key in a nice part of my keyboard):

(evil-define-key 'normal global-map "ç" 'evil-god-state)
;; This is still useful...
(evil-define-key 'normal global-map "," 'evil-execute-in-god-state)
;; ... but we can also have its counterpart.
(evil-define-key 'god global-map "," 'evil-execute-in-normal-state)
;; Bailing out works fine.
;; I could have used "ç" for that too, but I don't want to lose "C-ç" in god-mode.
(evil-define-key 'god global-map [escape] 'evil-god-state-bail)

If this is indeed a good idea, I feel it might be worth mentioning it in the readme. I would send a patch to the readme myself, except that I have only been using Emacs for a few days, and so I'm not sure if what I'm pointing out is so obvious that it doesn't need to be mentioned, or if there is a better way to do it than what I have shown just above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions