Skip to content
vic

gridaphobe/evil-god-state.json
{
"createdAt": "2014-05-04T14:52:06Z",
"defaultBranch": "master",
"description": null,
"fullName": "gridaphobe/evil-god-state",
"homepage": "",
"language": "Emacs Lisp",
"name": "evil-god-state",
"pushedAt": "2020-04-04T00:16:23Z",
"stargazersCount": 56,
"topics": [],
"updatedAt": "2025-07-18T13:33:00Z",
"url": "https://github.com/gridaphobe/evil-god-state"
}

This is an [evil-mode][] state for using [god-mode][].

It provides a command evil-execute-in-god-state that switches to god-mode for the next command. I bind it to ,

(evil-define-key 'normal global-map "," 'evil-execute-in-god-state)

for an automatically-configured leader key.

Since evil-god-state includes an indicator in the mode-line, you may want to use diminish to keep your mode-line uncluttered, e.g.

(add-hook 'evil-god-state-entry-hook (lambda () (diminish 'god-local-mode)))
(add-hook 'evil-god-state-exit-hook (lambda () (diminish-undo 'god-local-mode)))

It’s handy to be able to abort a `evil-god-state’ command. The following will make the key unconditionally exit evil-god-state.

(evil-define-key 'god global-map [escape] 'evil-god-state-bail)

[evil-mode] !: https://gitorious.org/evil/ [god-mode] !: https://github.com/chrisdone/god-mode