# 2021-01-17 #「Emacs」- Speed Bar

Speedbar is a program of Emacs that can be used to summarize and display information related to the current Buffer. It is equivalent to a file browser, but also contains other functions.

Speedbar displays a tree view. This view defaults to a list of files and directories. The "file" can be "expanded" to display the "tag" (tag, similar to the function preview function included in the source code in the IDE) contained in the file. "Directory" can be "expanded" to display the files contained in it. Each "file" or "tag" can be "click to jump".

Speedbar expands the "Explorer" window by "Maintain User Context". For example, when using the file view, the file in the current buffer is highlighted. Speedbar also simulates browsing windows by providing multiple display modes. There are two types of these modes: the "primary display mode" is consistent in the buffer, and the secondary display mode is displayed only when the applicable type of buffer is displayed. This allows authors of other Emacs plugins to set the content displayed by Speedbar according to the needs of the plugin mode.

At this time, "activity" was defined as a "click" or "expand" item. "Click" means to use mouse-2 button (mouse). "Expand" means to click the "Expand Button" to display the "Expand Summary" of the "Location of the Expand Button".

Function introduction

Use the command Mx speedbar RET or open Speedbar from the "Options -> Show/Hide" sub-menu. This command will open a new Frame. This new Frame is Speedbar, and a list of local files will be displayed in Speedbar.
On X Window System or MS-Windows, the Speedbar has a width of 20 characters, and the height is equal to the height of the previous frame, which is located on the left or right side of the previous frame.

To use Speedbar effectively, it is important to understand the relationship between Speedbar and the bound Frame that starts Speedbar (the Frame where the Speedbar command is executed) . This frame is an "additional frame" used by Speedbar as a reference point. Once Speedbar is started, it will observe the contents of the "Additional Frame" and try to correlate the contents of Speedbar with the contents of the Buffer loaded in the "Additional Frame". In addition, all requests generated in Speedbar to display another Buffer (such as opening a file) will be displayed in the "Additional Frame".

When in terminal mode, the new frame displays the same size as the terminal. Since the Speedbar is not visible when working in the additional Frame, the Speedbar will save time by using the slowbar mode. Before the Speedbar is required to display itself (that is, the Frame where the Speedbar is located becomes the selected Frame), no "content display tracking" is performed.

When using the keyboard to switch between Frames, the function used is speedbar-get-focus. This function will switch between different Frames. It is useful to bind to a key in terminal mode.

references

 

 

Guess you like

Origin blog.csdn.net/u013670453/article/details/112759301