EmacsWiki: Semantic Idle Breadcrumbs Mode (original) (raw)

Introduction

The semantic idle breadcrumbs mode displays information about the structural context of point in the header line or mode line. The display update is performed using Semantic’s idle scheduler. This means the update happens after a short period of inactivity.

The screenshot below illustrates one of the display styles in the header line for the C++, Python and Emacs Lisp programming languages:

SemanticIdleBreadcrumbsModeScreenshot.png

Usage

In recent versions of CEDET, the mode can be enabled for individual buffers using the ‘semantic-idle-breadcrumbs-mode’ command. The command is executed by typing

M-x semantic-idle-breadcrumbs-mode RET

In addition, the mode can be enabled globally (meaning that the mode will automatically be enabled in all buffers) using ‘global-semantic-idle-breadcrumbs-mode’. To make the activation of this global mode permanent, the following code can be added to the Emacs startup file (usually `.emacs`)

(global-semantic-idle-breadcrumbs-mode 1)

The display style can be customized in the ‘semantic’ customization group.

Display Styles

outer_namespace::inner_namespace::class::member_function

outer_namespace > inner_namespace > class > member_function

void member_function (int a, int b) | outer_namespace::inner_namespace::class

Q: Could you specify how you achieved the format in the screenshot?

A: That is done by setting ‘semantic-idle-breadcrumbs-format-tag-list-function’ to ‘semantic-idle-breadcrumbs--format-innermost-first’.

Alternatives

An alternative mode that offers similar functionality for several programming languages is WhichFuncMode.


CategoryProgrammerUtils