diff options
| author | bh <qn+git@excalibur.computer> | 2025-12-10 17:24:50 +0800 |
|---|---|---|
| committer | bh <qn+git@excalibur.computer> | 2025-12-10 17:24:50 +0800 |
| commit | 03adcf13345cc04d3bee259239794f4c4e55610c (patch) | |
| tree | bd3dd74bb8000cccb7029f806ae254cb7169420f /config | |
Initial Commit!
Diffstat (limited to 'config')
| -rw-r--r-- | config/evil.el | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/config/evil.el b/config/evil.el new file mode 100644 index 0000000..e335c54 --- /dev/null +++ b/config/evil.el @@ -0,0 +1,21 @@ +;; Evil: Vim emulation layer +;; Must disable evil-want-keybinding before loading evil +;; This allows evil-collection to handle mode-specific keybindings +(setq evil-want-keybinding nil) + +(use-package evil + :init + (setq evil-want-integration t) ;; Required for evil-collection + (setq evil-undo-system 'undo-redo) ;; Use Emacs 28+ built-in undo-redo + :config + (evil-mode 1)) + ;; Restore Emacs-style C-n/C-p in insert mode for line movement + ;; (define-key evil-insert-state-map (kbd "C-n") 'next-line) + ;; (define-key evil-insert-state-map (kbd "C-p") 'previous-line)) + +(use-package evil-collection + :after evil + :straight (evil-collection :type git :host github :repo "emacs-evil/evil-collection" + :files (:defaults "modes")) + :config + (evil-collection-init)) ;; Provides Evil bindings for many Emacs modes |
