diff options
author | Kyle Meyer <meyerkya@gmail.com> | 2013-06-20 11:36:18 -0400 |
---|---|---|
committer | Kyle Meyer <meyerkya@gmail.com> | 2013-06-30 20:53:00 -0400 |
commit | b8ae17dc4c1ca7e3ec3901f94bade468fd32e261 (patch) | |
tree | f6f5890b1ac9cf9081470a138082a582e473bb7a /init | |
parent | 34498eba6404fcc0f73ecd91062afe036df12219 (diff) | |
download | emacs.d-b8ae17dc4c1ca7e3ec3901f94bade468fd32e261.tar.gz |
remove evil
Diffstat (limited to 'init')
-rw-r--r-- | init/10-km-pkg.el | 1 | ||||
-rw-r--r-- | init/km-evil.el | 126 | ||||
-rw-r--r-- | init/km-func.el | 6 | ||||
-rw-r--r-- | init/km-keychord.el | 15 |
4 files changed, 21 insertions, 127 deletions
diff --git a/init/10-km-pkg.el b/init/10-km-pkg.el index 3374c54..75bf4ec 100644 --- a/init/10-km-pkg.el +++ b/init/10-km-pkg.el @@ -7,7 +7,6 @@ (require 'cl) (defvar km/packages '( - evil undo-tree key-chord org diff --git a/init/km-evil.el b/init/km-evil.el deleted file mode 100644 index 0569852..0000000 --- a/init/km-evil.el +++ /dev/null @@ -1,126 +0,0 @@ -;; evil mode uses undo-tree -(require 'undo-tree) - -(require 'evil) -(evil-mode 1) -;; much of this it taken from http://permalink.gmane.org/gmane.emacs.vim-emulation/1135 - -;; red box in emacs mode -(setq evil-emacs-state-cursor '("red" box)) - -(loop for (mode . state) in '((dired-mode . emacs) - (org-agenda-mode . emacs) - (ibuffer-mode . emacs)) - do (evil-set-initial-state mode state)) - -(define-key evil-motion-state-map "H" 'evil-scroll-up) -(define-key evil-motion-state-map "L" 'evil-scroll-down) - -(defun km/save-and-kill-buffer () - "Save current buffer and then kill it" - (interactive) - (save-buffer) - (kill-this-buffer) - ) - -(define-key evil-normal-state-map ",w" 'save-buffer) -(define-key evil-normal-state-map ",q" 'kill-this-buffer) -(define-key evil-normal-state-map ",d" 'km/save-and-kill-buffer) -(define-key evil-normal-state-map "Q" 'fill-paragraph) - -(evil-define-key 'visual emacs-lisp-mode-map - ",e" 'eval-region) -(evil-define-key 'visual lisp-interaction-mode-map - ",e" 'eval-region) - -(evil-define-key 'normal mail-mode-map ",q" 'server-edit) -(evil-define-key 'normal mail-mode-map ",d" 'server-edit) -(define-key evil-normal-state-map ",e" 'server-edit) - -(define-key evil-visual-state-map ",c" 'comment-or-uncomment-region) -(fset 'comment-this-line ;; this depends on evil bindings - "0v$,c") -(define-key evil-normal-state-map ",c" 'comment-this-line) - -(require 'key-chord) -(key-chord-mode 1) - -(key-chord-define-global ",r" 'km/recentf-ido-find-file) -(key-chord-define-global ",t" 'org-capture) -;; instead of alt-x -(key-chord-define-global ",x" 'smex) -(key-chord-define-global ",f" 'find-file) -(key-chord-define-global ",g" 'magit-status) -(key-chord-define-global ",b" 'ido-switch-buffer) -(key-chord-define-global ";a" 'evil-normal-state) - -;; org bindings -(defun km/always-insert-item () - (interactive) - (if (not (org-in-item-p)) - (insert "\n- ") - (org-insert-item))) - -;; most from cofi config -(evil-define-key 'normal org-mode-map - (kbd "RET") 'org-open-at-point - "za" 'org-cycle - "zA" 'org-shifttab - "zm" 'hide-body - "zr" 'show-all - "zo" 'show-subtree - "zO" 'show-all - "zc" 'hide-subtree - "zC" 'hide-all - ",e" 'org-export-as-pdf - ",a" 'org-archive-subtree - ",s" 'org-todo - "O" (lambda () - (interactive) - (end-of-line) - (org-insert-heading t) - (evil-append nil)) - "o" (lambda () - (interactive) - (end-of-line) - (km/always-insert-item) - (evil-append nil)) -(kbd "M-j") 'org-shiftleft - (kbd "M-k") 'org-shiftright - (kbd "M-H") 'org-metaleft - (kbd "M-J") 'org-metadown - (kbd "M-K") 'org-metaup - (kbd "M-L") 'org-metaright) - -(evil-define-key 'normal orgstruct-mode-map - (kbd "RET") 'org-open-at-point - "za" 'org-cycle - "zA" 'org-shifttab - "zm" 'hide-body - "zr" 'show-all - "zo" 'show-subtree - "zO" 'show-all - "zc" 'hide-subtree - "zC" 'hide-all - (kbd "M-j") 'org-shiftleft - (kbd "M-k") 'org-shiftright - (kbd "M-H") 'org-metaleft - (kbd "M-J") 'org-metadown - (kbd "M-K") 'org-metaup - (kbd "M-L") 'org-metaright) - -(evil-define-key 'insert org-mode-map - (kbd "M-j") 'org-shiftleft - (kbd "M-k") 'org-shiftright - (kbd "M-H") 'org-metaleft - (kbd "M-J") 'org-metadown - (kbd "M-K") 'org-metaup - (kbd "M-L") 'org-metaright) - -(evil-define-key 'insert orgstruct-mode-map - (kbd "M-j") 'org-shiftleft - (kbd "M-k") 'org-shiftright - (kbd "M-H") 'org-metaleft - (kbd "M-J") 'org-metadown - (kbd "M-K") 'org-metaup - (kbd "M-L") 'org-metaright) diff --git a/init/km-func.el b/init/km-func.el index 7e18b6e..4b3db51 100644 --- a/init/km-func.el +++ b/init/km-func.el @@ -57,3 +57,9 @@ user." (find-file file))) (global-set-key (kbd "C-x F") 'km/find-file-as-root) + +(defun km/save-and-kill-buffer () + "Save current buffer and then kill it" + (interactive) + (save-buffer) + (kill-this-buffer)) diff --git a/init/km-keychord.el b/init/km-keychord.el new file mode 100644 index 0000000..8d3090c --- /dev/null +++ b/init/km-keychord.el @@ -0,0 +1,15 @@ +(require 'key-chord) +(key-chord-mode 1) + +(key-chord-define-global ",r" 'km/recentf-ido-find-file) +(key-chord-define-global ",t" 'org-capture) +;; instead of alt-x +(key-chord-define-global ",x" 'smex) +(key-chord-define-global ",f" 'find-file) +(key-chord-define-global ",g" 'magit-status) +(key-chord-define-global ",b" 'ido-switch-buffer) + +(key-chord-define-global ",s" 'save-buffer) +(key-chord-define-global ",q" 'kill-this-buffer) +(key-chord-define-global ",d" 'km/save-and-kill-buffer) +(key-chord-define-global ",e" 'eval-region) |