~/.emacs.d/init.el
;; 一打开就起用 org 模式。
(setq default-major-mode ‘org-mode)
;;(add-to-list ‘auto-mode-alist ‘("\\.org\\‘" . org-mode))
;; 语法高亮
(global-font-lock-mode t)
;; 以 y/n代表 yes/no
(fset ‘yes-or-no-p ‘y-or-n-p)
;; 显示括号匹配
(show-paren-mode t)
(setq show-paren-style ‘parentheses)
;; 显示时间,格式如下
(display-time-mode 1)
;; 隐藏tool-bar
(tool-bar-mode -1)
;;(scroll-bar-mode -1)
;;(tooltip-mode -1)
;;(menu-bar-mode -1)
;; 显示行号
(global-linum-mode)
(setq column-number-mode t)
;; 设置默认tab宽度为4
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
;; 支持emacs和外部程序的粘贴
(setq x-select-enable-clipboard t)
;; 在标题栏提示你目前在什么位置
(setq frame-title-format "%[email protected]%f")
;; org推荐配置
(global-set-key "\C-cl" ‘org-store-link)
(global-set-key "\C-cc" ‘org-capture)
(global-set-key "\C-ca" ‘org-agenda)
(global-set-key "\C-cb" ‘org-iswitchb)
;;添加mpls源
(require ‘package)
(add-to-list ‘package-archives ‘("melpa" . "http://melpa.org/packages/") t)
;;设置spacemacs主题
(add-to-list ‘load-path "~/.emacs.d/elpa/spacemacs-theme-20151106.1501")
(require ‘spacemacs-common)
(deftheme spacemacs-dark "Spacemacs theme, the dark version")
(deftheme spacemacs-light "Spacemacs theme, the light version")
(create-spacemacs-theme ‘dark ‘spacemacs-dark)
(provide-theme ‘spacemacs-dark)
;;加载evil
(add-to-list ‘load-path "~/.emacs.d/elpa/evil-20151109.829")
(require ‘evil)
(evil-mode 1)
;;加载markdown
(autoload ‘markdown-mode "markdown-mode"
"Major mode for editing Markdown files" t)
(add-to-list ‘auto-mode-alist ‘("\\.text\\‘" . markdown-mode))
(add-to-list ‘auto-mode-alist ‘("\\.markdown\\‘" . markdown-mode))
(add-to-list ‘auto-mode-alist ‘("\\.md\\‘" . markdown-mode))
;;加载番茄时钟
(add-to-list ‘load-path "~/.emacs.d/elpa/pomodoro-20150716.1046")
(require ‘pomodoro)
(pomodoro-add-to-mode-line)
;;加载window-numbering
(add-to-list ‘load-path "~/.emacs.d/elpa/window-numbering-20150228.1247")
(require ‘window-numbering)
(window-numbering-mode 1)
;;加载hybrid
(add-to-list ‘load-path "~/.emacs.d/elpa/hybrid-mode")
(require ‘hybrid-mode)
(hybrid-mode 1)