ECB is the Emacs Code Browser, it makes Emacs more like IDE. You can install it as following:
- Install the ecb with the emacs package managder.
- Add following code into
.emacs
.
1
2
3
;;; activate ecb
(require 'ecb)
(require 'ecb-autoloads)
- Reload the init file with
M-x eval-region RET
.
Now, you can activate ECB with M-x ecb-activate RET
and deactivate it with M-x ecb-deactivate RET
respectively.
Basic configurations
Below are my ECB configuration in .emacs
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
;;; set layout for ECB
(setq ecb-layout-name "left2")
;;; show source files in directories buffer
(setq ecb-show-sources-in-directories-buffer 'always)
;;; keep a persistent compile window in ECB
(setq ecb-compile-window-height 12)
;;; activate and deactivate ecb
(global-set-key (kbd "C-x C-;") 'ecb-activate)
(global-set-key (kbd "C-x C-'") 'ecb-deactivate)
;;; show/hide ecb window
(global-set-key (kbd "C-;") 'ecb-show-ecb-windows)
(global-set-key (kbd "C-'") 'ecb-hide-ecb-windows)
;;; quick navigation between ecb windows
(global-set-key (kbd "C-)") 'ecb-goto-window-edit1)
(global-set-key (kbd "C-!") 'ecb-goto-window-directories)
(global-set-key (kbd "C-@") 'ecb-goto-window-sources)
(global-set-key (kbd "C-#") 'ecb-goto-window-methods)
(global-set-key (kbd "C-$") 'ecb-goto-window-compilation)
Here is another browser plugin for Emacs.