Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Re: vicmd bindings



> Any reason that
> 
> "j" down-line-or-history
> "k" up-line-or-history
> 
> aren't vi-down-line-or-history &al. by default?

I'll commit this patch.  It should be trivial to reverse should
there actually be a reason for the original behavior.

Index: Src/Zle/zle_bindings.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_bindings.c,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 zle_bindings.c
--- Src/Zle/zle_bindings.c	1999/12/01 18:36:09	1.1.1.3
+++ Src/Zle/zle_bindings.c	2000/12/16 16:16:30
@@ -396,8 +396,8 @@
     /* g */ z_undefinedkey,
     /* h */ z_vibackwardchar,
     /* i */ z_viinsert,
-    /* j */ z_downlineorhistory,
-    /* k */ z_uplineorhistory,
+    /* j */ z_vidownlineorhistory,
+    /* k */ z_viuplineorhistory,
     /* l */ z_viforwardchar,
     /* m */ z_visetmark,
     /* n */ z_virepeatsearch,
Index: Src/Zle/zle_keymap.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_keymap.c,v
retrieving revision 1.1.1.10
diff -u -r1.1.1.10 zle_keymap.c
--- Src/Zle/zle_keymap.c	1999/12/01 18:36:09	1.1.1.10
+++ Src/Zle/zle_keymap.c	2000/12/16 16:16:30
@@ -1067,12 +1067,12 @@
      * Both standard and keypad modes are supported.                  */
 
     /* vi command mode: arrow keys */
-    bindkey(amap, "\33[A",  refthingy(t_uplineorhistory), NULL);
-    bindkey(amap, "\33[B",  refthingy(t_downlineorhistory), NULL);
+    bindkey(amap, "\33[A",  refthingy(t_viuplineorhistory), NULL);
+    bindkey(amap, "\33[B",  refthingy(t_vidownlineorhistory), NULL);
     bindkey(amap, "\33[C",  refthingy(t_viforwardchar), NULL);
     bindkey(amap, "\33[D",  refthingy(t_vibackwardchar), NULL);
-    bindkey(amap, "\33OA",  refthingy(t_uplineorhistory), NULL);
-    bindkey(amap, "\33OB",  refthingy(t_downlineorhistory), NULL);
+    bindkey(amap, "\33OA",  refthingy(t_viuplineorhistory), NULL);
+    bindkey(amap, "\33OB",  refthingy(t_vidownlineorhistory), NULL);
     bindkey(amap, "\33OC",  refthingy(t_viforwardchar), NULL);
     bindkey(amap, "\33OD",  refthingy(t_vibackwardchar), NULL);
 



Messages sorted by: Reverse Date, Date, Thread, Author