1.最新的windows下编译版本地址如下:
[url]http://code.google.com/p/emacs-for-windows/ [/url]
[quote]
顺便记下修改 .emacs 文件以后不需要重启的方法: M-x eval-buffer
[/quote]
2. .emacs配置文件如下:
[code]
;;;; 显示时间
(setq display-time-24hr-format t)
(setq display-time-day-and-date t)
(display-time)
;;;; 关闭启动画面
(setq inhibit-startup-message t)
;;;;设置大的kill ring
(setq kill-ring-max 150)
(tool-bar-mode nil);去掉那个大大的工具栏
(scroll-bar-mode nil);去掉滚动条,因为可以使用鼠标滚轮了 ^_^
(setq x-select-enable-clipboard t);支持emacs和外部程序的粘贴
(font-lock-mode t) ; 开启语法高亮
'(tab-width 2) ;;'(tab-width 4)
;;字体设置
(setq w32-charset-info-alist
(cons '("gbk" w32-charset-gb2312 . 936) w32-charset-info-alist))
(setq default-frame-alist
(append
'((font . "fontset-gbk")) default-frame-alist))
(create-fontset-from-fontset-spec
"-outline-Consolas-normal-r-normal-normal-14-97-96-96-c-*-fontset-gbk")
;;plugin install
;;color theme
(add-to-list 'load-path "~/.emacs.d/plugins/color-theme")
(require 'color-theme)
(color-theme-initialize)
(color-theme-gray30)
;;(color-theme-charcoal-black)
;; hightlight current line
(add-to-list 'load-path "~/.emacs.d/plugins/highlight-current-line")
(require 'highlight-current-line)
(highlight-current-line-on t)
;; To customize the background color 暗灰 DimGray
(set-face-background 'highlight-current-line-face "DimGray")
;;line number 行号
(add-to-list 'load-path "~/.emacs.d/plugins/linum")
(require 'linum
(global-linum-mode t)
;;yasnippet tab complete like textmate snippets
(add-to-list 'load-path "~/.emacs.d/plugins/yasnippet")
(require 'yasnippet)
(yas/initialize)
(yas/load-directory "~/.emacs.d/plugins/yasnippet/snippets/") ;snippets directory path
;;js2-mode
(add-to-list 'load-path "~/.emacs.d/plugins/js2-mode")
(require 'js2-mode)
;;(autoload 'js2-mode "js2-mode" "js editor 4 emacs" t)
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
;;vim pulse vim in emacs 真邪恶:) ctrl+z 进行emacs vim之间的切换
(setq viper-mode t) ; enable Viper at load time
(setq viper-ex-style-editing nil) ; can backspace past start of insert / line
(require 'viper) ; load Viper
(add-to-list 'load-path "~/.emacs.d/plugins/vimpulse")
(require 'vimpulse) ; load Vimpulse
(setq woman-use-own-frame nil) ; don't create new frame for manpages
(setq woman-use-topic-at-point t) ; don't prompt upon K key (manpage display)
;;ctrl + r -> redo
(require 'redo)
;;nice rectangle
(require 'rect-mark)
;;cedet
;; See cedet/common/cedet.info for configuration details.
(add-to-list 'load-path "~/.emacs.d/plugins/cedet/common")
(require 'cedet)
;; Enable EDE (Project Management) features
(global-ede-mode t)
;;speedbar key binding
(global-set-key [(f2)] 'speedbar-get-focus)
;;alt+/ 自动补全
(define-key c-mode-base-map [(meta ?/)] 'semantic-ia-complete-symbol-menu)
;;haskell-mode install
(add-to-list 'load-path "~/.emacs.d/plugins/haskell-mode")
(require 'haskell-mode)
;;(require 'haskell-site-file)
;;adding the following lines according to which modules you want to use:
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
[/code]
note:[quote]~ 为home目录,在C:\Documents and Settings\Administrator\Application Data\ 下。.emacs文件就在~下。第一启动emacs会在~目录下创建.emacs.d目录。我就在这个目录下创建一个plugin目录,存放我安装的插件。这样配置文件短点 :)。看管可以自行设定。[/quote]
3.配置说明:
a.color theme 下载地址:[url]http://download.gna.org/color-theme/[/url]。在plugins目录下创建color-theme目录,unpack到该目录。
也可以使用如下配置:
[code]
;;a.color theme
(add-to-list 'load-path "~/.emacs.d/plugins/color-theme")
(require 'color-theme)
(color-theme-initialize)
(color-theme-gray30)
[/code]
b.yasnappet 跟 snippet-mode 一样是模仿 TextMate 的自动完成功能的 emacs mode ,smart-snippet 和 yasnippet 的作者都是 pluskid (浙大学生)
下载地址:[url] http://code.google.com/p/yasnippet/[/url]。具体安装方式参照上。
剩下的都是一些配置文件,注释已经说明。
下面附上emacs的小抄pdf。
[url]http://code.google.com/p/emacs-for-windows/ [/url]
[quote]
顺便记下修改 .emacs 文件以后不需要重启的方法: M-x eval-buffer
[/quote]
2. .emacs配置文件如下:
[code]
;;;; 显示时间
(setq display-time-24hr-format t)
(setq display-time-day-and-date t)
(display-time)
;;;; 关闭启动画面
(setq inhibit-startup-message t)
;;;;设置大的kill ring
(setq kill-ring-max 150)
(tool-bar-mode nil);去掉那个大大的工具栏
(scroll-bar-mode nil);去掉滚动条,因为可以使用鼠标滚轮了 ^_^
(setq x-select-enable-clipboard t);支持emacs和外部程序的粘贴
(font-lock-mode t) ; 开启语法高亮
'(tab-width 2) ;;'(tab-width 4)
;;字体设置
(setq w32-charset-info-alist
(cons '("gbk" w32-charset-gb2312 . 936) w32-charset-info-alist))
(setq default-frame-alist
(append
'((font . "fontset-gbk")) default-frame-alist))
(create-fontset-from-fontset-spec
"-outline-Consolas-normal-r-normal-normal-14-97-96-96-c-*-fontset-gbk")
;;plugin install
;;color theme
(add-to-list 'load-path "~/.emacs.d/plugins/color-theme")
(require 'color-theme)
(color-theme-initialize)
(color-theme-gray30)
;;(color-theme-charcoal-black)
;; hightlight current line
(add-to-list 'load-path "~/.emacs.d/plugins/highlight-current-line")
(require 'highlight-current-line)
(highlight-current-line-on t)
;; To customize the background color 暗灰 DimGray
(set-face-background 'highlight-current-line-face "DimGray")
;;line number 行号
(add-to-list 'load-path "~/.emacs.d/plugins/linum")
(require 'linum
(global-linum-mode t)
;;yasnippet tab complete like textmate snippets
(add-to-list 'load-path "~/.emacs.d/plugins/yasnippet")
(require 'yasnippet)
(yas/initialize)
(yas/load-directory "~/.emacs.d/plugins/yasnippet/snippets/") ;snippets directory path
;;js2-mode
(add-to-list 'load-path "~/.emacs.d/plugins/js2-mode")
(require 'js2-mode)
;;(autoload 'js2-mode "js2-mode" "js editor 4 emacs" t)
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
;;vim pulse vim in emacs 真邪恶:) ctrl+z 进行emacs vim之间的切换
(setq viper-mode t) ; enable Viper at load time
(setq viper-ex-style-editing nil) ; can backspace past start of insert / line
(require 'viper) ; load Viper
(add-to-list 'load-path "~/.emacs.d/plugins/vimpulse")
(require 'vimpulse) ; load Vimpulse
(setq woman-use-own-frame nil) ; don't create new frame for manpages
(setq woman-use-topic-at-point t) ; don't prompt upon K key (manpage display)
;;ctrl + r -> redo
(require 'redo)
;;nice rectangle
(require 'rect-mark)
;;cedet
;; See cedet/common/cedet.info for configuration details.
(add-to-list 'load-path "~/.emacs.d/plugins/cedet/common")
(require 'cedet)
;; Enable EDE (Project Management) features
(global-ede-mode t)
;;speedbar key binding
(global-set-key [(f2)] 'speedbar-get-focus)
;;alt+/ 自动补全
(define-key c-mode-base-map [(meta ?/)] 'semantic-ia-complete-symbol-menu)
;;haskell-mode install
(add-to-list 'load-path "~/.emacs.d/plugins/haskell-mode")
(require 'haskell-mode)
;;(require 'haskell-site-file)
;;adding the following lines according to which modules you want to use:
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
[/code]
note:[quote]~ 为home目录,在C:\Documents and Settings\Administrator\Application Data\ 下。.emacs文件就在~下。第一启动emacs会在~目录下创建.emacs.d目录。我就在这个目录下创建一个plugin目录,存放我安装的插件。这样配置文件短点 :)。看管可以自行设定。[/quote]
3.配置说明:
a.color theme 下载地址:[url]http://download.gna.org/color-theme/[/url]。在plugins目录下创建color-theme目录,unpack到该目录。
也可以使用如下配置:
[code]
;;a.color theme
(add-to-list 'load-path "~/.emacs.d/plugins/color-theme")
(require 'color-theme)
(color-theme-initialize)
(color-theme-gray30)
[/code]
b.yasnappet 跟 snippet-mode 一样是模仿 TextMate 的自动完成功能的 emacs mode ,smart-snippet 和 yasnippet 的作者都是 pluskid (浙大学生)
下载地址:[url] http://code.google.com/p/yasnippet/[/url]。具体安装方式参照上。
剩下的都是一些配置文件,注释已经说明。
下面附上emacs的小抄pdf。