主要是 非编程类的, 注释详尽
;; -*-mode:lisp-interaction-*- -*- coding: gbk-dos -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 外观显示 ;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;禁用启动画面
(setq inhibit-startup-message t)
;; *scratch* buffer的提示信息
(setq initial-scratch-message "")
;; 字体 可 "Monaco-11" 来改字号
(set-default-font "Monaco-12")
;; 设置中文字体
(set-fontset-font "fontset-default"
'gb18030 '("微软雅黑" . "unicode-bmp"))
;; Frame 中的字体添加
(add-to-list 'default-frame-alist '(font . "Monaco-12"))
;; 调出 windows 的字体对话框, 奇怪的有些字体安装在系统了却没有出现, 在 notepad 中可以看到
;; (w32-select-font nil t)
;;尺寸
(setq initial-frame-alist '( (width . 80) (height . 25)))
;;标题格式, "文件名 @ 全路径文件名"
(setq frame-title-format '("%b @ " buffer-file-name))
;;取消显示工具栏
(tool-bar-mode nil)
;; 取消显示菜单栏
(menu-bar-mode nil)
;;去掉滚动条, 鼠标滚轮代替
(set-scroll-bar-mode nil)
;;底栏显示列号
(setq column-number-mode t)
;;显示括号匹配
(show-paren-mode t)
;;显示日期
(setq display-time-day-and-date t)
;;显示时间
(display-time)
;;时间为24小时制
(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)
;;光标靠近鼠标指针时,让鼠标指针自动让开,别挡住视线。
(mouse-avoidance-mode 'animate)
;;指针不闪,不恍花眼睛。
(blink-cursor-mode -1)
(transient-mark-mode 1)
;; 显示行号切换
(global-set-key [C-f6] 'global-linum-mode)
;;语法加亮
(global-font-lock-mode t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 全局设定 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;y/n替代yes/no
(fset 'yes-or-no-p 'y-or-n-p)
;;设置粘贴缓冲条目数量
(setq kill-ring-max 200)
;;递归使用minibuffer
(setq enable-recursive-minibuffers t)
;;支持外部程序粘贴
(setq x-select-enable-clipboard t)
;; 默认 80 列自动换行, 需要 M-x auto-fill-mode 模式下
(setq default-fill-column 80)
;;取消错误铃,闪屏
(setq visible-bell t)
;;设置默认工作目录
(setq default-directory "~/work/")
;;默认为text模式
(setq default-major-mode 'text-mode)
;; 我的信息
(setq user-full-name "xxxxx")
(setq user-mail-address "xxxxx@gmail.com")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 我的插件目录导入 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 添加目录和二级子目录
(defun add-to-load-path (load-path-name)
(let (default-directory-old default-directory)
(progn (cd load-path-name)
(normal-top-level-add-subdirs-to-load-path))))
(add-to-load-path "~/etc/emacs23/site-lisp")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 风格 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'color-theme)
(color-theme-initialize)
(color-theme-arjen)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Unicad ;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'unicad)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; org ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; htmlize
;;;; 网上下载的 htmlize 会使用报错: invalid face, 解决方法:
;;;; 将下面一行:
;;;; for f = face then (face-attribute f :inherit)
;;;; 改为
;;;; for f = face then (or (face-attribute f :inherit) 'unspecified)
(require 'htmlize)
(setq org-publish-project-alist
'(("orgfile"
:base-directory "~/work/org/source"
:publishing-directory "~/work/org/publish"
:base-extension "org"
:section-numbers nil
:auto-index t
:headline-levels 3
:publishing-function org-publish-org-to-html
:style "<link rel=\"stylesheet\" href=\"../other/mystyle.css\" type=\"text/css\">")
("images"
:base-directory "~/work/org/source/image"
:base-extension "jpg\\|gif\\|png\\|bmp"
:publishing-directory "~/work/org/publish/image"
:publishing-function org-publish-attachment)
("other"
:base-directory "~/work/org/source/other"
:base-extension "css\\|el"
:publishing-directory "~/work/org/publish/other"
:publishing-function org-publish-attachment
("website" :components ("orgfile" "images")))))
;; org 自动换行
(add-hook 'org-mode-hook
(lambda () (setq truncate-lines nil)))
2011年4月02日 14:30
非常感谢,对我很有帮助。
I'm a novice in emacs' kingdom, but there is a day destined.You know.
喜欢你的很多文章。希望我们将来会有更多交流。
2011年5月04日 14:00
@Richard: 想不到随意写的笔记对你还有帮助,我会好好把自己的笔记贴上来的。
2012年12月17日 16:32
对俺帮助也大 呵呵 《你是如何成为 Lisp 程序员的》 很好啊 宝石 哈哈 谢谢啊