evil
This commit is contained in:
@@ -1006,11 +1006,11 @@ This configuration affects general text editing, across all modes. First, some p
|
|||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = epkgs: with epkgs; [
|
extraPackages = epkgs: with epkgs; [
|
||||||
avy
|
avy
|
||||||
devil
|
|
||||||
edit-indirect
|
edit-indirect
|
||||||
embark
|
embark
|
||||||
god-mode
|
evil
|
||||||
meow
|
evil-collection
|
||||||
|
evil-org
|
||||||
string-inflection
|
string-inflection
|
||||||
];
|
];
|
||||||
extraConfig = builtins.readFile ./emacs-editing.el;
|
extraConfig = builtins.readFile ./emacs-editing.el;
|
||||||
@@ -1029,130 +1029,18 @@ but I'm worried that having too many repeat maps will also be annoying (I'll hav
|
|||||||
cancel them more frequently). In the end, I opted for Devil mode. It avoids modifier keys, and has
|
cancel them more frequently). In the end, I opted for Devil mode. It avoids modifier keys, and has
|
||||||
its own devil-mode-only repeat maps that don't interfere when using normal modifier key sequences.
|
its own devil-mode-only repeat maps that don't interfere when using normal modifier key sequences.
|
||||||
|
|
||||||
#+BEGIN_SRC elisp :tangle nil
|
|
||||||
(use-package devil
|
|
||||||
:disable t
|
|
||||||
:config
|
|
||||||
(global-devil-mode)
|
|
||||||
(setq devil-repeatable-keys
|
|
||||||
'(("%k /")
|
|
||||||
("%k d")
|
|
||||||
("%k k")
|
|
||||||
("%k m ^")
|
|
||||||
("%k m b" "%k m f" "%k m a" "% k m e")
|
|
||||||
("%k m @" "%k m h")
|
|
||||||
("%k m y")
|
|
||||||
("%k p" "%k n" "%k b" "%k f" "%k a" "%k e")
|
|
||||||
("%k s")
|
|
||||||
("%k m d" "%k m <backspace>"))))
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(defun meow-setup ()
|
(setopt evil-want-keybinding nil)
|
||||||
(setq meow-cheatsheet-layout meow-cheatsheet-layout-qwerty)
|
(require 'evil)
|
||||||
(meow-motion-define-key
|
(evil-mode 1)
|
||||||
'("j" . meow-next)
|
(require 'evil-collection)
|
||||||
'("k" . meow-prev)
|
(evil-collection-init)
|
||||||
'("<escape>" . ignore))
|
|
||||||
(meow-leader-define-key
|
|
||||||
;; Use SPC (0-9) for digit arguments.
|
|
||||||
'("1" . meow-digit-argument)
|
|
||||||
'("2" . meow-digit-argument)
|
|
||||||
;; '("3" . meow-digit-argument)
|
|
||||||
;; '("4" . meow-digit-argument)
|
|
||||||
;; '("5" . meow-digit-argument)
|
|
||||||
;; '("6" . meow-digit-argument)
|
|
||||||
;; '("7" . meow-digit-argument)
|
|
||||||
;; '("8" . meow-digit-argument)
|
|
||||||
;; '("9" . meow-digit-argument)
|
|
||||||
;; '("0" . meow-digit-argument)
|
|
||||||
;; '("/" . meow-keypad-describe-key)
|
|
||||||
;; '("?" . meow-cheatsheet))
|
|
||||||
;; (meow-normal-define-key
|
|
||||||
;; '("0" . meow-expand-0)
|
|
||||||
;; '("9" . meow-expand-9)
|
|
||||||
;; '("8" . meow-expand-8)
|
|
||||||
;; '("7" . meow-expand-7)
|
|
||||||
;; '("6" . meow-expand-6)
|
|
||||||
;; '("5" . meow-expand-5)
|
|
||||||
;; '("4" . meow-expand-4)
|
|
||||||
;; '("3" . meow-expand-3)
|
|
||||||
;; '("2" . meow-expand-2)
|
|
||||||
;; '("1" . meow-expand-1)
|
|
||||||
;; '("-" . negative-argument)
|
|
||||||
;; '(";" . meow-reverse)
|
|
||||||
;; '("," . meow-inner-of-thing)
|
|
||||||
;; '("." . meow-bounds-of-thing)
|
|
||||||
;; '("[" . meow-beginning-of-thing)
|
|
||||||
;; '("]" . meow-end-of-thing)
|
|
||||||
;; '("a" . meow-append)
|
|
||||||
;; '("A" . meow-open-below)
|
|
||||||
;; '("b" . meow-back-word)
|
|
||||||
;; '("B" . meow-back-symbol)
|
|
||||||
;; '("c" . meow-change)
|
|
||||||
;; '("d" . meow-delete)
|
|
||||||
;; '("D" . meow-backward-delete)
|
|
||||||
;; '("e" . meow-next-word)
|
|
||||||
;; '("E" . meow-next-symbol)
|
|
||||||
;; '("f" . meow-find)
|
|
||||||
;; '("g" . meow-cancel-selection)
|
|
||||||
;; '("G" . meow-grab)
|
|
||||||
;; '("h" . meow-left)
|
|
||||||
;; '("H" . meow-left-expand)
|
|
||||||
;; '("i" . meow-insert)
|
|
||||||
;; '("I" . meow-open-above)
|
|
||||||
;; '("j" . meow-next)
|
|
||||||
;; '("J" . meow-next-expand)
|
|
||||||
;; '("k" . meow-prev)
|
|
||||||
;; '("K" . meow-prev-expand)
|
|
||||||
;; '("l" . meow-right)
|
|
||||||
;; '("L" . meow-right-expand)
|
|
||||||
;; '("m" . meow-join)
|
|
||||||
;; '("n" . meow-search)
|
|
||||||
;; '("o" . meow-block)
|
|
||||||
;; '("O" . meow-to-block)
|
|
||||||
;; '("p" . meow-yank)
|
|
||||||
;; '("q" . meow-quit)
|
|
||||||
;; '("Q" . meow-goto-line)
|
|
||||||
;; '("r" . meow-replace)
|
|
||||||
;; '("R" . meow-swap-grab)
|
|
||||||
;; '("s" . meow-kill)
|
|
||||||
;; '("t" . meow-till)
|
|
||||||
;; '("u" . meow-undo)
|
|
||||||
;; '("U" . meow-undo-in-selection)
|
|
||||||
;; '("v" . meow-visit)
|
|
||||||
;; '("w" . meow-mark-word)
|
|
||||||
;; '("W" . meow-mark-symbol)
|
|
||||||
;; '("x" . meow-line)
|
|
||||||
;; '("X" . meow-goto-line)
|
|
||||||
;; '("y" . meow-save)
|
|
||||||
;; '("Y" . meow-sync-grab)
|
|
||||||
;; '("z" . meow-pop-selection)
|
|
||||||
;; '("'" . repeat)
|
|
||||||
;; '("<escape>" . ignore)))
|
|
||||||
|
|
||||||
;; (require 'meow)
|
(require 'evil-org)
|
||||||
;; (meow-setup)
|
(add-hook 'org-mode-hook 'evil-org-mode)
|
||||||
;; (meow-global-mode)
|
(evil-org-set-key-theme '(navigation insert textobjects additional calendar))
|
||||||
#+END_SRC
|
(require 'evil-org-agenda)
|
||||||
|
(evil-org-agenda-set-keys)
|
||||||
#+BEGIN_SRC elisp
|
|
||||||
(require 'god-mode)
|
|
||||||
(require 'which-key)
|
|
||||||
|
|
||||||
(bind-keys :map god-local-mode-map
|
|
||||||
("i" . (lambda () (interactive) (god-mode-all -1)))
|
|
||||||
("z" . repeat))
|
|
||||||
(bind-keys ("<escape>" . (lambda () (interactive) (god-mode-all 1))))
|
|
||||||
(defun my-god-mode-update-cursor-type ()
|
|
||||||
(setq cursor-type (cond
|
|
||||||
(org-present-mode nil)
|
|
||||||
((or (and (featurep 'god-mode) god-local-mode) buffer-read-only
|
|
||||||
(and meow-mode (not (eq 'insert meow--current-state)))) 'box)
|
|
||||||
(t 'bar))))
|
|
||||||
|
|
||||||
(add-hook 'post-command-hook 'my-god-mode-update-cursor-type)
|
|
||||||
(which-key-enable-god-mode-support)
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Avy allows jumping to any place on the screen with just a few keystrokes. I've stolen most of these
|
Avy allows jumping to any place on the screen with just a few keystrokes. I've stolen most of these
|
||||||
|
|||||||
Reference in New Issue
Block a user