Benjamin Fritz | 2 Aug 2011 22:41
Picon

Re: Clarification of U command

On Tue, Aug 2, 2011 at 3:30 PM, Bram Moolenaar <Bram <at> moolenaar.net> wrote:
>
> Ben Fritz -
>> Change:
>>
>> U                     Undo all latest changes on one line.  {Vi: while not
>>                       moved off of it}
>>
>> to:
>>
>>
>> U                     Undo all changes on the most recently modified line
>>                       until just after a different line was changed or editing
>>                       started on this line. If no changes since the last U
>>                       command, undo the last U.  {Vi: only when cursor has not
>>                       moved off last modified line}
>>
>
> Thanks for the hint that this was unclear.  The text must have been
> there forever.  How about this:
>
> U                       Undo all latest changes on one line, the line where
>                        the latest change was made. |U| itself also counts as
>                        a change, and thus |U| undoes a previous |U|.
>                        {Vi: while not moved off of the last modified line}
>

Much better, but "latest changes" is still not well-defined. Consider:

line 1: one two three
(Continue reading)


Gmane