diff options
Diffstat (limited to 'substrate.el')
-rw-r--r-- | substrate.el | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/substrate.el b/substrate.el index f0c916d..aa02727 100644 --- a/substrate.el +++ b/substrate.el @@ -37,6 +37,9 @@ (defcustom substrate-configure-theme t "Configure the default theme (evangelion) as part of the substrate init" :type 'boolean :group 'substrate) +(defcustom substrate-enable-evil nil + "Enable evil-mode and the Vi-like keyboard mapping" + :type 'boolean :group 'substrate) (defun substrate-set-theme (theme) @@ -139,6 +142,25 @@ If the new path's directories does not exist, create them." :config (which-key-mode)) + (use-package evil + :ensure t + :if substrate-enable-evil + + :init + (setq evil-respect-visual-line-mode t) + (setq evil-undo-system 'undo-redo) + + :config + (evil-mode) + + ;; If you use Magit, start editing in insert state + (add-hook 'git-commit-setup-hook 'evil-insert-state) + + ;; Configuring initial major mode for some modes + (evil-set-initial-state 'eat-mode 'emacs) + (evil-set-initial-state 'vterm-mode 'emacs)) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Minibuffer/completion settings |