screenshots and auto-revert-mode
This commit is contained in:
parent
98ecc679e3
commit
233c775505
5 changed files with 24 additions and 4 deletions
26
README.md
26
README.md
|
|
@ -1,12 +1,12 @@
|
|||
# minmo
|
||||
|
||||
`minmo` is a (min)imal (mo)de-line with aggressive caching and tight semantics.
|
||||
`minmo` is a (min)imal (mo)de-line with `O(1)` git and disk status via aggressive caching and tight semantics.
|
||||
|
||||
This package exists because I wasn't satisfied either with emacs defaults nor any of the more elaborate alternatives.
|
||||
|
||||
Unfortunately the builtin `vc` package tries much too hard to be compatible with obsolete version control systems no one uses, and as a result has poor performance and more limited functionality than if it consolidated on git. `minmo` addresses these problems:
|
||||
|
||||
1. `auto-revert-check-vc-info` calls `git status` on *all open vc-enabled buffers*, regardless of their display status. Even on modern hardware, there's a noticeable lag above about 100 open files. `minmo` uses various hooks and the `minmo-git-cache-timer-interval` to update git status only for *visible* buffers, e.g. when calling `switch-to-buffer` or `find-file`.
|
||||
1. `auto-revert-check-vc-info` calls `git status` on *all open vc-enabled buffers*, regardless of their display status: essentially `O(N)` cost. Even on modern hardware, there's a noticeable lag above about 100 open files. `minmo` uses various hooks and the `minmo-git-cache-timer-interval` to update git status only for *visible* buffers, e.g. when calling `switch-to-buffer` or `find-file`.
|
||||
|
||||
2. The `vc-mode` string reports a generic status designed before the existence of git: namely it doesn't report staged status. Moreover the status strings are clunky and difficult to change.
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ Both timers can be disabled by setting those intervals to nil, if you want even
|
|||
|
||||
## install
|
||||
|
||||
```
|
||||
```elisp
|
||||
(use-package minmo
|
||||
:vc (:url "https://git.bth.moi/bth/minmo" :rev :newest))
|
||||
```
|
||||
|
|
@ -44,6 +44,14 @@ bottom ◱◲ : modified/untracked : unready
|
|||
|
||||
After a while, you may find them intuitive. But all of this can be changed easily by redefining `minmo-status-alist`. Just copy the default and change strings and faces as you like.
|
||||
|
||||
## screenshots
|
||||
|
||||
In my own theme, `modus-vivendi`, and `solaris-dark`:
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## mode-line-format
|
||||
|
||||
`minmo` sets `mode-line-format` to provide:
|
||||
|
|
@ -62,7 +70,7 @@ But `mode-line-format` can easily be set as you wish, using the default as a sta
|
|||
|
||||
If you wanted an even more minimal mode-line, eval something like this:
|
||||
|
||||
```
|
||||
```elisp
|
||||
(setq-default
|
||||
mode-line-format
|
||||
(list
|
||||
|
|
@ -71,3 +79,13 @@ If you wanted an even more minimal mode-line, eval something like this:
|
|||
'(:eval (minmo-disk-status))
|
||||
))
|
||||
```
|
||||
|
||||
## auto-revert-mode
|
||||
|
||||
`global-auto-revert-mode` can still be enabled, but I recommend the following when using `minmo` to avoid unnecesary polling:
|
||||
|
||||
```elisp
|
||||
(setopt auto-revert-check-vc-info nil
|
||||
auto-revert-use-notify t
|
||||
auto-revert-avoid-polling t)
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in a new issue