On 12/04/09 19:06, Raúl Núñez de Arenas Coronado wrote:
>
> Saluton Tony :)
>
> On Sun 12 Apr 2009 19:00 +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.
I had only used it previously when in windows containing long-enough
files; but now I tested it with a window containing just 4 lines, and
lo! there, ":$wincmd w" jumps to the 4th window.
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.
Best regards,
Tony.
--
Captain Penny's Law:
You can fool all of the people some of the time, and some of
the people all of the time, but you Can't Fool Mom.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---