From 2d95e082f9abcde4bd8352beac8203f00b539565 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 10 Feb 2016 11:13:12 +0100 Subject: Update evil settings --- emacs/.emacs.d/init.el | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'emacs/.emacs.d/init.el') 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 -- cgit v1.2.3-54-g00ecf