Skip to content

Instantly share code, notes, and snippets.

@ageekymonk
Created February 10, 2012 09:13
Show Gist options
  • Save ageekymonk/1787959 to your computer and use it in GitHub Desktop.
Save ageekymonk/1787959 to your computer and use it in GitHub Desktop.
Emacs file for cedet + ecb
;;============EDIT THESE LINES with your path==========
(add-to-list 'load-path "<path_to_cedet-1.0.1>")
(load-file "<path_to_cedet-1.0.1>/common/cedet.el")
(add-to-list 'load-path "<path_to_ecb_folder>")
(require 'ecb)
(semantic-load-enable-excessive-code-helpers)
(require 'semantic-ia)
(require 'semantic-gcc)
(require 'semantic)
(require 'semantic-decorate-include)
(setq senator-minor-mode-name "SN")
(setq semantic-imenu-auto-rebuild-directory-indexes nil)
(global-srecode-minor-mode 1)
(global-semantic-mru-bookmark-mode 1)
;; GNU Global tags support
(require 'semanticdb-global)
(semanticdb-enable-gnu-global-databases 'c-mode)
(semanticdb-enable-gnu-global-databases 'c++-mode)
;; EDE Customisation
(require 'semantic-lex-spp)
(global-ede-mode t)
(ede-enable-generic-projects)
(setq-mode-local c-mode semanticdb-find-default-throttle
'(project unloaded system recursive))
(setq-mode-local c++-mode semanticdb-find-default-throttle
'(project unloaded system recursive))
(defun my/cedet-hook ()
(local-set-key [(control return)] 'semantic-ia-complete-symbol-menu)
(local-set-key "\C-c?" 'semantic-ia-complete-symbol)
(local-set-key "\C-c>" 'semantic-complete-analyze-inline)
(local-set-key "\C-c=" 'semantic-decoration-include-visit)
(local-set-key "\C-cj" 'semantic-ia-fast-jump)
(local-set-key "\C-cq" 'semantic-ia-show-doc)
(local-set-key "\C-cs" 'semantic-ia-show-summary)
(local-set-key "\C-cp" 'semantic-analyze-proto-impl-toggle)
)
(add-hook 'c-mode-common-hook 'my/cedet-hook)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment