-*** [[https://github.com/noctuid/general.el][general]]
-
- #+begin_src emacs-lisp
-(use-package general
- :demand t
- :config
- (general-evil-setup t)
-
- (general-override-mode)
-
- (general-create-definer
- amin--mode-leader-keys
- :keymaps 'override
- :states '(emacs normal visual motion insert)
- :non-normal-prefix "C-,"
- :prefix ",")
-
- (general-create-definer
- amin--leader-keys
- :keymaps 'override
- :states '(emacs normal visual motion insert)
- :non-normal-prefix "M-m"
- :prefix "SPC"))
-#+end_src
-
-*** evil
-
-#+begin_src emacs-lisp
-(use-package evil
- :demand t
- :hook (view-mode . evil-motion-state)
- :config (evil-mode 1)
- (general-swap-key nil '(normal motion) ";" ":")
- (setq evil-want-visual-char-semi-exclusive t))
-#+end_src
-
-#+begin_src emacs-lisp
-(use-package evil-escape
- :demand t
- :init
- (setq evil-escape-excluded-states '(normal visual multiedit emacs motion)
- evil-escape-excluded-major-modes '(neotree-mode)
- evil-escape-key-sequence "jk"
- evil-escape-delay 0.25)
- :general
- (:states '(insert replace visual operator)
- "C-g" #'evil-escape)
- :config
- (evil-escape-mode 1)
- ;; no `evil-escape' in minibuffer
- (push #'minibufferp evil-escape-inhibit-functions))
-#+end_src
-
-#+begin_src emacs-lisp
-(use-package evil-org
- :hook (org-mode . evil-org-mode)
- :general
- (nvmap evil-org-mode-map
- "TAB" 'org-cycle
- "S-TAB" 'org-cycle)
- :config
- (evil-org-set-key-theme)
- (require 'evil-org-agenda)
- (evil-org-agenda-set-keys)
- (nmap evil-org-mode-map
- [backtab] 'org-shifttab)
- (after! org-src
- (define-key org-src-mode-map [remap evil-write] 'org-edit-src-save)
- (define-key org-src-mode-map [remap evil-save-and-close]
- (lambda () (interactive)
- (org-edit-src-save)
- (org-edit-src-exit)))
- (define-key org-src-mode-map [remap evil-save-modified-and-close]
- (lambda () (interactive)
- (org-edit-src-save)
- (org-edit-src-exit)))))
-#+end_src
-
-#+begin_src emacs-lisp
-(amin--leader-keys
- "B" '(:ignore t :wk "Borg")
- "BA" 'borg-activate
- "Ba" 'borg-assimilate
- "Bb" 'borg-build
- "Bc" 'borg-clone
- "Bd" 'epkg-describe-package
- "Bp" 'epkg-list-packages
- "Br" 'borg-remove
- "Bu" 'epkg-update
-
- "b" '(:ignore t :wk "buffers")
- "bb" 'ibuffer-list-buffers
- "bk" 'kill-this-buffer
- "bs" 'save-buffer
-
- "f" '(:ignore t :wk "files")
-
- "h" '(:ignore t :wk "help")
- "hc" 'describe-char
- "hf" 'describe-function
- "hF" 'describe-face
- "hi" 'info
- "hk" 'describe-key
- "hl" 'view-lossage
- "hv" 'describe-variable
-
- "o" 'other-window
-
- "w" '(:ignore t :wk "window")
- "wo" 'other-window
-
- "q" '(:ignore t :wk "quit")
- "qq" 'save-buffers-kill-terminal)
-#+end_src
-