Programmer's Emacs configuration (cedet + ECB + cs.pdf + GDB-UI)-jzj

Source: Internet
Author: User

This article mainly discusses the following settings:
1. Font
2. cedet
3. ECB
4. cscope
4. GDB-Example-Window

Opensuse 10.2
Emacs 21 is installed by default. I downloaded the tar package of Emacs 22.1 from the Internet and compiled and installed it.

1. Font
The default font is very small. The following is a very detailed tutorial on font setting in Emacs. Unfortunately, it is too long for me to look at it. I copied an existing certificate:
(Set-default-font "-Adobe-courier-Medium-r-normal -- 14-100-100-100-m-90-iso10646-1 ")

2. cedet
Download cedet:
Follow install to install and set. emacs. Install has a section about settings, paste it, and it is best to set a speedbar shortcut:
(Global-set-Key [(F4)] 'speedbar-get-Focus)
In this way, press F4. The speedbar will come out.

3. ECB
In. emacs:
(Add-to-list 'Load-path "~ /Software/ecb-2.32 ")
; (Require 'ecb)
(Require 'ecb-autoloads)
Open Emacs, and then M-x ECB-activate to open ECB.

4. cscope
This should be the same as some features of ECB.
First install cscope, and then load xcscope. El under the/cscope-15.6/contrib/xcscope directory to Emacs:
(Add-to-list 'Load-path "~ /Software/cscope-15.6/contrib/xcscope ")
(Require 'xcscope)
Here is an article about how to install and use cssag in Emacs:

5. GDB-Example-Window
This function plug-in allows Emacs to debug windows like VC, such as watch and stacktrace, to implement graphical GDB.
Http:// /~ Nickrob/multi-gud.el
Http:// /~ Nickrob/multi-gdb-ui.el
Set. emacs:
(Load-library "multi-gud.el ")
(Load-library "multi-gdb-ui.el ")
Still can not see detailed official Tutorial:
The GDB-UI tutorial is as follows:

In addition:
How to install an extension package in Emacs
A comprehensive. emacs configuration file:

My. emacs (it has not been sorted out yet. It seems that there are still repeated shortcut keys-_-|)
(If (string-match "xemacs // | lucid" emacs-Version)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Xemacs
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(If (file-readable-P "~ /. Xemacs/init. El ")
(Load "~ /. Xemacs/init. El "Nil t ))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; GNU-Emacs
; Load ~ /. GNU-Emacs or, if not exists/etc/skel/. GNU-Emacs
; For a description and the settings see/etc/skel/. GNU-Emacs
;... For your private ~ /. GNU-Emacs your are on your one.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(If (file-readable-P "~ /. GNU-Emacs ")
(Load "~ /. GNU-Emacs "Nil T)
(If (file-readable-P "/etc/skel/. GNU-Emacs ")
(Load "/etc/skel/. GNU-Emacs" Nil t )))

; Custum settings
; ======================
; To avoid any trouble with the Customization System of GNU Emacs
; We set the default file ~ /. GNU-emacs-custom
(Setq custom-file "~ /. GNU-emacs-custom ")
(Load "~ /. GNU-emacs-custom "t)

(Column-number-mode t)
(Transient-mark-mode t)
(Setq line-number-mode t)
(Setq default-tab-width 8)

(Customize-set-variable 'scroll-bar-mode' right)
; (Setq default-directory "home/jzj/backup/Emacs /")
(Setq inhibit-startup-message T)
(Setq line-number-mode t)
(Setq global-font-lock-mode t)
(Setq make-backup-files nil)
(Setq auto-save-mode nil)
(Setq X-select-enable-clipboard T)
(Setq mouse-yank-at-point T)
(Global-set-Key [home] 'ning inning-of-buffer)

(Global-set-Key [end] 'end-of-buffer)
; (Global-set-Key [F4] 'other-window)
(Global-set-Key [F5] 'compile)
(Setq-default compile-command "make ")
; (Global-set-Key [F7] 'du-onekey-compile)
(Global-set-Key [F6] 'gdb)

(Global-set-Key [C-f7] 'previous-error)
(Global-set-Key [F7] 'next-error)

; (Set-default-font "9x15 ")
(Set-default-font "-Adobe-courier-Medium-r-normal -- 14-100-100-100-m-90-iso10646-1 ")

; Load cedet
(Load-file "~ /Software/cedet-1.0pre4/common/cedet. El ")

; Enabling various semantic minor modes. See semantic/INSTALL for more ideas.
; Select one of the following:

; * This enables the database and idle reparse Engines

; * This enables some tools useful for coding, such as summary Mode
; Imenu support, and the semantic Navigator

; * This enables even more coding tools such as the nascent intelliisense Mode
; Decoration mode, and stickyfunc mode (plus regular code helpers)

; * This turns on which-func support (plus all other code helpers)

; This turns on modes that aid in grammar writing and semantic Tool
; Development. It does not enable any other features such as code
; Helpers abve.

(Global-set-Key [(F4)] 'speedbar-get-Focus)

(Require 'CC-mode)
(C-set-offset 'inline-open 0)
(C-set-offset 'friend '-)
(C-set-offset 'substatement-open 0)
(Defun my-C-mode-common-hook ()
(Setq tab-width 4 indent-Tabs-mode nil)
; Hungry-delete and auto-newline
(C-toggle-auto-hungry-state 1)

(Define-key C-mode-base-map [(control/')] 'hs-toggle-hiding)
; (Define-key C-mode-base-map [(return)] 'newline-and-indent)
; (Define-key C-mode-base-map [(F6)] 'compile)
(Define-key C-mode-base-map [(META/')] 'C-indent-command)
; (Define-key C-mode-base-map [(Tab)] 'hippie-expand)
(Define-key C-mode-base-map [(Tab)] 'my-indent-or-complete)
(Define-key C-mode-base-map [(meta? /)] 'Semantic-Ia-complete-symbol-menu)

(Setq C-macro-shrink-window-flag T)
(Setq C-macro-Preprocessor "CPP ")
(Setq C-macro-cppflags "")
(Setq C-macro-prompt-flag T)
(Setq HS-minor-mode t)
(Setq abbrev-mode t)
(Add-hook 'C-mode-common-hook 'My-C-mode-common-hook)

(Defun my-C ++-mode-hook ()
(Setq tab-width 4 indent-Tabs-mode nil)
(C-set-style "stroustrup ")
; (Define-key C ++-mode-map [F3] 'replace-Regexp)

(Setq GDB-embedded-Windows T)

(Add-to-list 'Load-path "~ /Backup/Emacs ")
(Require 'gud)

(Add-to-list 'Load-path "~ /Software/ecb-2.32 ")
; (Require 'ecb)
(Require 'ecb-autoloads)

; For GDB-rows-window mode
(Load-library "multi-gud.el ")
(Load-library "multi-gdb-ui.el ")

; Csacs in Emacs
(Add-to-list 'Load-path "~ /Software/cscope-15.6/contrib/xcscope ")
(Require 'xcscope)

; Hotkey for cskey
(Define-key global-map [(control F3)] 'csbench-set-Initial-directory)
(Define-key global-map [(control F4)] 'csbench-unset-Initial-directory)
(Define-key global-map [(control F5)] 'csprohibited-find-this-symbol)
(Define-key global-map [(control F6)] 'csbench-find-global-definition)
(Define-key global-map [(control F7)]
(Define-key global-map [(control F8)] 'cscope-pop-mark)
(Define-key global-map [(control F9)] 'cscope-next-symbol)
(Define-key global-map [(control F10)] 'cs1_next-file)
(Define-key global-map [(control F11)] 'cs1_prev-symbol)
(Define-key global-map [(control F12)] 'cs1_prev-file)
(Define-key global-map [(meta F9)] 'cs1_display-buffer)
(Define-key global-map [(meta F10)] 'csbench-display-buffer-Toggle)

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: 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.