Skip to content

yilin-zhang/lazy-revert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Lazy Revert

Introduction

Lazy Revert is a very simple package that provides an alternative auto-revert solution extracted from Doom Emacs.

It only reverts visible buffers when the user: a. saves a file b. switches to a buffer (or its window) c. focuses Emacs (after using another program)

Thank @hlissner for the original implementation.

Installation

An example of using use-package and quelpa:

(use-package lazy-revert
  :ensure nil
  :quelpa (lazy-revert :fetcher github
                       :repo "yilin-zhang/lazy-revert")
  :hook (after-init . lazy-revert-mode)
  ;; Optional
  :config
  (setq auto-revert-verbose t ; let us know when it happens
        auto-revert-use-notify nil
        auto-revert-stop-on-user-input nil
        ;; Only prompts for confirmation when buffer is unsaved.
        revert-without-query (list ".")))

Usage

Make sure you have global-auto-revert-mode and auto-revert-mode disabled, then simply enable lazy-revert-mode, which is a global minor mode.

About

🕰️ A more efficient auto-revert

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published