|
9 | 9 | :lem-vi-mode/visual))
|
10 | 10 | (in-package :lem-vi-mode/binds)
|
11 | 11 |
|
12 |
| -(define-key *command-keymap* "0" 'vi-move-to-beginning-of-line/universal-argument-0) |
13 |
| -(define-key *command-keymap* "1" 'universal-argument-1) |
14 |
| -(define-key *command-keymap* "2" 'universal-argument-2) |
15 |
| -(define-key *command-keymap* "3" 'universal-argument-3) |
16 |
| -(define-key *command-keymap* "4" 'universal-argument-4) |
17 |
| -(define-key *command-keymap* "5" 'universal-argument-5) |
18 |
| -(define-key *command-keymap* "6" 'universal-argument-6) |
19 |
| -(define-key *command-keymap* "7" 'universal-argument-7) |
20 |
| -(define-key *command-keymap* "8" 'universal-argument-8) |
21 |
| -(define-key *command-keymap* "9" 'universal-argument-9) |
22 |
| -(define-key *command-keymap* "l" 'vi-forward-char) |
23 |
| -(define-key *command-keymap* "Space" 'vi-forward-char) |
24 |
| -(define-key *command-keymap* "h" 'vi-backward-char) |
25 |
| -(define-key *command-keymap* "j" 'vi-next-line) |
26 |
| -(define-key *command-keymap* "+" 'vi-next-line) |
27 |
| -(define-key *command-keymap* "k" 'vi-previous-line) |
28 |
| -(define-key *command-keymap* "-" 'vi-previous-line) |
29 |
| -(define-key *command-keymap* "g j" 'vi-next-display-line) |
30 |
| -(define-key *command-keymap* "g k" 'vi-previous-display-line) |
31 |
| -(define-key *command-keymap* "w" 'vi-forward-word-begin) |
32 |
| -(define-key *command-keymap* "b" 'vi-backward-word-begin) |
33 |
| -(define-key *command-keymap* "W" 'vi-forward-word-begin-broad) |
34 |
| -(define-key *command-keymap* "B" 'vi-backward-word-begin-broad) |
35 |
| -(define-key *command-keymap* "e" 'vi-forward-word-end) |
36 |
| -(define-key *command-keymap* "E" 'vi-forward-word-end-broad) |
37 |
| -(define-key *command-keymap* "$" 'vi-move-to-end-of-line) |
38 |
| -(define-key *command-keymap* "g _" 'vi-move-to-last-nonblank) |
39 |
| -(define-key *command-keymap* "H" 'vi-move-to-window-top) |
40 |
| -(define-key *command-keymap* "M" 'vi-move-to-window-middle) |
41 |
| -(define-key *command-keymap* "L" 'vi-move-to-window-bottom) |
42 |
| -(define-key *command-keymap* "C-d" 'next-page) |
43 |
| -(define-key *command-keymap* "C-u" 'previous-page) |
44 |
| -(define-key *command-keymap* "^" 'vi-back-to-indentation) |
45 |
| -(define-key *command-keymap* "_" 'vi-back-to-indentation) |
46 |
| -(define-key *command-keymap* "=" 'vi-indent) |
47 |
| -(define-key *command-keymap* "{" 'backward-paragraph) |
48 |
| -(define-key *command-keymap* "}" 'forward-paragraph) |
49 |
| -(define-key *command-keymap* "s" 'vi-substitute) |
50 |
| -(define-key *command-keymap* "x" 'vi-delete-next-char) |
51 |
| -(define-key *command-keymap* "X" 'vi-delete-previous-char) |
52 |
| -(define-key *command-keymap* "d" 'vi-delete) |
53 |
| -(define-key *command-keymap* "D" 'vi-delete-line) |
54 |
| -(define-key *command-keymap* "c" 'vi-change) |
55 |
| -(define-key *command-keymap* "C" 'vi-change-line) |
56 |
| -(define-key *command-keymap* "g J" 'vi-join) |
57 |
| -(define-key *command-keymap* "J" 'vi-join-line) |
58 |
| -(define-key *command-keymap* "y" 'vi-yank) |
59 |
| -(define-key *command-keymap* "p" 'vi-paste-after) |
60 |
| -(define-key *command-keymap* "P" 'vi-paste-before) |
61 |
| -(define-key *command-keymap* "r" 'vi-replace-char) |
62 |
| -(define-key *command-keymap* "g U" 'vi-upcase) |
63 |
| -(define-key *command-keymap* "g u" 'vi-downcase) |
64 |
| -(define-key *command-keymap* "u" 'vi-undo) |
65 |
| -(define-key *command-keymap* "C-r" 'vi-redo) |
66 |
| -(define-key *command-keymap* "C-f" 'next-page) |
67 |
| -(define-key *command-keymap* "C-b" 'previous-page) |
68 |
| -(define-key *command-keymap* "%" 'vi-move-to-matching-paren) |
69 |
| -(define-key *command-keymap* "/" 'vi-search-forward) |
70 |
| -(define-key *command-keymap* "?" 'vi-search-backward) |
71 |
| -(define-key *command-keymap* "n" 'vi-search-next) |
72 |
| -(define-key *command-keymap* "N" 'vi-search-previous) |
73 |
| -(define-key *command-keymap* "*" 'vi-search-forward-symbol-at-point) |
74 |
| -(define-key *command-keymap* "g g" 'vi-goto-first-line) |
75 |
| -(define-key *command-keymap* "G" 'vi-goto-line) |
76 |
| -(define-key *command-keymap* "Return" 'vi-return) |
77 |
| -(define-key *command-keymap* "f" 'vi-find-char) |
78 |
| -(define-key *command-keymap* "F" 'vi-find-char-backward) |
79 |
| -(define-key *command-keymap* "t" 'vi-find-char-before) |
80 |
| -(define-key *command-keymap* "T" 'vi-find-char-backward-after) |
81 |
| -(define-key *command-keymap* ";" 'vi-find-char-repeat) |
82 |
| -(define-key *command-keymap* "," 'vi-find-char-repeat-backward) |
83 |
| -(define-key *command-keymap* "z z" 'recenter) |
84 |
| -(define-key *command-keymap* "Z Z" 'vi-write-quit) |
85 |
| -(define-key *command-keymap* "C-w s" 'split-active-window-vertically) |
86 |
| -(define-key *command-keymap* "C-w C-s" 'split-active-window-vertically) |
87 |
| -(define-key *command-keymap* "C-w w" 'other-window) |
88 |
| -(define-key *command-keymap* "C-w C-w" 'other-window) |
89 |
| -(define-key *command-keymap* "C-w q" 'vi-quit) |
90 |
| -(define-key *command-keymap* "C-w h" 'window-move-left) |
91 |
| -(define-key *command-keymap* "C-w C-h" 'undefined-key) |
92 |
| -(define-key *command-keymap* "C-w l" 'window-move-right) |
93 |
| -(define-key *command-keymap* "C-w C-l" 'undefined-key) |
94 |
| -(define-key *command-keymap* "C-w k" 'window-move-up) |
95 |
| -(define-key *command-keymap* "C-w C-k" 'undefined-key) |
96 |
| -(define-key *command-keymap* "C-w j" 'window-move-down) |
97 |
| -(define-key *command-keymap* "C-w C-j" 'undefined-key) |
| 12 | +(define-key *motion-keymap* "0" 'vi-move-to-beginning-of-line/universal-argument-0) |
| 13 | +(define-key *motion-keymap* "1" 'universal-argument-1) |
| 14 | +(define-key *motion-keymap* "2" 'universal-argument-2) |
| 15 | +(define-key *motion-keymap* "3" 'universal-argument-3) |
| 16 | +(define-key *motion-keymap* "4" 'universal-argument-4) |
| 17 | +(define-key *motion-keymap* "5" 'universal-argument-5) |
| 18 | +(define-key *motion-keymap* "6" 'universal-argument-6) |
| 19 | +(define-key *motion-keymap* "7" 'universal-argument-7) |
| 20 | +(define-key *motion-keymap* "8" 'universal-argument-8) |
| 21 | +(define-key *motion-keymap* "9" 'universal-argument-9) |
| 22 | +(define-key *motion-keymap* "l" 'vi-forward-char) |
| 23 | +(define-key *motion-keymap* "Space" 'vi-forward-char) |
| 24 | +(define-key *motion-keymap* "h" 'vi-backward-char) |
| 25 | +(define-key *motion-keymap* "j" 'vi-next-line) |
| 26 | +(define-key *motion-keymap* "+" 'vi-next-line) |
| 27 | +(define-key *motion-keymap* "k" 'vi-previous-line) |
| 28 | +(define-key *motion-keymap* "-" 'vi-previous-line) |
| 29 | +(define-key *motion-keymap* "g j" 'vi-next-display-line) |
| 30 | +(define-key *motion-keymap* "g k" 'vi-previous-display-line) |
| 31 | +(define-key *motion-keymap* "w" 'vi-forward-word-begin) |
| 32 | +(define-key *motion-keymap* "b" 'vi-backward-word-begin) |
| 33 | +(define-key *motion-keymap* "W" 'vi-forward-word-begin-broad) |
| 34 | +(define-key *motion-keymap* "B" 'vi-backward-word-begin-broad) |
| 35 | +(define-key *motion-keymap* "e" 'vi-forward-word-end) |
| 36 | +(define-key *motion-keymap* "E" 'vi-forward-word-end-broad) |
| 37 | +(define-key *motion-keymap* "$" 'vi-move-to-end-of-line) |
| 38 | +(define-key *motion-keymap* "g _" 'vi-move-to-last-nonblank) |
| 39 | +(define-key *motion-keymap* "H" 'vi-move-to-window-top) |
| 40 | +(define-key *motion-keymap* "M" 'vi-move-to-window-middle) |
| 41 | +(define-key *motion-keymap* "L" 'vi-move-to-window-bottom) |
| 42 | +(define-key *motion-keymap* "C-d" 'next-page) |
| 43 | +(define-key *motion-keymap* "C-u" 'previous-page) |
| 44 | +(define-key *motion-keymap* "^" 'vi-back-to-indentation) |
| 45 | +(define-key *motion-keymap* "_" 'vi-back-to-indentation) |
| 46 | +(define-key *motion-keymap* "{" 'backward-paragraph) |
| 47 | +(define-key *motion-keymap* "}" 'forward-paragraph) |
| 48 | +(define-key *motion-keymap* "C-f" 'next-page) |
| 49 | +(define-key *motion-keymap* "C-b" 'previous-page) |
| 50 | +(define-key *motion-keymap* "%" 'vi-move-to-matching-paren) |
| 51 | +(define-key *motion-keymap* "/" 'vi-search-forward) |
| 52 | +(define-key *motion-keymap* "?" 'vi-search-backward) |
| 53 | +(define-key *motion-keymap* "n" 'vi-search-next) |
| 54 | +(define-key *motion-keymap* "N" 'vi-search-previous) |
| 55 | +(define-key *motion-keymap* "*" 'vi-search-forward-symbol-at-point) |
| 56 | +(define-key *motion-keymap* "g g" 'vi-goto-first-line) |
| 57 | +(define-key *motion-keymap* "G" 'vi-goto-line) |
| 58 | +(define-key *motion-keymap* "Return" 'vi-return) |
| 59 | +(define-key *motion-keymap* "f" 'vi-find-char) |
| 60 | +(define-key *motion-keymap* "F" 'vi-find-char-backward) |
| 61 | +(define-key *motion-keymap* "t" 'vi-find-char-before) |
| 62 | +(define-key *motion-keymap* "T" 'vi-find-char-backward-after) |
| 63 | +(define-key *motion-keymap* ";" 'vi-find-char-repeat) |
| 64 | +(define-key *motion-keymap* "," 'vi-find-char-repeat-backward) |
| 65 | +(define-key *motion-keymap* "z z" 'recenter) |
| 66 | +(define-key *motion-keymap* "Z Z" 'vi-write-quit) |
| 67 | +(define-key *motion-keymap* "C-w s" 'split-active-window-vertically) |
| 68 | +(define-key *motion-keymap* "C-w C-s" 'split-active-window-vertically) |
| 69 | +(define-key *motion-keymap* "C-w w" 'other-window) |
| 70 | +(define-key *motion-keymap* "C-w C-w" 'other-window) |
| 71 | +(define-key *motion-keymap* "C-w q" 'vi-quit) |
| 72 | +(define-key *motion-keymap* "C-w h" 'window-move-left) |
| 73 | +(define-key *motion-keymap* "C-w C-h" 'undefined-key) |
| 74 | +(define-key *motion-keymap* "C-w l" 'window-move-right) |
| 75 | +(define-key *motion-keymap* "C-w C-l" 'undefined-key) |
| 76 | +(define-key *motion-keymap* "C-w k" 'window-move-up) |
| 77 | +(define-key *motion-keymap* "C-w C-k" 'undefined-key) |
| 78 | +(define-key *motion-keymap* "C-w j" 'window-move-down) |
| 79 | +(define-key *motion-keymap* "C-w C-j" 'undefined-key) |
| 80 | +(define-key *motion-keymap* "C-o" 'vi-jump-back) |
| 81 | +(define-key *motion-keymap* "C-i" 'vi-jump-next) |
| 82 | +(define-key *motion-keymap* ":" 'vi-ex) |
98 | 83 |
|
99 |
| -(define-key *command-keymap* "v" 'vi-visual-char) |
100 |
| -(define-key *command-keymap* "V" 'vi-visual-line) |
101 |
| -(define-key *command-keymap* "C-v" 'vi-visual-block) |
| 84 | +(define-key *motion-keymap* "v" 'vi-visual-char) |
| 85 | +(define-key *motion-keymap* "V" 'vi-visual-line) |
| 86 | +(define-key *motion-keymap* "C-v" 'vi-visual-block) |
102 | 87 |
|
103 |
| -(define-key *command-keymap* "i" 'vi-insert) |
104 |
| -(define-key *command-keymap* "I" 'vi-insert-line) |
105 |
| -(define-key *command-keymap* "a" 'vi-append) |
106 |
| -(define-key *command-keymap* "A" 'vi-append-line) |
107 |
| -(define-key *command-keymap* "o" 'vi-open-below) |
108 |
| -(define-key *command-keymap* "O" 'vi-open-above) |
109 |
| -(define-key *command-keymap* "C-o" 'vi-jump-back) |
110 |
| -(define-key *command-keymap* "C-i" 'vi-jump-next) |
111 |
| -(define-key *command-keymap* "." 'vi-repeat) |
112 |
| -(define-key *command-keymap* ":" 'vi-ex) |
113 |
| -(define-key *command-keymap* 'delete-previous-char 'vi-backward-char) |
114 |
| -(define-key *command-keymap* 'self-insert 'undefined-key) |
| 88 | +(define-key *normal-keymap* "i" 'vi-insert) |
| 89 | +(define-key *normal-keymap* "I" 'vi-insert-line) |
| 90 | +(define-key *normal-keymap* "a" 'vi-append) |
| 91 | +(define-key *normal-keymap* "A" 'vi-append-line) |
| 92 | +(define-key *normal-keymap* "o" 'vi-open-below) |
| 93 | +(define-key *normal-keymap* "O" 'vi-open-above) |
| 94 | +(define-key *normal-keymap* "." 'vi-repeat) |
| 95 | +(define-key *normal-keymap* "=" 'vi-indent) |
| 96 | +(define-key *normal-keymap* "s" 'vi-substitute) |
| 97 | +(define-key *normal-keymap* "x" 'vi-delete-next-char) |
| 98 | +(define-key *normal-keymap* "X" 'vi-delete-previous-char) |
| 99 | +(define-key *normal-keymap* "d" 'vi-delete) |
| 100 | +(define-key *normal-keymap* "D" 'vi-delete-line) |
| 101 | +(define-key *normal-keymap* "c" 'vi-change) |
| 102 | +(define-key *normal-keymap* "C" 'vi-change-line) |
| 103 | +(define-key *normal-keymap* "g J" 'vi-join) |
| 104 | +(define-key *normal-keymap* "J" 'vi-join-line) |
| 105 | +(define-key *normal-keymap* "y" 'vi-yank) |
| 106 | +(define-key *normal-keymap* "p" 'vi-paste-after) |
| 107 | +(define-key *normal-keymap* "P" 'vi-paste-before) |
| 108 | +(define-key *normal-keymap* "r" 'vi-replace-char) |
| 109 | +(define-key *normal-keymap* "g U" 'vi-upcase) |
| 110 | +(define-key *normal-keymap* "g u" 'vi-downcase) |
| 111 | +(define-key *normal-keymap* "u" 'vi-undo) |
| 112 | +(define-key *normal-keymap* "C-r" 'vi-redo) |
| 113 | +(define-key *motion-keymap* 'delete-previous-char 'vi-backward-char) |
| 114 | +(define-key *motion-keymap* 'self-insert 'undefined-key) |
115 | 115 |
|
116 | 116 | (define-key *insert-keymap* "Escape" 'vi-end-insert)
|
117 | 117 | (define-key *insert-keymap* "C-p" 'abbrev)
|
118 | 118 | (define-key *insert-keymap* "C-w" 'vi-kill-last-word)
|
119 | 119 |
|
120 |
| -(define-key *command-keymap* "C-p" 'yank-pop) |
121 |
| -(define-key *command-keymap* "C-n" 'yank-pop-next) |
| 120 | +(define-key *normal-keymap* "C-p" 'yank-pop) |
| 121 | +(define-key *normal-keymap* "C-n" 'yank-pop-next) |
122 | 122 |
|
123 |
| -(define-key *command-keymap* "C-g" 'vi-keyboard-quit) |
| 123 | +(define-key *motion-keymap* "C-g" 'vi-keyboard-quit) |
124 | 124 | (define-key *inactive-keymap* "Escape" 'vi-keyboard-quit)
|
125 | 125 |
|
126 | 126 | (define-key *visual-keymap* "Escape" 'vi-visual-end)
|
|
0 commit comments