Emacs + ECB + CygWin + Cedet

Emacs + ECB + CygWin + Cedet

第一步:安装cgywin(它是windows平台下实现linux环境的一个工具,如果你已经安装了此工具,则此步可略过)
1,安装cygwin;
2,下载http://www.khngai.com/emacs/cygwin-mount.el
存入emacs目录下、自己建的mylist目录
 
3,在.emacs配置文件中加入(加载cygwin):
(setenv “PATH” (concat “c:/programs/cygwin/bin;” (getenv “PATH”)))
(setq exec-path (cons “c:/programs/cygwin/bin/” exec-path))
(require ‘cygwin-mount)
(cygwin-mount-activate)

4,接着,在.emacs文件中再加入(把dos shell替换成bash shell):
(add-hook ‘comint-output-filter-functions
‘shell-strip-ctrl-m nil t)
(add-hook ‘comint-output-filter-functions
‘comint-watch-for-password-prompt nil t)
(setq explicit-shell-file-name “bash.exe”)
;; For subprocesses invoked via the shell
;; (e.g., “shell -c command”)
(setq shell-file-name explicit-shell-file-name)

5,ok了。如果想要查看cygwin的$HOME实际路径,在cygwin控制台下用命令:echo
$HOME.

第二步:下载cedet和ecb包(google一下,立刻出现)
然后在cygwin控制台下,解压:tar xvzf cedet包名,tar xvzf ecb包名

进入解压后的目录,先进入解压出来的cedet包进行make,然后进入解压出来的
ecb目录,先编辑修改makefile文件,我的为:
CEDET=/cygdrive/d/emacs-22.3-bin-i386/emacs-22.3/myLisp/cedet-1.0pre4。
注意d盘,在cygwin下的写法。然后编译。
然后把这两个目录copy到自己建的List 目录中,再在.emacs目录中配置如下:

;;————————cedet+ecb———————
(load-file “D:\\emacs-22.3-bin-i386\\emacs-22.3\\myLisp\\cedet-1.0pre4\\common\\cedet.el”)
(semantic-load-enable-code-helpers)

(add-to-list ‘load-path “D:\\emacs-22.3-bin-i386\\emacs-22.3\\myLisp\\ecb-2.32″)
(require ‘ecb)

注:路径中的myLisp目录是我自己建的专门放置自己搜集来的插件的目录,你可
以建立你自己的目录,或者把插件放进emacs里的公共lisp目录中。
重启emacs,输入命令:M-x ecb-activate激活ecb.
:我的.emacs文件(.emacs文件在windows系统中处于“C:\Documents and settings\usrname\Application Data”目录下)

;; 增加cygwin的配置项目
(setenv “PATH” (concat “d:/cygwin/bin;” (getenv “PATH”)))
(setq exec-path (cons “d:/cygwin/bin/” exec-path))
(require ‘cygwin-mount)
(cygwin-mount-activate)
(add-hook ‘comint-output-filter-functions
‘shell-strip-ctrl-m nil t)
(add-hook ‘comint-output-filter-functions
‘comint-watch-for-password-prompt nil t)
(setq explicit-shell-file-name “bash.exe”)
;; For subprocesses invoked via the shell
;; (e.g., “shell -c command”)
(setq shell-file-name explicit-shell-file-name)
;; 增加session的配置项,来源于session的INSTALL文件的说明
(require ‘session)
(add-hook ‘after-init-hook ‘session-initialize)

;; 增加CEDET的配置项,来源于CEDET的INSTALL文件
;; Load CEDET.
;; See cedet/common/cedet.info for configuration details.
(load-file “D:\\Program Files\\emacs-22.3\\site-Lisp\\cedet-1.0pre6\\common\\cedet.el”)

;; Enable EDE (Project Management) features
(global-ede-mode 1)

;; Enable EDE for a pre-existing C++ project
;; (ede-cpp-root-project “NAME” :file “~/myproject/Makefile”)

;; Enabling Semantic (code-parsing, smart completion) features
;; 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 intellisense mode
;;   decoration mode, and stickyfunc mode (plus regular code helpers)
;; (semantic-load-enable-gaudy-code-helpers)

;; * This enables the use of Exuberent ctags if you have it installed.
;;   If you use C++ templates or boost, you should NOT enable it.
;; (semantic-load-enable-all-exuberent-ctags-support)

;; Enable SRecode (Template management) minor-mode.
;; (global-srecode-minor-mode 1)
;; 增加ECB的配置项
(add-to-list ‘load-path “D:\\Program Files\\emacs-22.3\\site-Lisp\\ecb-2.32″)
(require ‘ecb)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won’t work right.
‘(ecb-options-version “2.32″))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won’t work right.
)


转自http://www.feelingbox.cn/archives/337

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值