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

Re: bindkey vi esc / k - beginning of line hatred



On Thu, 23 Oct 2008 18:04:05 +0100
Peter Stephenson <pws@xxxxxxx> wrote:
> You're obviously in ksh emulation, where it seems singlelinezle is on by
> default.  We're probably shooting ourselves in the foot over this; as I
> said, it's only superficially like ksh, and it's not clear this is
> really an emulation of it in a helpful sense.  Any other opinions?

A couple of documentation enhancements based on this thread.  I updated the
latest version in the FAQ while I was at it.

Index: Doc/Zsh/options.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/options.yo,v
retrieving revision 1.65
diff -u -r1.65 options.yo
--- Doc/Zsh/options.yo	9 Oct 2008 13:46:45 -0000	1.65
+++ Doc/Zsh/options.yo	24 Oct 2008 13:33:06 -0000
@@ -1515,6 +1515,12 @@
 cindex(editor, single line mode)
 item(tt(SINGLE_LINE_ZLE) (tt(-M)) <K>)(
 Use single-line command line editing instead of multi-line.
+
+Note that although this is on by default in ksh emulation it only
+provides superficial compatibility with the ksh line editor and
+reduces the effectiveness of the zsh line editor.  As it has no
+effect on shell syntax, many users may wish to disable this option
+when using ksh emulation interactively.
 )
 pindex(VI)
 item(tt(VI))(
Index: Etc/FAQ.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Etc/FAQ.yo,v
retrieving revision 1.41
diff -u -r1.41 FAQ.yo
--- Etc/FAQ.yo	9 May 2008 17:35:45 -0000	1.41
+++ Etc/FAQ.yo	24 Oct 2008 13:33:06 -0000
@@ -298,7 +298,7 @@
 sect(What's the latest version?)
 
   Zsh 4.2.7 is the latest production version.  The latest development
-  version is 4.3.6; this contains support for multibyte character strings
+  version is 4.3.7; this contains support for multibyte character strings
   (such as UTF-8 locales).  All the main features for multibyte
   support are now in place, although there is some debugging work
   still to be done.
@@ -642,7 +642,13 @@
     it()  mytt(\) does not escape editing chars (use mytt(^V)).
     it()  Not all ksh bindings are set (e.g. mytt(<ESC>#); try mytt(<ESC>q)).
     it()* mytt(#) in an interactive shell is not treated as a comment by
-        default. 
+        default.
+    it()  In vi command mode the keys "k" and "j" move the cursor to the
+        end of the line.  To move the cursor to the start instead, use
+  verb(
+          bindkey -M vicmd 'k' vi-up-line-or-history
+          bindkey -M vicmd 'j' vi-down-line-or-history
+  )
   )
   it() Built-in commands:
   itemize(


-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



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