码迷,mamicode.com
首页 > 系统相关 > 详细

我的第一份 emacs 配置

时间:2015-11-11 06:20:49      阅读:973      评论:0      收藏:0      [点我收藏+]

标签:

~/.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 "%b@%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)

 

我的第一份 emacs 配置

标签:

原文地址:http://www.cnblogs.com/liuGDFT/p/4955016.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!