『Emacs』我的.emacs文件

参考: http://www.emacs.cn/DotEmacs/DotEmacs
http://ann77.stu.cdut.edu.cn/EmacsDisplayLineNumber.html

Update: 2007.8.14 By: Border

Code:
(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.
'(transient-mark-mode (quote identity)))
(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.
)

;;设置个人信息
(setq user-full-name "Border")
(setq user-mail-address "borderj@gmail.com")

;在标题栏提示你目前所在位置.
(setq frame-title-format '("Emacs@"system-name": %b %+%+ %f"))

;;界面字体背景颜色主题
(set-foreground-color "green")
(set-background-color "black")
(set-cursor-color "gold")
(set-mouse-color "gold")

;;禁用启动信息
(setq inhibit-startup-message t)

;;关闭烦人的出错时的提示声
(setq visible-bell t)

;; 设置光标为竖线
(setq-default cursor-type 'bar)

;;Tab设置4
(setq default-tab-width 4)
(setq tab-width 4)

;;光标靠近鼠标的时候,让鼠标自动让开,别挡住视线
(mouse-avoidance-mode 'animate)

;;下面的这个设置可以让光标指到某个括号的时候显示与它匹配的括号
(show-paren-mode t)
(setq show-paren-style 'parentheses)

;; 加载显示行号模块
(require 'display-line-number)
;; 如果想所有打开的文件都显示行的话就打开下面的注释
(global-display-line-number-mode 1)

;;显示当前所在的行号和列号
(column-number-mode t)

;;防止页面滚动时跳动
(setq scroll-margin 3
scroll-conservatively 10000)

;; 所有的备份文件转移到~/backups目录下
;(setq backup-directory-alist (quote (("." . "~/backups"))))
;(setq version-control t)
;(setq kept-old-versions 2)
;(setq kept-new-versions 5)
;(setq delete-old-versions t)
;(setq backup-directory-alist '(("." . "~/backups")))
;(setq backup-by-copying t)
;; Emacs 中,改变文件时,默认都会产生备份文件(以 ~ 结尾的文件)。可以完全去掉
;; (并不可取),也可以制定备份的方式。这里采用的是,把所有的文件备份都放在一
;; 个固定的地方("~/var/tmp")。对于每个备份文件,保留最原始的两个版本和最新的
;; 五个版本。并且备份的时候,备份文件是复本,而不是原件。

;;不产生备份文件
(setq make-backup-files nil)

;;设置kill-ring-max(我不知道怎么翻译这个词:)为200,以防不测:)
(setq kill-ring-max 200)

;; 当有两个文件名相同的缓冲时,使用前缀的目录名做 buffer 名字,不用原来的
;; foobar 形式。
(setq uniquify-buffer-name-style 'forward)

;;显示日期
(setq display-time-day-and-date t)
(display-time)

;;显示时间
(setq display-time-24hr-format t)
(setq display-time-day-and-date t)
(setq display-time-use-mail-icon t)
(setq display-time-interval 10)

;; 设置时间戳,标识出最后一次保存文件的时间。
(setq time-stamp-active t)
(setq time-stamp-warn-inactive t)
(setq time-stamp-format "%:y-%02m-%02d %3a %02H:%02M:%02S K.T")

;;设置默认工作目录
(setq default-directory "f:/border")

;;'y' for 'yes', 'n' for 'no'
(fset 'yes-or-no-p 'y-or-n-p)


;; 代码折叠
(load-library "hideshow")
(add-hook 'java-mode-hook 'hs-minor-mode)
(add-hook 'perl-mode-hook 'hs-minor-mode)
(add-hook 'php-mode-hook 'hs-minor-mode)
(add-hook 'emacs-lisp-mode-hook 'hs-minor-mode)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; 启动最大化窗口设置 - START
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun w32-restore-frame ()
"Restore a minimized frame"
(interactive)
(w32-send-sys-command 61728))
(defun w32-maximize-frame ()
"Maximize the current frame"
(interactive)
(w32-send-sys-command 61488))
;;; Maximum Windows Frame
(w32-maximize-frame)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; 启动最大化窗口设置 - END
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



文件下载:
http://public.box.net/border 中的".emacs"和"display-line-number.el"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值