thought_garden/evil.org
Dibyashanu Pati 7d190ba093 more emacs configurations
Added general, evil config
2025-02-11 17:35:33 +05:30

41 lines
1.6 KiB
Org Mode

:PROPERTIES:
:ID: 3b7e762e-cb8c-4d89-9147-6a50f921e9d3
:END:
#+title: EVIL
[[https://github.com/emacs-evil/evil][Evil]] is an extensible vi/vim layer for [[id:0a87430b-6616-4f92-8ecc-22ceeebf43c6][Emacs]]. Because... let's face it. The Vim keybindings are just plain better.
#+begin_src elisp
(use-package evil
:init ;; tweak evil's configuration before loading it
(setq evil-want-integration t ;; This is optional since it's already set to t by default.
evil-want-keybinding nil
evil-vsplit-window-right t
evil-split-window-below t
evil-undo-system 'undo-redo) ;; Adds vim-like C-r redo functionality
(evil-mode))
(use-package evil-collection
:after evil
:config
;; Do not uncomment this unless you want to specify each and every mode
;; that evil-collection should works with. The following line is here
;; for documentation purposes in case you need it.
;; (setq evil-collection-mode-list '(calendar dashboard dired ediff info magit ibuffer))
(add-to-list 'evil-collection-mode-list 'help) ;; evilify help mode
(evil-collection-init))
(use-package evil-tutor)
;; Using RETURN to follow links in Org/Evil
;; Unmap keys in 'evil-maps if not done, (setq org-return-follows-link t) will not work
(with-eval-after-load 'evil-maps
(define-key evil-motion-state-map (kbd "SPC") nil)
(define-key evil-motion-state-map (kbd "RET") nil)
(define-key evil-motion-state-map (kbd "TAB") nil))
;; Setting RETURN key in org-mode to follow links
(setq org-return-follows-link t)
#+end_src
* References
+ https://github.com/emacs-evil/evil