about summary refs log tree commit diff
path: root/Src/Zle/zle_keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle/zle_keymap.c')
-rw-r--r--Src/Zle/zle_keymap.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Src/Zle/zle_keymap.c b/Src/Zle/zle_keymap.c
index b703ebee1..afba592a7 100644
--- a/Src/Zle/zle_keymap.c
+++ b/Src/Zle/zle_keymap.c
@@ -1367,6 +1367,13 @@ default_bindings(void)
     bindkey(vismap, "x", refthingy(t_videlete), NULL);
     bindkey(vismap, "~", refthingy(t_vioperswapcase), NULL);
 
+    /* vi mode: some common vim bindings */
+    bindkey(amap, "ga", refthingy(t_whatcursorposition), NULL);
+    bindkey(amap, "ge", refthingy(t_vibackwardwordend), NULL);
+    bindkey(amap, "gE", refthingy(t_vibackwardblankwordend), NULL);
+    bindkey(amap, "gg", refthingy(t_beginningofbufferorhistory), NULL);
+    bindkey(amap, "g~", refthingy(t_vioperswapcase), NULL);
+
     /* emacs mode: arrow keys */ 
     add_cursor_key(emap, TCUPCURSOR, t_uplineorhistory, 'A');
     add_cursor_key(emap, TCDOWNCURSOR, t_downlineorhistory, 'B');