anzu.el
is an Emacs port of anzu.vim.
anzu.el
provides a minor mode which displays current match and total matches
information in the mode-line in various search mode.
- Emacs 24 or higher
You can install anzu.el
from MELPA with package.el
M-x package-install anzu
Enable anzu minor mode:
(anzu-mode +1)
Enable global anzu mode:
(global-anzu-mode +1)
Face of mode-line anzu information
Function which constructs mode-line string. If you color mode-line string, you propertize string by yourself.
(defun my/anzu-update-func (here total)
(propertize (format "<%d/%d>" here total)
'face '((:foreground "yellow" :weight bold))))
(setq anzu-mode-line-update-function 'my/update-func)
Set nil
if you want to display anzu information at any posion in mode-line.
anzu.el
cons search information head of mode-line
as default.
For example, show search information tail of minor-mode-alist
(setq anzu-cons-mode-line-p nil)
(setcar (cdr (assq 'isearch-mode minor-mode-alist))
'(:eval (anzu--update-mode-line)))
Set to t
if you use migemo.
Default is Anzu
.
Commands which have regexp input. If the last command is a member of this list,
anzu.el
treats input as regular expression.
The default value is '(isearch-forward-regexp isearch-backward-regexp)
.
(require 'anzu)
(global-anzu-mode +1)
(set-face-attribute 'anzu-mode-line nil
:foreground "yellow" :weight 'bold)