[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Speedbar is highly customizable, with a plethora of control elements. Since speedbar is so visual and reduces so much information, this is an important aspect of its behavior.
In general, there are three custom groups you can use to quickly modify speedbar's behavior.
speedbar
speedbar-vc
speedbar-faces
6.1 Frames and Faces | Visible behaviors. | |
6.2 Tag Hierarchy Methods | Customizing how tags are displayed. | |
6.3 Version Control | Adding new VC detection modes. | |
6.4 Hooks | The many hooks you can use. |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
There are several faces speedbar generates to provide a consistent color scheme across display types. You can customize these faces using your favorite method. They are:
You can also customize speedbar's initial frame parameters. How this is accomplished is dependent on your platform being Emacs or XEmacs.
In Emacs, change the alist speedbar-frame-parameters
. This
variable is used to set up initial details. Height is also
automatically added when speedbar is created, though you can override
it.
In XEmacs, change the plist speedbar-frame-plist
. This is the
XEmacs way of doing the same thing.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
When listing tags within a file, it is possible to get an annoyingly long list of entries. Imenu (which generates the tag list in Emacs) will group some classes of items automatically. Even here, however, some tag groups can be quite large.
To solve this problem, tags can be grouped into logical units through a
hierarchy processor. The specific variable to use is
speedbar-tag-hierarchy-method
. There are several methods that
can be applied in any order. They are:
speedbar-trim-words-tag-hierarchy
speedbar-prefix-group-tag-hierarchy
speedbar-simple-group-tag-hierarchy
speedbar-sort-tag-hierarchy
You can also add your own functions to reorganize tags as you see fit.
Some other control variables are:
speedbar-tag-group-name-minimum-length
The minimum length of a prefix group name before expanding. Thus, if
the speedbar-tag-hierarchy-method
includes
speedbar-prefix-group-tag-hierarchy
and one such group's common
characters is less than this number of characters, then the group name
will be changed to the form of:
worda to wordb |
instead of just
word |
This way we won't get silly looking listings.
speedbar-tag-split-minimum-length
Minimum length before we stop trying to create sub-lists in tags. This is used by all tag-hierarchy methods that break large lists into sub-lists.
speedbar-tag-regroup-maximum-length
Maximum length of submenus that are regrouped. If the regrouping option is used, then if two or more short subgroups are next to each other, then they are combined until this number of items is reached.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
When using the file mode in speedbar, information regarding a version control system adds small details to the display. If a file is in a version control system, and is "checked out" or "locked" locally, an asterisk `*' appears at the end of the file name. In addition, the directory name for Version Control systems are left out of the speedbar display.
You can easily add new version control systems into speedbar's detection
scheme. To make a directory "disappear" from the list, use the variable
speedbar-directory-unshown-regexp
.
Next, you need to write entries for two hooks. The first is
speedbar-vc-directory-enable-hook
which will enable a VC check in the
current directory for the group of files being checked. Your hook
function should take one parameter (the directory to check) and return
t
if your VC method is in control here.
The second function is speedbar-vc-in-control-hook
. This hook
takes two parameters, the path of the file to check, and the
file name. Return t
if you want to have the asterisk
placed near this file.
Lastly, you can change the VC indicator using the variable
speedbar-vc-indicator
, and specify a single character string.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
There are several hooks in speedbar allowing custom behaviors to be added. Available hooks are:
speedbar-visiting-file-hook
speedbar-visiting-tag-hook
speedbar-load-hook
speedbar-reconfigure-keymaps-hook
speedbar-before-popup-hook
speedbar-before-delete-hook
speedbar-mode-hook
speedbar-timer-hook
speedbar-scanner-reset-hook
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by XEmacs shared group account on December, 19 2009
using texi2html 1.65.