Giter Club home page Giter Club logo

volatile-highlights.el's Introduction

volatile-highlights.el — Minor mode for visual feedback on some operations.

OVERVIEW

This library provides minor mode volatile-highlights-mode, which brings visual feedback to some operations by highlighting portions relating to the operations.

All of highlights made by this library will be removed when any new operation is executed.

INSTALLING

To install this library, save the file “volatile-highlights.el” to a directory in your load-path (you can view the current load-path using C-h v load-path <RET> within Emacs), then add following lines to your .emacs start up file:

(require 'volatile-highlights)
(volatile-highlights-mode t)

USING

To toggle volatile highlighting, type:

M-x volatile-highlights-mode <RET>

While this minor mode is on, a string `VHL’ will be displayed on the modeline.

Currently, operations listed below will be highlighted While the minor mode `volatile-highlights-mode’ is on:

undo
Volatile highlights will be put on the text inserted by undo.
yank and yank-pop
Volatile highlights will be put on the text inserted by yank’ or yank-pop.
kill-region, kill-line, any other killing function
Volatile highlights will be put at the positions where the killed text used to be.
delete-region
Same as kill-region, but not as reliable since delete-region is an inline function.
find-tag
Volatile highlights will be put on the tag name which was found by find-tag.
occur-mode-goto-occurrence and occur-mode-display-occurrence
Volatile highlights will be put on the occurrence which is selected by occur-mode-goto-occurrence or occur-mode-display-occurrence.
Non incremental search operations
Volatile highlights will be put on the the text found by commands listed below:
nonincremental-search-forward
nonincremental-search-backward
nonincremental-re-search-forward
nonincremental-re-search-backward
nonincremental-repeat-search-forward
nonincremental-repeat-search-backward
    

Highlighting support for each operations can be turned on/off individually via customization. Also check out the customization group by:

M-x customize-group RET volatile-highlights RET

EXAMPLE SNIPPETS FOR USING VOLATILE HIGHLIGHTS WITH OTHER PACKAGES

vip

;;-----------------------------------------------------------------------------
;; Supporting vip-mode.
;;-----------------------------------------------------------------------------
(vhl/define-extension 'vip 'vip-yank)
(vhl/install-extension 'vip)

evil

;;-----------------------------------------------------------------------------
;; Supporting evil-mode.
;;-----------------------------------------------------------------------------
(vhl/define-extension 'evil 'evil-paste-after 'evil-paste-before
                      'evil-paste-pop 'evil-move)
(vhl/install-extension 'evil)

undo-tree

;;-----------------------------------------------------------------------------
;; Supporting undo-tree.
;;-----------------------------------------------------------------------------
(vhl/define-extension 'undo-tree 'undo-tree-yank 'undo-tree-move)
(vhl/install-extension 'undo-tree)

volatile-highlights.el's People

Contributors

k-talo avatar darwinawardwinner avatar zonuexe avatar

Watchers

James Cloos avatar Tadeusz Kurpiel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.