On 2013-08-19, Manuel Ortega wrote:
> On Mon, Aug 19, 2013 at 3:53 PM, Manuel Ortega <[email protected]> wrote:
> 
>     Dear Bram,
> 
>     While perusing $VIMRUNTIME/syntax/vim.vim, I noticed that many of the
>     "attributes" to the command ":command" can be abbreviated.  Namely:
>     instance:
> 
>        -n[args]
>        -com[plete]
>        -ra[nge]
>        -cou[nt]
>        -re[gister]
>        -ban[g]
> 
>     I didn't ever know this before.  No wonder!  As far as I can tell, there
>     is nothing at all in the docs that says this can be done.  It's not in
>     ":h :command" after scrolling down.  It's not in usr_40.txt.  Even
>     ":helpg" comes up empty when fed "-n=", "-ra=", etc.
> 
>     This is VERY useful info and I could really have used it years ago.
>     Please add it to the docs.  It should be included in the relevant
>     subheadings of ":h :command", such as ":h command-nargs" and so forth.
> 
>     One shouldn't have to be poking through a super-complicated syntax file
>     to discover things like this :)
> 
> 
> In fact, not only was none of this in the docs, but I couldn't find ANY
> *usages* of it ANYWHERE in the entire runtime directory, except for 4
> occurrences of "-na=" (which isn't even as short as it could be) in the 
> vimball
> plugin.
> 
> So I conclude I'm not the only one who didn't know about it :)

Your point about the lack of documentation is well taken.  However,
I would not conclude that absence of use is evidence of absence of
knowledge.

The only time those arguments are used is when defining a command,
which is almost always done in one's .vimrc or in a plugin and
hardly ever done from the command line, so there is little advantage
to the shorter form.  Further, the shorter form are significantly
less intelligible.

Whenever I put a Vim command in my .vimrc or in a plugin, I almost
always use the long form of all commands simply because I think it
is easier to understand.  If I looked at a command definition that
contained "-ban" for example, I would wonder what the heck that
meant, whereas I would immediately know what "-bang" meant.  When
I'm defining a command, the difference in time or space between
typing the long form and the short form is insignificant.

Regards,
Gary

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui