loonsw's Tech Blog

Algorithm, Mathematics, C/C++, GNU/Linux, Emacs/Vim…

  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  6 随笔 :: 1 文章 :: 0 评论 :: 0 Trackbacks
首先,对字体颜色进行配置:

1.简单设置方法:
通过命令快速打开背景颜色设定界面:51Testing软件测试网6p{Uk[;K

M-x customize-face
default
J ~B!R6hb|I`051Testing软件测试网.G"g IWw51Testing软件测试网 D4q/}r:v1Y;?i2q

51Testing软件测试网 d1w
Foreground color: grey85
K]X0c X"O0background color: black

5N P+dN9GX4_`r;s
2.)


 
也可以安装一个软件包,里面包含了几十种已经定义好的颜色主题。51Testing软件测试网:p:yC`Z�W
sudo apt-get install emacs-goodies-el
6f"mk%a&g0{c,hl#FU;t0键入‘M-x color-theme-select’选择不同的主题;

接下来
安装配置cc-mode:
下载后:
emacs -batch -no-site-file -q -f batch-byte-compile cc-*.el 来 byte-compile
新建一个emacs的文件夹:
mkdir ~/.emacsd
mv cc-mode-5.31.3 ~/.emacsd

修改一下 ~/.emacs
加入
(add-to-list 'load-path "~/.emacsd/cc-mode-5.31.3")
新建一个test.cpp,M-x c-version
出现了 Using CC Mode version 5.31.3就表示安装成功了cc-mode;

然后安装ecb和cedet:
下载出两个tar文件,mv到~/.emacsd下
tar zxvf ecb-2.32.tar.gz
tar zxvf cedet-1.0pre4.tar.gz

cd cedet-1.0pre4
make
等cedet生成完毕.

.emacs中添加下面一段.注意,load-file那一行的目录要自己改一下
;; Load CEDET
(load-file "你存放cedet的目录/common/cedet.el")
;;例如(load-file "~/.emacsd/cedet-1.0/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
;;(semantic-load-enable-minimum-features)

;; * This enables some tools useful for coding, such as summary mode
;;   imenu support, and the semantic navigator
(semantic-load-enable-code-helpers)

;; * This enables even more coding tools such as the nascent intellisense mode
;;   decoration mode, and stickyfunc mode (plus regular code helpers)
;; (semantic-load-enable-guady-code-helpers)

;; * This turns on which-func support (Plus all other code helpers)
;; (semantic-load-enable-excessive-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 above.
;; (semantic-load-enable-semantic-debugging-helpers)

这样cedet就装好了

接下来安装ecb
在.emacs里面加入

(add-to-list 'load-path "你放ecb的目录")
;;例如(add-to-list 'load-path "~/.emacsd/ecb-2.32")
(require 'ecb)

注意这个段要加在cedet配置的后面

重启emacs

在emacs中打开一个c或者c++文件.选tool中的Start Code Browser(ECB).

ecb和cedet功能丰富.具体请看M-x ecb-show-help 和cedet包里面的install文件.

posted on 2009-04-03 20:14 redcode 阅读(2259) 评论(0)  编辑 收藏 引用 所属分类: Linux Software