Dominique Pelle wrote:

> The ":sign" command currently has no command line
> completion.  Attached patch (against Vim-7.2.148)
> adds command line completion for this command.
> 
> A few examples:
> 
>   :sign <CTRL-D>
>   define  jump  list  place  undefine  unplace
> 
>   :sign define foo <CTRL-D>
>   icon=   linehl=   text=   texthl=
> 
>   :sign define foo linehl=Spel<CTRL-D>
>   SpellBad   SpellCap   SpellLocal   SpellRare
> 
>   :sign define foo icon=/usr/share/icons/<CTRL-D>
>   (completes with file names)
> 
>   :sign place {id} name=<CTRL-D>
>   (completes with all defined sign names)
> 
>   :sign list <CTRL-D>
>   (completes with all defined sign names)
> 
>   :sign undefine <CTRL-D>
>   (completes with all defined sign names)
> 
> Not done yet, but I could also add:
> 
> - completion with placed sign ids when doing:
>   ":sign jump <CTRL-D>" or ":sign unplace <CTRL-D>".
> 
> - completion of buffer numbers when doing:
>   ":sign unplace {id} buffer=<CTRL-D>".
> 
> ... but I prefer to keep initial patch small and
> add extra features in further patches if there is
> enough interest in it.

Thanks for the patch.  A few comments.

":sign un" would be handled like ":sign undefine", even though it's
ambigious.  The new sign_cmd_idx() function needs to check that when not
doing completion there is a full word match.

In Vim code we don't use "const".  It's usually more work than it's
worth.

Can you update the patch for this?

-- 
Seen on the back of a biker's vest: If you can read this, my wife fell off.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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

Raspunde prin e-mail lui