edkolev / Evil Goggles
Display visual hint on evil edit operations
Stars: ✭ 159
Labels
Projects that are alternatives of or similar to Evil Goggles
Writingwithemacs
Tips, Examples, and Resources for Writing with Emacs
Stars: ✭ 150 (-5.66%)
Mutual labels: emacs
Webmacs
webmacs - keyboard driven (emacs key bindings) browser, https://webmacs.readthedocs.io/en/latest/
Stars: ✭ 145 (-8.81%)
Mutual labels: emacs
String Inflection
underscore -> UPCASE -> CamelCase conversion of names
Stars: ✭ 157 (-1.26%)
Mutual labels: emacs
Org Msg
OrgMsg is a GNU/Emacs global minor mode mixing up Org mode and Message mode to compose and reply to emails in a Outlook HTML friendly style.
Stars: ✭ 153 (-3.77%)
Mutual labels: emacs
Emacs Bootstrap
Your on-the-fly Emacs development environment.
Stars: ✭ 147 (-7.55%)
Mutual labels: emacs
Swiper
Ivy - a generic completion frontend for Emacs, Swiper - isearch with an overview, and more. Oh, man!
Stars: ✭ 1,948 (+1125.16%)
Mutual labels: emacs
Linum Relative
display relative line number in the left margin in emacs
Stars: ✭ 152 (-4.4%)
Mutual labels: emacs
Emacs4cl
A 40 line ~/.emacs to quickly set up vanilla Emacs for Common Lisp programming
Stars: ✭ 151 (-5.03%)
Mutual labels: emacs
evil-goggles
evil-goggles-mode
displays a visual hint when editing with evil.
Preview
Usage
Enable (evil-goggles-mode)
, then edit text like you normally would,
try for example yy
, p
, dd
in normal state.
Installation
use-package from Melpa
with(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))
use-package from Melpa
withoutM-x package-install RET evil-goggles RET
, then add in init.el
:
(evil-goggles-mode)
Actions with visual hint
edit actions with hint
- delete
- change
- yank
- paste
- indent (
=
operator) - join
- format (
gq
operator) - shift left and right (
>
,<
operators) - undo
- redo
- set mark
- start/stop macro recording
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
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 emacs
By 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-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-nerd-commenter-face
evil-goggles-replace-with-register-face
evil-goggles-set-marker-face
evil-goggles-undo-redo-add-face
evil-goggles-undo-redo-remove-face
evil-goggles-undo-redo-change-face
evil-goggles-record-macro-face
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-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-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-macro
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-duration
andevil-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
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].