;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;
; Cedet Configuration
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;
; Load cedet
(Add-to-list 'Load-path "/opt/emacs-ide/cedet-1.1/common ")
(Add-to-list 'Load-path "/opt/emacs-ide/cedet-1.1/semantic ")
(Add-to-list 'Load-path "/opt/emacs-ide/cedet-1.1/cogre ")
(Add-to-list 'Load-path "/opt/emacs-ide/cedet-1.1/contrib ")
(Add-to-list 'Load-path "/opt/emacs-ide/cedet-1.1/Ede ")
(Add-to-list 'Load-path "/opt/emacs-ide/cedet-1.1/eieio ")
(Add-to-list 'Load-path "/opt/emacs-ide/cedet-1.1/speedbar ")
(Add-to-list 'Load-path "/opt/emacs-ide/cedet-1.1/srecode ")
(Load-file "/opt/emacs-ide/cedet-1.1/common/cedet. ELC ")
(Require 'cedet)
(Require 'semantic)
(Require 'srecode)
(Global-Ede-mode 1)
(Global-srecode-minor-mode 1)
; Color Customization
(Set-Background-color "black"); uses a black background
(Set-foreground-color "white"); use white foreground
(Set-face-foreground 'region "red"); the foreground color of the area is set to red.
(Set-face-Background 'region "blue"); regional background color is set to blue
(Semantic-load-enable-code-helpers)
(Semantic-load-enable-excessive-code-helpers)
(Semantic-load-enable-semantic-debugging-helpers)
; GCC setup
(Require 'semantic-GCC)
; Smart completions setup
(Require 'semantic-Ia)
(Defun my-cedet-hook ()
(Local-set-Key (KBD "M-RET") 'semantic-Ia-complete-symbol)
(Local-set-Key (KBD "C-C? ") 'Semantic-Ia-complete-symbol-menu)
(Local-set-Key (KBD "M-n") 'semantic-Ia-complete-symbol-menu)
(Local-set-Key (KBD "c-c>") 'semantic-complete-analyze-inline)
(Local-set-Key (KBD "M-/") 'semantic-complete-analyze-inline)
(Local-set-Key (KBD "C-c p") 'semantic-analyze-proto-impl-Toggle)
(Local-set-Key (KBD "c-c d") 'semantic-Ia-fast-jump)
(Local-set-Key (KBD "c-c r") 'semantic-symref-symbol)
(Local-set-Key (KBD "c-c r") 'semantic-symref)
(Linum-mode)
)
; C/C ++ setting
(Local-set-key "." 'semantic-complete-Self-insert)
(Local-set-key ">" 'semantic-complete-Self-insert)
(Add-hook 'C-mode-common-hook 'My-cedet-hook)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;
; ECB configure
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;
(Add-to-list 'Load-path "/opt/emacs-ide/ecb-2.40 ")
(Require 'ecb)
(Require 'ecb-autoloads)
; Auto startup and not show tips
(Setq ECB-auto-activate t ecb-tip-of-the-day nil)
(Setq ECB-tip-of-the-day nil)
; Window navigate
(Global-set-Key (KBD "ESC <left>") 'windmove-left)
(Global-set-Key (KBD "ESC <right>") 'windmove-right)
(Global-set-Key (KBD "ESC <up>") 'windmove-up)
(Global-set-Key (KBD "ESC <down>") 'windmove-down)
; Hide and show window
(Global-set-Key (KBD "ESC <F1>") 'ecb-show-ECB-Windows)
(Global-set-Key (KBD "ESC <F2>") 'ecb-hide-ECB-Windows)
(Global-set-Key (KBD "ESC <F3>") 'ecb-activate)
(Global-set-Key (KBD "ESC <F5>") 'ecb-deactivate)
; Change Layout
(Global-set-Key (KBD "c-c 1") 'ecb-maximize-window-Directories)
(Global-set-Key (KBD "C-C 2") 'ecb-maximize-window-sources)
(Global-set-Key (KBD "c-c 3") 'ecb-maximize-window-methods)
(Global-set-Key (KBD "C-C 4") 'ecb-maximize-window-History)
; Restore Layout
(Global-set-Key (KBD "c-c 0") 'ecb-restore-default-window-sizes)
(Custom-set-Variables
'(ECB-fix-window-size T)
'(ECB-layout-window-sizes nil)
'( ECB-Windows-width 0.20)
)
(Custom-set-Variables
; Custom-set-variables was added by custom.
; If you edit it by hand, you coshould mess it up, so be careful.
; Your init file shoshould contain only one such instance.
; If there is more than one, they won't work right.
'(ECB-options-version "2.40 "))
; (Custom-set-Faces
; Custom-set-faces was added by custom.
; If you edit it by hand, you coshould mess it up, so be careful.
; Your init file shoshould contain only one such instance.
; If there is more than one, they won't work right.
;;)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Other settings
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Set Default reader coding system
; (Prefer-coding-system 'gbk)
; Set Default write coding system
; (Setq default-buffer-file-coding-system 'gbk)
; Set line number
(Setq line-number-mode t)
(Setq linum-mode t)
; Set column number
(Setq column-number-mode t)
; Tab setting
(Setq tab-width 4
Indent-Tabs-mode t
C-Basic-offset 4
)
; Mark set
(Global-set-Key (KBD "esc spc") 'set-mark-command)
; Close menu and toolbar
(Tool-bar-mode nil)
(Menu-bar-mode nil)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Xcs.pdf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(Add-to-list 'Load-path "/opt/emacs-ide/cscope-15.8a/contrib/xcs.pdf ")
(Load-file "/opt/emacs-ide/cscope-15.8a/contrib/xcs.pdf. El ")
(Require 'xcscope)
Emacs-ide Configuration