Skip to content

.emacs[070720]

;; 关闭出错时的提示声
(setq visible-bell nil)
;;C++设置
(defun cpp-mode()
;; tab相关的设置
(setq indent-tabs-mode nil)
(setq tab-width 4)
;; 换行的同时对齐
(define-key c++-mode-map [return] ‘newline-and-indent)
;; C编辑风格
(c-set-style “stroustrup”)
(c-toggle-hungry-state)
(c-toggle-auto-state)
)
(add-hook ‘c++-mode-hook ‘cpp-mode)
;; 高亮匹配括号
(show-paren-mode t)
(setq show-paren-style ‘parentheses)
;; 版本控制
(setq version-control t)
(setq kept-new-versions 10)
(setq kept-old-versions 5)
;;显示时间
(display-time)
;;显示行号
(column-number-mode t)

One Comment

  1. yxnsu wrote:

    好簡潔,我的 .emacs 文件好長來的(一大部分是從王垠那里copy來的……哈)

    Tuesday, September 4, 2007 at 00:07 | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*