链接:http://pan.baidu.com/s/1c0fjY3e 密码:j8pe
网盘里的文件为我的配置文件,及所使用的lisp源码包。下载后,可以解压到用户家目录即可。
我的Emacs配置文件内容为:
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
|
# cat ~/.emacs
;; 禁用开机启动画面
(setq inhibit-startup-message t)
;; 默认tab为4个宽度
(setq-default tab-width 4)
(setq fill-column 70)
;; 显示设置
(display-time-mode t)
(column-number-mode t)
;; 高亮显示选中块
(transient-mark-mode t)
;; 支持外部复制粘贴
(setq x-select-enable-clipboard t)
;; 显示括号匹配
(show-paren-mode t)
(setq show-paren-style 'parentheses)
;; 多窗口设置
;;(require 'window-numbering)
;;(window-numbering-mode 1)
;; 设置显示底边栏(时间,行列号),字体
;(setq display-time-day-and-date t)
(display-time-mode 1)
(setq display-time-24hr-format t)
(setq display-time-use-mail-icon t) ;; 邮件设置图标
(setq frame-title-format "LavenLiu@%b")
;; GDB设置,多窗口GDB
(setq gdb-many-windows t)
;; 语法高亮设置
(global-font-lock-mode t)
;; 设置用'y'或'n'代替'yes'或'no'
(fset 'yes-or-no-p 'y-or-n-p)
;;;; yasnippet setting
(add-to-list 'load-path "~/.emacs.d/elpa/yasnippet")
(require 'yasnippet)
(yas/global-mode 1)
;; 关闭自动保存
(setq auto-save-default nil)
(setq make-backup-files nil)
;;这几句是我的全局配置,避免出现多语言混乱。
(set-buffer-file-coding-system 'utf-8)
(set default-buffer-file-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-language-environment 'UTF-8)
(set-locale-environment "UTF-8")
;; 设置光标和指针颜色
(set-cursor-color "red")
(set-mouse-color "goldenrod")
;; 设置选中区域的颜色
(set-face-background 'region "yellow")
;; 在文件末尾添加一空白行
(setq require-final-newline t)
(setq track-eol t)
;; Perl的开发环境PDE设置
(add-to-list 'load-path "~/.emacs.d/elpa/pde/lisp")
(load "pde-load")
;; ===============================================
;; 我的自定义函数,用来打开我的GTD文件,并绑定到一个快捷键上
(defun gtd ()
(interactive)
(find-file "~/Desktop/iGTD/iGTD.org")
)
(global-set-key "\C-cx" 'gtd)
;;; 自动补全配置
(add-to-list 'load-path "~/.emacs.d/elpa/auto-complete")
(require 'auto-complete)
;;; Python的自动补全配置
(add-to-list 'load-path "~/.emacs.d/elpa/python-environment")
(add-to-list 'load-path "~/.emacs.d/elpa/jedi")
(add-to-list 'load-path "~/.emacs.d/elpa/jedi-core")
(add-to-list 'load-path "~/.emacs.d/elpa/virtualenv")
(add-to-list 'load-path "~/.emacs.d/elpa/ctable")
(add-to-list 'load-path "~/.emacs.d/elpa/concurrent")
(add-to-list 'load-path "~/.emacs.d/elpa/deferred")
(add-to-list 'load-path "~/.emacs.d/elpa/epc")
(require 'popup)
(require 'ctable)
(require 'concurrent)
(require 'epc)
(add-hook 'python-mode-hook 'jedi:setup)
(autoload 'jedi:setup "jedi" nil t)
(setq jedi:complete-on-dot t)
(add-to-list 'load-path "~/.emacs.d/elpa/popup")
|
lisp目录结构为:
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
|
# tree -L 2 -d ~/.emacs.d
/root/
.emacs.d
├── auto-save-list
├── elpa
│ ├── archives
│ ├── auto-complete
│ ├── concurrent
│ ├── ctable
│ ├── deferred
│ ├── epc
│ ├── gnupg
│ ├── jedi
│ ├── jedi-core
│ ├── pde
│ ├── popup
│ ├── python-environment
│ ├── virtualenv
│ └── yasnippet
├── eshell
└── pde
├── contrib
├── doc
├── templates
├── tools
└── tree-widget
23 directories
|
有了以上的配置,我们的Perl及Python的编程环境就配置好了。有了好的编程环境,使用起来就使人舒心。接下来看个编辑效果及运行效果吧:
编辑效果为:
好了,配置完毕,开始享受编程的乐趣吧。
版权声明:原创作品,如需转载,请注明出处。否则将追究法律责任