Imenu produces menus for accessing locations in documents, typically in the current buffer. You can access the locations using an ordinary menu (menu bar or other) or using minibuffer completion.
A typical use of Imenu shows a menu-bar menu that is an index or table of contents for the current buffer. For a source-code buffer it is typical to index definitions of functions, variables, and so on.

You can use Imenu with any major mode and any programming language or document type. If there is no Imenu support for your context, you can add it using EmacsLisp and the constructs provided in library 'imenu.el'.

Customisation

Using ido

Using ido in conjunction with imenu makes it very easy and quick to use. Add the following function into your ~/.emacs :