tvi: ze and zf to specify the keymap in normal mode - neatvi - [fork] simple vi… | |
git clone git://src.adamsgaard.dk/neatvi | |
Log | |
Files | |
Refs | |
README | |
--- | |
commit ed2e096607df03ce155e4c6ab786f8b697799988 | |
parent 9e76a7c658e3ea68a1d5de81cb4f1cf1a0f4f6d9 | |
Author: Ali Gholami Rudi <[email protected]> | |
Date: Thu, 4 May 2017 18:15:15 +0430 | |
vi: ze and zf to specify the keymap in normal mode | |
Diffstat: | |
M README | 12 +++++++----- | |
M vi.c | 4 ++++ | |
2 files changed, 11 insertions(+), 5 deletions(-) | |
--- | |
diff --git a/README b/README | |
t@@ -29,11 +29,13 @@ Commands not available in ex(1): | |
current ex buffer. | |
New key mappings: | |
-^a in normal mode, searches for the word under the cursor. | |
-^p in insert mode, inserts the contents of the default yank buffer. | |
-zL, zl, zr, and zR in normal mode change the value of td option. | |
-gu, gU, and g~ switch character case. | |
-^l in normal mode, updates terminal dimensions. | |
+^a in normal mode: searches for the word under the cursor. | |
+^p in insert mode: inserts the contents of the default yank buffer. | |
+zL, zl, zr, and zR in normal mode: change the value of td option. | |
+^e and ^f in insert mode: switch to the English and alternate keymap. | |
+ze and zf in normal mode: switch to the English and alternate keymap. | |
+gu, gU, and g~ in normal mode: switch character case. | |
+^l in normal mode: updates terminal dimensions (after resizing it). | |
OPTIONS | |
------- | |
diff --git a/vi.c b/vi.c | |
t@@ -1222,6 +1222,10 @@ static void vi(void) | |
case 'R': | |
xtd = k == 'R' ? -2 : +2; | |
break; | |
+ case 'e': | |
+ case 'f': | |
+ xkmap = k == 'e' ? 0 : xkmap_alt; | |
+ break; | |
} | |
mod = 1; | |
break; |