Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alezost/imenus.el

Imenu for multiple buffers
https://github.com/alezost/imenus.el

emacs imenu

Last synced: 4 months ago
JSON representation

Imenu for multiple buffers

Awesome Lists containing this project

README

        

[[https://www.gnu.org/licenses/gpl-3.0.txt][file:https://img.shields.io/badge/license-GPL_3-orange.svg]]
[[https://melpa.org/#/imenus][file:https://melpa.org/packages/imenus-badge.svg]]
[[https://stable.melpa.org/#/imenus][file:https://stable.melpa.org/packages/imenus-badge.svg]]

** About

This Emacs package provides a way to use =imenu= indexes on multiple
buffers (or files) and without subsections.

Above that, =imenus= may be used to perform =isearch= or =occur= on
specified buffers by pressing an according key binding.

** Installation

*** Automatic

This package can be installed from [[https://melpa.org/][MELPA]] (with =M-x package-install= or
=M-x list-packages=).

*** Manual

For the manual installation, clone the repo, add the directory to
=load-path= and add autoloads for the commands/functions you need:

#+BEGIN_SRC emacs-lisp
(add-to-list 'load-path "/path/to/imenus-dir")
(autoload 'imenus "imenus" nil t)
(autoload 'imenus-mode-buffers "imenus" nil t)
#+END_SRC

** Usage

- =M-x imenus=

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
=imenus-minibuffer-map=):

* =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:

| Imenu | Imenus |
|--------------------------------------+--------------------------------------|
| [[https://i.imgur.com/mVG7uOI.png][file:https://i.imgur.com/mVG7uOI.png]] | [[https://i.imgur.com/3fAZetY.png][file:https://i.imgur.com/3fAZetY.png]] |

- =M-x imenus-mode-buffers=

Perform =imenus= on all buffers with a particular major mode (there is
also [[https://github.com/vitoshka/imenu-anywhere][imenu-anywhere]] package for the same purpose).

- =imenus-files=

This is not an interactive command; it is a function that may be used
to perform =imenus= on files. For example, I use it to search my
elisp files (see [[https://github.com/alezost/emacs-config/blob/master/utils/al-imenus.el][al-imenus.el]]).