Bill McCarthy wrote:
Hello Vim Developers,

Here's what the docs say:

===============================================================================
                                                *^*
^               To the first non-blank character of the line.
                |exclusive| motion.

                                                *0*
0               To the first character of the line.  |exclusive|
                motion.  When moving up or down, stay in same screen
                column (if possible).

                                                *<Home>* *<kHome>*
<Home>          To the first character of the line.  |exclusive|
                motion.  When moving up or down, stay in same text
                column (if possible).  Works like "1|", which differs
                from "0" when the line starts with a <Tab>.  {not in
                Vi}

                                                *bar*
|               To screen column [count] in the current line.
                |exclusive| motion.
===============================================================================

(1) The sentence starting with "When moving" (in the help
    for both '0' and '<Home>' appears to also belong with
    the help for '^'.

(2) The sentence starting with "Works like" (in the help for
    '<Home>') does not appear to be correct.  '<Home>'
    appears to work like '0'.  The movement is just like
    '1|' (which is equivalent to '|') except for the
    behavior of moving up or down.

(3) '0' and '<Home>' appear to be identical.  Does anyone
    see a difference?


(1) After ^ followed by jjjjj or kkkkk I see the cursor staying (as far as possible) in the same _screen_ column regardless of preceding hard tabs. When this would place the cursor halfway a tab, the cursor will shift temporarily, and come back if you go on hitting j or k. This is normal behaviour when moving up or down, so it doesn't need to be mentioned.

(2) Here, <Home> works like 1| (not like 0), see below.

(3) Yes I do. Notice the one mentions "the same _text_ column" and the other "the same _screen_ column". Hit 0 on a line starting with a hard tab, then jjjjj : Vim will try to keep the cursor in column 8 (except, of course, on lines shorter than 1 tab or 8 other characters). After <Home> or 1| it would try to keep the cursor in column 1 (if possible: when the first character on a line is a hard tab the cursor will move temporarily to column 8).

I have

*motion.txt*    For Vim version 7.0.  Last change: 2006 Jun 18
[...] (next line is #170)
                                                        *0*
0                       To the first character of the line.  |exclusive|
                        motion.  When moving up or down, stay in same screen
                        column (if possible).

                                                        *<Home>* *<kHome>*
<Home>                    To the first character of the line.  |exclusive|
                        motion.  When moving up or down, stay in same text
                        column (if possible).  Works like "1|", which differs
                        from "0" when the line starts with a <Tab>.  {not in
                        Vi}

                                                        *^*
^                       To the first non-blank character of the line.
                        |exclusive| motion.
[...] (next line is #235)
                                                        *bar*
|                       To screen column [count] in the current line.
                        |exclusive| motion.

and

VIM - Vi IMproved 7.0 (2006 May 7, compiled Dec  5 2006 22:18:11)
Included patches: 1-178
Compiled by [EMAIL PROTECTED]
Huge version with GTK2-GNOME GUI.  Features included (+) or not (-):
[etc.]


Best regards,
Tony.

Reply via email to