Use of the ECB in Emacs (reprint)

Source: Internet
Author: User

Transferred from: http://joerong666.iteye.com/blog/1813876

By: Dynasties

Date:2009-7-9

Email: [Email protected]

Homepage:http://blog.csdn.net/intrepyd

Copyright: This article is copyrighted by dynasties. may be freely disseminated and reproduced for non-commercial purposes.

Any conduct of this document for commercial purposes shall be subject to the consent of the author.

Write in front

The ECB stands for "Emacs Code Browser", which, as its name implies, is used to browse the code. The ECB provides four windows:

²directories window: Displays the directory structure;

²sources window: Displays the list of files in the current directory;

²methods window: Displays a list of functions/classes/Members in the current file;

²history window: Displays the most recently accessed files.

This article briefly describes the installation and basic configuration of the ECB, and I hope this article will help you. The main reference is the ECB help documentation.

Installing the ECB

As with most Emacs plugins, the ECB also requires version compatibility, which references the installation section of the Help document. Since the ECB's display requires semantic support, the cedet/semantic must be installed correctly before installing the ECB, as can be found in the use of Cedet in Emacs. When everything is ready, you can download the ECB package and unzip it to the location where the emacs plugin is stored, such as ~/.emacs.d/site-lisp/. Add the following to the. emacs file, adding the ECB's installation directory to the Load-path of Emacs, and loading and automatically starting the ECB when Emacs starts, and masking the daily tip of the spoiler.

' Load-path "/home/pydeng/.emacs.d/site-lisp/ecb-2.40")  'ECB ';;; ; automatically starts the ECB and does not display daily prompts (setq ECB-auto-activate T      ECB- Tip-of-the-day Nil)

By restarting Emacs, you can see the four windows provided by the ECB. At this point, the "M-x Ecb-byte-complie" compilation can be performed in Emacs to speed up the ECB's operation.

Mouse support

By default, using the mouse to click on the contents of the ECB window does not work. You can perform "M-x ecb-customize-most-important" in Emacs and find the "ECB Primary secondary Mouse Buttons" option to set it to "primary:mouse-1, Secondary:mouse-2 "and save it with" save for future Sessions ".

basic operations on the ECB window

The following key bindings are added to the. emacs file to facilitate the basic operation of the ECB window, including switching between windows, displaying/hiding the ECB window, maximizing the ECB window, and so on.

;;;; Switch between each window (Global-Set-key [M-left]'windmove-left)(Global-Set-key [M-right]'windmove-right)(Global-Set-key [m-up]'windmove-up)(Global-Set-key [M-down]'Windmove-down);;;; hides and displays the ECB window (define-keyGlobal-map [(Control F1)]'ecb-hide-ecb-windows)(define-keyGlobal-map [(Control F2)]'ecb-show-ecb-windows);;;; maximizes the window of an ECB (define-keyGlobal-map"\C-C1" 'ecb-maximize-window-directories)(define-keyGlobal-map"\C-C2" 'ecb-maximize-window-sources)(define-keyGlobal-map"\C-C3" 'ecb-maximize-window-methods)(define-keyGlobal-map"\C-C4" 'ecb-maximize-window-history);;;; Restores the original window layout (define-keyGlobal-map"\c-c '" 'ecb-restore-default-window-sizes)

Use of the ECB in Emacs (reprint)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.