On 12/04/09 20:23, Raúl Núñez de Arenas Coronado wrote:
>
> Saluton Tony :)
>
> On Sun 12 Apr 2009 19:33 +0200, Tony Mechelynck<[email protected]> dixit:
>>>> Looks like $ does mean "maximum possible" but . doesn't mean "current
>>>> window" — maybe it still means "current line".
>>>>
>>>> Bram, do you think this use with $ is worth documenting? And y'all
>>>> people, what do you think?
>>>
>>> I think it is worth documenting. If I ever use '$' in that context,
>>> probably I would be using things like '.' and '-4' (to cite your
>>> examples) soon, and I would spend some time trying to understand why
>>> they don't work if '$' does. If, according to the documentation, '$' is
>>> an exception, a shortcut, in that context (wincmd, I mean), then it
>>> seems natural that other "special" count values don't work.
>>
>> On closer examination, $ in this context still means "the number of
>> lines in the current window" -- but if it exceeds the total number of
>> windows, ":$wincmd w" falls back to the last window.
>
> Then I think that it's better not to document this unintended behaviour.
> The fact that it works is that usually it is bigger than the number of
> current windows, but not always: if you are on a window with no lines
> and you use '$', you won't get the last window with ":$wincmd w".
>
> In fact, it is a very bad usage, IMHO, and a bad habit ;)
>
>> So it is still useful (I like having an easy way to go to the last
>> window), but it might be "not by design", i.e., a bug which I choose to
>> treat as an undocumented feature.
>
> Which, moreover, won't always work...
>
Well, I guess I "should" be using 99^Ww then... There goes one more
bright idea. However it _could_ be documented that counts in excess of
the number of windows go to the bottom-right window, what do you think?
That would be something which "will always work".
Best regards,
Tony.
--
BEDEVERE: Wait. Wait ... tell me, what also floats on water?
ALL: Bread? No, no, no. Apples .... gravy ... very small rocks ...
ARTHUR: A duck.
"Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---