diff options
author | Tom Willemse | 2016-02-10 11:13:12 +0100 |
---|---|---|
committer | Tom Willemse | 2016-02-10 11:13:12 +0100 |
commit | 2d95e082f9abcde4bd8352beac8203f00b539565 (patch) | |
tree | 41a52ce5c90b0ea9e74f5f5fe20ffc6ce3352395 /emacs/.emacs.d/init.el | |
parent | 31809b70e7f280cf712a16e51b271d62605af278 (diff) | |
download | dotfiles-2d95e082f9abcde4bd8352beac8203f00b539565.tar.gz dotfiles-2d95e082f9abcde4bd8352beac8203f00b539565.zip |
Update evil settings
Diffstat (limited to 'emacs/.emacs.d/init.el')
-rw-r--r-- | emacs/.emacs.d/init.el | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 2026543..7116b70 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -141,17 +141,6 @@ MODE1 is enabled and vice-versa." "Set the `disabled' property for each item in FUNCTIONS to nil." (mapc #'(lambda (f) (put f 'disabled nil)) functions)) -(defun oni:maybe-switch-to-normal-state () - "Switch the current buffer to normal state. - -Only do this when the mode is not in emacs state by default." - (unless (memql major-mode (oni:modes-starting-in 'emacs)) - (evil-normal-state))) - -(defun oni:modes-starting-in (state) - "Get a list of the modes whose default state is STATE." - (symbol-value (evil-state-property state :modes))) - ;;;; Module-specific settings (auto-init appt) @@ -716,6 +705,17 @@ Only do this when the mode is not in emacs state by default." ;; Update diff-hl when magit changes something. (add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh t) +;; Clear all keybindings from evil-insert-state so I can use normal +;; Emacs keybindings. +(add-hook 'evil-mode-hook 'oni:evil-clear-insert-state-keys) + +;; Make C-g do the same thing as ESC in most evil states. This should +;; always be done _after_ `oni:evil-clear-insert-state-keys'. +(add-hook 'evil-mode-hook 'oni:evil-set-normal-state-key :append) + +;; Change all keybindings for use with Colemak. +(add-hook 'evil-mode-hook 'oni:evil-setup-colemak) + (oni:add-hooks 'texinfo-mode-hook #'outline-minor-mode) @@ -832,8 +832,8 @@ Only do this when the mode is not in emacs state by default." (global-wakatime-mode) (evil-mode) (kill-local-variable 'mode-line-format) - (when (string-equal (system-name) "drd") - (require 'evil-colemak)) + ;; (when (string-equal (system-name) "drd") + ;; (require 'colemak-evil)) (global-evil-surround-mode)) (with-eval-after-load 'ruby |