Skip to content

Dickby/evil-goggles

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status MELPA

evil-goggles

evil-goggles

evil-goggles-mode displays a visual hint when editing with evil.

Preview

yank-paste-delete

change

join-lines

indent-region

fast-replace

Installation

with use-package from 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 Melpa

M-x package-install RET evil-goggles RET, then add in init.el:

(evil-goggles-mode)

Actions with visual hint

edit actions with hint

  • delete
  • yank
  • paste
  • indent (= operator)
  • join
  • format (gq operator)
  • shift left and right (>, < operators)

evil plugins with hint

Customizations

Appearance Customization

By default, all goggles' faces inherit evil-goggles-default-face, which in turn inherits emacs' region face.

  • 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 emacs
  • 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-indent-face
evil-goggles-yank-face
evil-goggles-join-face
evil-goggles-fill-and-move-face
evil-goggles-paste-face
evil-goggles-shift-face
evil-goggles-surround-face
evil-goggles-commentary-face
evil-goggles-replace-with-register-face
evil-goggles-set-marker-face

Other Customizations

  • The duration of the overlay is configured with evil-goggles-duration:
(setq evil-goggles-duration 0.100) ;; default is 0.200
  • To disable the hint on certain actions modify these variable before evil-goggles-mode is 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-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-replace-with-register
;; evil-goggles-enable-set-marker

Recent Significant Changes

  • [May 28, 2017] Switched to using custom faces per action, deprecated evil-goggles-faces-alist
  • [May 28, 2017] Switched to using per-action on/off custom variables, deprecated evil-goggles-blacklist

About

Display visual hint on evil edit operations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 98.8%
  • Makefile 1.2%