This Emacs package provides a way to use
imenu indexes on multiple
buffers (or files) and without subsections.
imenus may be used to perform
specified buffers by pressing an according key binding.
This package can be installed from MELPA (with
M-x package-install or
For the manual installation, clone the repo, add the directory to
load-path and add autoloads for the commands/functions you need:
(add-to-list 'load-path "/path/to/imenus-dir") (autoload 'imenus "imenus" nil t) (autoload 'imenus-mode-buffers "imenus" nil t)
This command behaves almost the same as
M-x imenu. The differences are:
- If it is called with a prefix argument, you will be prompted for several buffers for searching.
- You may use the following additional key bindings while you are in a
minibuffer prompt (the bindings may be changed in
M-r- Rescan the current index.
M-s- Start Isearch with the current input string.
M-o- Start Occur with the current input string.
- There are no additional groups (sections), like “Variables” or
“Types”. All items are placed in the top level and optionally have
a group prefix (i.e., “Variables ⇨ imenus-delimiter”). The
difference is shown in the following screenshots:
imenuson all buffers with a particular major mode (there is also imenu-anywhere package for the same purpose).
This is not an interactive command; it is a function that may be used to perform
imenuson files. For example, I use it to search my elisp files (see al-imenus.el).