summaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/init.el')
-rw-r--r--emacs/.emacs.d/init.el26
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