On 31/12/08 11:14, Antony Scriven wrote:
> 2008/12/31 pansz<[email protected]>:
[...]
>   >  I wonder whether you have tried my example or not, does
>   >  it work for you? Why you insist doing an abbreviation
>   >  while mapping suits your need a lot better? [...]
>
> Mappings are short key sequences. What happens when you have
> lots of :abbrevs? You need longer names so that you can
> remember them easily. Long key sequences for mappings are
> unwieldy: you can't see what you are typing and they time
> out. You can backspace and correct a typo in an :abbrev and
> it will still work. --Antony

With 'showcmd' on, you see what you are typing for a multikey mapping at 
the bottom right of the screen.

For the {lhs} of a mapping, you would typically use an F key (except F1 
which is Help and, on some systems, F10 which is Menu), with or without 
shift (including Shift-F1 and Shift-F10). That's already 22 keys. If you 
have more mappings than that, you can use an F key as a prefix for one 
or two additional keys (where any key can be used, probably a printing 
key: that's 26 lowercase, 26 uppercase, 10 digits, and more). How many 
mappings have you got?

OTOH, for an abbrev you would typically use, well, an abbreviated word. 
Maybe BBC for British Broadcasting Corporation. Or, for a more 
Vim-realistic example, I have ":cabbrev h bot h" in my vimrc, so a new 
help window always opens at the bottom, even when called from a 
split-window which is not the lowest one. Here, a non-id character quite 
logically causes the abbrev to be expanded, while the same letter 
sequence as part of a longer word would, again quite logically, not 
trigger the expansion. When, for instance, I use ":hardcopy" it doesn't 
get the ":bot" prefix.


Best regards,
Tony.
-- 
The Third Law of Photography:
        If you did manage to get any good shots, they will be ruined
when someone inadvertently opens the darkroom door and all of the dark
leaks out.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to