Beeyawned wrote:

> It seems that histadd() and histget() can use the same 's[hort]' name
> as history:
> 
> These work:
> call histadd("s", "hello")
> call histget("s",-1)
> 
> Should the documentation be changed?
> 
> histadd({history}, {item})        *histadd()*
>   Add the String {item} to the history {history} which can be
>   one of:                         *hist-names*
>     "c[md]"    or ":"   command line history
>     "s[earch]" or "/"   search pattern history
>     "e[xpr]"   or "="   typed expression history
>     "i[nput]"  or "@"   input line history
> 
> AND... for completeness, add debug, as it seems to also work?
> 
>     "d[ebug]"  or ">"   debug command history
> 
> " -------1---------2---------3---------4---------5---------6----
> from eval.txt
> 
> histadd({history}, {item})        *histadd()*
>   Add the String {item} to the history {history} which can be
>   one of:                         *hist-names*
>     "cmd"    or ":"   command line history
>     "search" or "/"   search pattern history
>     "expr"   or "="   typed expression history
>     "input"  or "@"   input line history
> 
> " -------1---------2---------3---------4---------5---------6----
> from cmdline.txt
> 
> :his[tory] [{name}] [{first}][, [{last}]]
>   List the contents of history {name} which can be:
>   c[md]    or :       command-line history
>   s[earch] or / or ?  search string history
>   e[xpr]   or =       expression register history
>   i[nput]  or @       input line history
>   d[ebug]  or >       debug command history
>   a[ll]               all of the above
> 
> " -------1---------2---------3---------4---------5---------6----

Right.  The name can be as short as one character.  Instead of adding []
inside the string I think it's better to mention that separately.  So
now I have:

                Add the String {item} to the history {history} which can be
                one of:                                 *hist-names*
                        "cmd"    or ":"   command line history
                        "search" or "/"   search pattern history
                        "expr"   or "="   typed expression history
                        "input"  or "@"   input line history
                        "debug"  or ">"   debug command history
                The {history} string does not need to be the whole name, one
                character is sufficient.


-- 
hundred-and-one symptoms of being an internet addict:
99. The hum of a cooling fan and the click of keys is comforting to you.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
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

Raspunde prin e-mail lui