.emacs

来源:互联网 发布:几何网络是什么意思 编辑:程序博客网 时间:2024/06/07 03:34
;默认文件保存路径
;(setq command-line-default-directory "C:\BUFFER\")


;外观
;窗口
(set-frame-position (selected-frame) 200 0);离屏幕主上角像素
(set-frame-width (selected-frame) 85)
(set-frame-height (selected-frame) 32)
;主题
;(require 'color-theme)
;(color-theme-initialize)
;(color-theme-calm-forest)
;字体
; Setting English FontConsolasLucida Console
(set-face-attribute
'default nil :font "Consolas 12")
; Chinese Font
(dolist (charset '(kana han symbol cjk-misc bopomofo))
(set-fontset-font (frame-parameter nil 'font)
charset
(font-spec :family "Microsoft Yahei" :size 18)))


;工具
;;取消滚动栏
(set-scroll-bar-mode nil)
;;取消工具栏
(tool-bar-mode nil)
(custom-set-variables
'(column-number-mode t)
'(display-time-mode t)
'(tool-bar-mode nil))
(custom-set-faces
)
;; mode line上的时间显示
(display-time-mode t)
(setq display-time-24hr-format t)
(setq display-time-day-and-date nil)
(setq display-time-interval 60)
;方便的小细节
(setq visible-bell t);关闭出错提示音
(mouse-avoidance-mode 'animate);鼠标自动让开



;编辑
;设置行号列号
(global-linum-mode t);行
(setq column-number-mode t) ;列
(setq linum-format "%4d ");显示行号字符数
;高亮显示当前编辑行
;(global-hl-line-mode 1)
;;默认显示 80列就换行
(setq default-fill-column 80)
;;光标显示为一竖线
(setq-default cursor-type 'bar)
;;支持emacs和外部程序的粘贴
(setq x-select-enable-clipboard t)
;自动补全括号
(electric-pair-mode t)
;普通编辑模式下设置tab长度为4,而不是8
(setq-default indent-tabs-mode nil)
;; control length used to offset.
(setq-default c-basic-offset 4)
;; control how emacs explain TAB.
(setq-default tab-width 4)
;org-mode下自动换行
(add-hook 'org-mode-hook (lambda () (setq truncate-lines nil)))