From 5b7950e6ef6911448a87401345eb72229b54d4e8 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Sat, 13 Dec 2014 19:31:35 +0100 Subject: 33846: additional default vi-mode key bindings --- Src/Zle/zle_keymap.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Src/Zle/zle_keymap.c') 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'); -- cgit 1.4.1