edkolev/evil-goggles
Display visual hint on evil edit operations
{ "createdAt": "2017-04-12T14:34:09Z", "defaultBranch": "master", "description": "Display visual hint on evil edit operations", "fullName": "edkolev/evil-goggles", "homepage": null, "language": "Emacs Lisp", "name": "evil-goggles", "pushedAt": "2023-10-21T07:48:51Z", "stargazersCount": 228, "topics": [ "emacs" ], "updatedAt": "2025-11-15T19:44:01Z", "url": "https://github.com/edkolev/evil-goggles"}evil-goggles
Section titled “evil-goggles”
evil-goggles-mode displays a visual hint when editing with evil.
Preview
Section titled “Preview”





Enable (evil-goggles-mode), then edit text like you normally would,
try for example yy, p, dd in normal state.
Installation
Section titled “Installation”with use-package from NonGNU ELPA or MELPA
Section titled “with use-package from NonGNU ELPA or MELPA”(use-package evil-goggles :ensure t :config (evil-goggles-mode)
;; optionally use diff-mode's faces; as a result, deleted text ;; will be highlighed with `diff-removed` face which is typically ;; some red color (as defined by the color theme) ;; other faces such as `diff-added` will be used for other actions (evil-goggles-use-diff-faces))without use-package from NonGNU ELPA or MELPA
Section titled “without use-package from NonGNU ELPA or MELPA”M-x package-install RET evil-goggles RET, then add in init.el:
(evil-goggles-mode)
Actions with visual hint
Section titled “Actions with visual hint”edit actions with hint
Section titled “edit actions with hint”- delete
- change
- yank
- paste
- indent (
=operator) - join
- format (
gqoperator) - shift left and right (
>,<operators) - undo
- redo
- set mark
- start/stop macro recording
evil plugins with hint
Section titled “evil plugins with hint”- surround evil-surround
- commentary evil-commentary
- nerd-commenter evil-nerd-commenter
- replace with register evil-ReplaceWithRegister
- evil-org evil-org
Customizations
Section titled “Customizations”Appearance Customization
Section titled “Appearance Customization”- To pulse the visual hint, rather than just show and hide it:
(setq evil-goggles-pulse t) ;; default is to pulse when running in a graphic display- To change the default face:
(custom-set-faces '(evil-goggles-default-face ((t (:inherit 'highlight))))) ;; default is to inherit 'region;; run `M-x list-faces-display` in a fresh emacs to get a list of faces on your emacsBy default, all goggles’ faces inherit evil-goggles-default-face, which in turn inherits emacs’ region face.
- To use different faces per edit action:
(custom-set-faces '(evil-goggles-delete-face ((t (:inherit 'shadow)))) '(evil-goggles-paste-face ((t (:inherit 'lazy-highlight)))) '(evil-goggles-yank-face ((t (:inherit 'isearch-fail)))))- The following faces are defined by evil-goggles:
evil-goggles-default-face - inherits from `region` by default
evil-goggles-delete-face - this, and the others below, inherit from `evil-goggles-default-face`evil-goggles-change-faceevil-goggles-indent-faceevil-goggles-yank-faceevil-goggles-join-faceevil-goggles-fill-and-move-faceevil-goggles-paste-faceevil-goggles-shift-faceevil-goggles-surround-faceevil-goggles-commentary-faceevil-goggles-nerd-commenter-faceevil-goggles-replace-with-register-faceevil-goggles-set-marker-faceevil-goggles-undo-redo-add-faceevil-goggles-undo-redo-remove-faceevil-goggles-undo-redo-change-faceevil-goggles-record-macro-faceOther Customizations
Section titled “Other Customizations”- The duration of the overlay is configured with
evil-goggles-duration:
(setq evil-goggles-duration 0.100) ;; default is 0.200- For more fine grained duration configuration, these can be modified:
;; this variable affects "blocking" hints, for example when deleting - the hint is displayed,;; the deletion is delayed (blocked) until the hint disappers, then the hint is removed and the;; deletion executed; it makes sense to have this duration short(setq evil-goggles-blocking-duration 0.100) ;; default is nil, i.e. use `evil-goggles-duration'
;; this variable affects "async" hints, for example when indenting - the indentation;; is performed with the hint visible, i.e. the hint is displayed, the action (indent) is;; executed (asynchronous), then the hint is removed, highlighting the result of the indentation(setq evil-goggles-async-duration 0.900) ;; default is nil, i.e. use `evil-goggles-duration'- To disable the hint on certain actions modify these variable before
evil-goggles-modeis started:
;; to disable the hint when pasting:(setq evil-goggles-enable-paste nil)
;; list of all on/off variables, their default value is `t`:;;;; evil-goggles-enable-delete;; evil-goggles-enable-change;; evil-goggles-enable-indent;; evil-goggles-enable-yank;; evil-goggles-enable-join;; evil-goggles-enable-fill-and-move;; evil-goggles-enable-paste;; evil-goggles-enable-shift;; evil-goggles-enable-surround;; evil-goggles-enable-commentary;; evil-goggles-enable-nerd-commenter;; evil-goggles-enable-replace-with-register;; evil-goggles-enable-set-marker;; evil-goggles-enable-undo;; evil-goggles-enable-redo;; evil-goggles-enable-record-macroNEWS - Recent Significant Changes
Section titled “NEWS - Recent Significant Changes”- [Jul 01, 2018] Make async hint cleanup more robust
- [Jun 01, 2018] Refactor code to not use :around advice-s, which was a source of edge-case-issues
- [Feb 05, 2018] Show hint on start/stop macro recording
- [Dec 02, 2017] Pulsing hints is no longer experimental
- [Nov 03, 2017] Add options
evil-goggles-async-durationandevil-goggles-blocking-duration - [Sep 17, 2017] Add experimental support for pulsing hints (no longer experimental since Dec 02, 2017)
- [Sep 16, 2017] Support for undo/redo is no longer experimental
- [Sep 13, 2017] Emacs 24 support
- [Aug 02, 2017] Add experimental support for undo/redo (no longer experimental since Sep 16, 2017)
- [May 28, 2017] Switched to using per-action on/off custom variables, deprecated
evil-goggles-blacklist - [May 28, 2017] Switched to using custom faces per action, deprecated
evil-goggles-faces-alist