aboutsummaryrefslogtreecommitdiffstats
path: root/_emacs.d
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@gmail.com>2016-02-24 22:18:06 +0800
committerAaron LI <aaronly.me@gmail.com>2016-02-24 22:18:06 +0800
commit112c35a1235aaa384c0154b4bf9378f9dab25964 (patch)
tree96a96fb86b186e94ebe9b75b453f42bead25fdd8 /_emacs.d
parentddf95ab8e6d34bfe92b7745aab79d3b8632abaf9 (diff)
downloaddotfiles-112c35a1235aaa384c0154b4bf9378f9dab25964.tar.bz2
_emacs.d/personal: add 30-linum.el and 50-evil.el
Diffstat (limited to '_emacs.d')
-rw-r--r--_emacs.d/personal/30-fonts.el2
-rw-r--r--_emacs.d/personal/30-linum.el66
-rw-r--r--_emacs.d/personal/40-orgmode.el2
-rw-r--r--_emacs.d/personal/50-evil.el38
-rw-r--r--_emacs.d/personal/50-fcitx.el2
-rw-r--r--_emacs.d/personal/50-latex.el3
-rw-r--r--_emacs.d/personal/50-mu4e.el3
7 files changed, 111 insertions, 5 deletions
diff --git a/_emacs.d/personal/30-fonts.el b/_emacs.d/personal/30-fonts.el
index 09645dd..ab2c1ed 100644
--- a/_emacs.d/personal/30-fonts.el
+++ b/_emacs.d/personal/30-fonts.el
@@ -1,4 +1,4 @@
-;;; ~/.emacs.d/personal/fonts.el --- Fonts configurations for Emacs.
+;;; ~/.emacs.d/personal/30-fonts.el --- Fonts configurations for Emacs.
;;
;; -*- mode: emacs-lisp -*-
;; vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=lisp:
diff --git a/_emacs.d/personal/30-linum.el b/_emacs.d/personal/30-linum.el
new file mode 100644
index 0000000..8ce1571
--- /dev/null
+++ b/_emacs.d/personal/30-linum.el
@@ -0,0 +1,66 @@
+;;; ~/.emacs.d/personal/30-linum.el --- Configure linum-mode
+;;
+;; -*- mode: emacs-lisp -*-
+;; vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=lisp:
+;;
+;; Credits:
+;; [1] https://stackoverflow.com/a/3879664/4856091
+;; [2] https://github.com/redguardtoo/emacs.d - lisp/init-linum-mode.el
+;;
+;; Aaron LI
+;; 2016-02-24
+;;
+
+;;; Commentary:
+;; Configure linum-mode for Emacs.
+
+;;; Code:
+
+;; Turn on `linum-mode' globally
+(global-linum-mode t)
+
+;; Inhibit `linum-mode' for following specified modes
+(setq linum-mode-inhibit-modes-list '(eshell-mode
+ shell-mode
+ dictionary-mode
+ erc-mode
+ browse-kill-ring-mode
+ etags-select-mode
+ dired-mode
+ help-mode
+ ;text-mode
+ fundamental-mode
+ jabber-roster-mode
+ jabber-chat-mode
+ inferior-js-mode
+ inferior-python-mode
+ inferior-scheme-mode
+ twittering-mode
+ compilation-mode
+ weibo-timeline-mode
+ woman-mode
+ Info-mode
+ calc-mode
+ calc-trail-mode
+ comint-mode
+ inf-ruby-mode
+ gud-mode
+ org-mode
+ vc-git-log-edit-mode
+ log-edit-mode
+ term-mode
+ w3m-mode
+ speedbar-mode
+ mu4e-main-mode
+ mu4e-headers-mode
+ mu4e-view-mode
+ gnus-group-mode
+ gnus-summary-mode
+ gnus-article-mode
+ calendar-mode))
+(defadvice linum-on (around linum-on-inhibit-for-modes)
+ "Stop the load of linum-mode for some major modes."
+ (unless (member major-mode linum-mode-inhibit-modes-list)
+ ad-do-it))
+(ad-activate 'linum-on)
+
diff --git a/_emacs.d/personal/40-orgmode.el b/_emacs.d/personal/40-orgmode.el
index 0d609e7..70bec0a 100644
--- a/_emacs.d/personal/40-orgmode.el
+++ b/_emacs.d/personal/40-orgmode.el
@@ -1,4 +1,4 @@
-;;; ~/.emacs.d/personal/orgmode.el --- Org-mode configurations
+;;; ~/.emacs.d/personal/40-orgmode.el --- Org-mode configurations
;;
;; -*- mode: emacs-lisp -*-
;; vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=lisp:
diff --git a/_emacs.d/personal/50-evil.el b/_emacs.d/personal/50-evil.el
new file mode 100644
index 0000000..503efc8
--- /dev/null
+++ b/_emacs.d/personal/50-evil.el
@@ -0,0 +1,38 @@
+;;; ~/.emacs.d/personal/50-evil.el --- Custom configurations for Evil
+;;
+;; -*- mode: emacs-lisp -*-
+;; vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=lisp:
+;;
+;; Credit:
+;; [1] http://stackoverflow.com/a/10166400
+;;
+;; Aaron LI
+;; 2016-02-21
+;;
+
+;;; Commentary:
+;; Custom configurations for Evil.
+
+;;; Code:
+
+;;; ESC ALWAYS quits
+(define-key minibuffer-local-map [escape] 'minibuffer-keyboard-quit)
+(define-key minibuffer-local-ns-map [escape] 'minibuffer-keyboard-quit)
+(define-key minibuffer-local-completion-map [escape] 'minibuffer-keyboard-quit)
+(define-key minibuffer-local-must-match-map [escape] 'minibuffer-keyboard-quit)
+(define-key minibuffer-local-isearch-map [escape] 'minibuffer-keyboard-quit)
+(global-set-key [escape] 'keyboard-quit)
+
+;; evil-leader
+;; https://github.com/cofi/evil-leader
+(prelude-require-package 'evil-leader)
+(require 'evil-leader)
+(global-evil-leader-mode)
+(evil-leader/set-leader ",")
+
+;; evil-matchit: jump between matched tags in Emacs
+;; https://github.com/redguardtoo/evil-matchit
+(prelude-require-package 'evil-matchit)
+(require 'evil-matchit)
+(global-evil-matchit-mode 1)
+
diff --git a/_emacs.d/personal/50-fcitx.el b/_emacs.d/personal/50-fcitx.el
index 7448553..fb87a45 100644
--- a/_emacs.d/personal/50-fcitx.el
+++ b/_emacs.d/personal/50-fcitx.el
@@ -1,4 +1,4 @@
-;;; ~/.emacs.d/personal/fcitx.el --- Configurations for fcitx.el
+;;; ~/.emacs.d/personal/50-fcitx.el --- Configurations for fcitx.el
;;
;; -*- mode: emacs-lisp -*-
;; vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=lisp:
diff --git a/_emacs.d/personal/50-latex.el b/_emacs.d/personal/50-latex.el
index 4600c03..c73515a 100644
--- a/_emacs.d/personal/50-latex.el
+++ b/_emacs.d/personal/50-latex.el
@@ -1,4 +1,4 @@
-;;; ~/.emacs.d/personal/latex.el --- LaTeX settings for Prelude Emacs
+;;; ~/.emacs.d/personal/50-latex.el --- LaTeX settings for Prelude Emacs
;;
;; -*- mode: emacs-lisp -*-
;; vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=lisp:
@@ -15,3 +15,4 @@
;;; Code:
(setq-default TeX-engine 'xetex)
+
diff --git a/_emacs.d/personal/50-mu4e.el b/_emacs.d/personal/50-mu4e.el
index ad80acb..955acd0 100644
--- a/_emacs.d/personal/50-mu4e.el
+++ b/_emacs.d/personal/50-mu4e.el
@@ -1,4 +1,4 @@
-;;; ~/.emacs.d/personal/mu4e.el --- mu4e (mu for Emacs) configurations
+;;; ~/.emacs.d/personal/50-mu4e.el --- mu4e (mu for Emacs) configurations
;;
;; -*- mode: emacs-lisp -*-
;; vim: set ts=8 sw=2 tw=0 fenc=utf-8 ft=lisp:
@@ -291,3 +291,4 @@
;; set `mu4e' as emacs' default email program
(setq mail-user-agent 'mu4e-user-agent)
+