about summary refs log tree commit diff
path: root/Src/Zle/zle_keymap.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2003-05-14 15:09:14 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2003-05-14 15:09:14 +0000
commit62719196b27496c3cc4ff97a92fc03627b1bab38 (patch)
treee3d8dbd8126d1717a09272c0fcbf1125ecc4b975 /Src/Zle/zle_keymap.c
parent2b744cb21d87de89495d2e66843946008c98f556 (diff)
downloadzsh-62719196b27496c3cc4ff97a92fc03627b1bab38.tar.gz
zsh-62719196b27496c3cc4ff97a92fc03627b1bab38.tar.xz
zsh-62719196b27496c3cc4ff97a92fc03627b1bab38.zip
18536: EMACS and VI compatibility options
Diffstat (limited to 'Src/Zle/zle_keymap.c')
-rw-r--r--Src/Zle/zle_keymap.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Src/Zle/zle_keymap.c b/Src/Zle/zle_keymap.c
index c36657697..3a06bb632 100644
--- a/Src/Zle/zle_keymap.c
+++ b/Src/Zle/zle_keymap.c
@@ -1370,3 +1370,13 @@ getkeycmd(void)
 	func = lastnamed;
     return func;
 }
+
+/**/
+mod_export void
+zlesetkeymap(int mode)
+{
+    Keymap km = openkeymap((mode == VIMODE) ? "viins" : "emacs");
+    if (!km)
+	return;
+    linkkeymap(km, "main", 0);
+}