我的emacs配置文件

emacs用来做各种命令行软件的前端界面非常爽,可以用w3m看网页,ess做统计分析,auctex写文档,结合ecb就跟IDE一样。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
;;;;禁用启动信息
(setq inhibit-startup-message t)
 
;;把title设置为“文件名@YGC’s Emacs”
(setq frame-title-format “%b@YGC’s Emacs”)
 
;;显示列号
(setq column-number-mode t)
 
;;设置缺省模式是text,而不是基本模式
(setq default-major-mode ‘text-mode)
 
;;设置tab为4个空格的宽度,而不是原来的2个
(setq default-tab-width 4)
 
;;打开语法加亮
(global-font-lock-mode t)
 
‘(font-lock-comment-face
((((class color) (background light))
(:foreground “Firebrick” :slant italic))))
 
(global-set-key “C-m” ‘reindent-then-newline-and-indent)
 
;;去掉tool-bar
(tool-bar-mode nil)
 
;;设置背景色
(set-face-background ‘default “azure”)
 
;;启动时自动最大化
(setq initial-frame-alist ‘((top . 0) (left . 0) (width . 141) (height . 54)))
 
;;把备份文件放在~/.backups下而非当前目录
(setq backup-directory-alist (quote((.. “~/.backups”))))
 
;;光标靠近鼠标时,鼠标自动让开
(mouse-avoidance-mode ‘animate)
 
;;TeX
(load “auctex.el” nil t t)
;;(load “preview-latex.el” nil t t)
 
(autoload ‘reftex-mode “reftex” “RefTeX Minor Mode” t)
(autoload ‘turn-on-reftex “reftex” “RefTeX Minor Mode” nil)
(autoload ‘reftex-citation “reftex-cite” “Make citation” nil)
(autoload ‘reftex-index-phrase-mode “reftex-index” “Phrase mode” t)
 
(add-hook ‘LaTeX-mode-hook ‘turn-on-reftex)
(add-hook ‘latex-mode-hook ‘turn-on-reftex)
 
(add-hook ‘LaTeX-mode-hook
(function (lambda ()
(auto-fill-mode)
(outline-minor-mode)
(flyspell-mode))))
(add-hook ‘latex-mode-hook
(function (lambda ()
(auto-fill-mode)
(outline-minor-mode)
(flyspell-mode))))
 
(setq TeX-auto-save t)
(setq Tex-parse-self t)
(setq-default TeX-master nil)
 
(load-library “cjk-enc”)
(autoload ‘CJK-insert-space “cjkspace”
“Insert tildes appropriately in CJK document.” t)
(defun cjk-LaTeX-mode-hook ()
“CJK key definitions for LaTeX mode.(define-key LaTeX-mode-map ” ” ‘CJK-insert-space))
(add-hook ‘LaTeX-mode-hook ‘cjk-LaTeX-mode-hook)
 
(add-to-list ‘load-path “/usr/pkg/share/emacs/site-lisp/eieio”)
(setq eieio-load-turn-everything-on t)
(require ‘eieio)
 
(add-to-list ‘load-path “/usr/pkg/share/emacs/site-lisp/ecb”)
(load-file “/usr/pkg/share/emacs/site-lisp/ecb/ecb.el”)
(require ‘ecb)
(require ‘ecb-autoloads)
(custom-set-variables
;; custom-set-variables was added by Custom — don’t edit or cut/paste it!
;; Your init file should contain only one such instance.(ecb-options-version “2.32))
(custom-set-faces)
;; custom-set-faces was added by Custom — don’t edit or cut/paste it!
;; Your init file should contain only one such instance.
 
(add-to-list ‘load-path “/usr/pkg/share/emacs/site-lisp/speedbar”)
(autoload ’speedbar-frame-mode “speedbar” “Popup a speedbar frame” t)
(autoload ’speedbar-get-focus “speedbar” “Jump to speedbar frame” t)
(define-key-after (lookup-key global-map [menu-bar tools])
[speedbar](”Speedbar” . speedbar-frame-mode) [calendar])
;(global-set-key [(f4)] ’speedbar-get-focus)
 
(add-to-list ‘load-path “/usr/pkg/share/emacs/site-lisp/semantic”)
(setq semantic-load-turn-everything-on t)
(require ’semantic-load)
(global-semantic-show-dirty-mode -1)
(global-semantic-show-unmatched-syntax-mode -1)
 
(load “/usr/pkg/share/emacs/site-lisp/ess/ess-site”)
 
(load “/usr/pkg/share/emacs/site-lisp/w3m/w3m”)
 
(load “/usr/pkg/share/emacs/site-lisp/ilisp/ilisp”)
zv7qrnb

Related Posts

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>