链接:http://pan.baidu.com/s/1c0fjY3e 密码:j8pe
网盘里的文件为我的配置文件,及所使用的lisp源码包。下载后,可以解压到用户家目录即可。
我的Emacs配置文件内容为:
# 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目录结构为:
# 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的编程环境就配置好了。有了好的编程环境,使用起来就使人舒心。接下来看个编辑效果及运行效果吧:
编辑效果为:
好了,配置完毕,开始享受编程的乐趣吧。
本文出自 “天道酬勤” 博客,请务必保留此出处http://lavenliu.blog.51cto.com/5060944/1688793
原文地址:http://lavenliu.blog.51cto.com/5060944/1688793