On Wed, Sep 30, 2009 at 3:24 AM, Ingo Karkat <[email protected]> wrote:
>
> On 29-Sep-09 3:19, Hari Krishna Dara wrote:
>>   exec v:cmdmodifiers 'split' s:windowName
>
> I like the idea, definitely useful, and have been wanting this occasionally 
> when
> writing custom commands myself. Above quote probably covers most use cases; it
> seems unlikely that modifiers like 'confirm' and 'vertical' will be combined
> _and_ need to be handled separately. However, for such a use case it would
> simplify parsing of v:cmdmodifiers if the patch could expand (i.e. "vert" ->
> "vertical") any abbreviated modifiers.

I wanted it do it, but my programming experience in C is limited and
so didn't want to venture into that. As I said, most plugins won't
normally care what is in it, so this solution will meet majority of
the needs. When we do need to parse, Vim also has the "\%[]" regex
atom that could be of use here.

If expanding the modifiers is considered important, may be someone
else can build on top of this patch, or give me some references on how
to do this. I guess we need to first determine how long the string
would be based on those flags that are enabled in cmdmod structure and
then allocate memory and copy a string constant for each with a space
as separator? I guess this code should take care of passing a number
before the "tab" modifier. This is probably a child's play for a
seasoned C programmer.

-- 
Hari

> Using separate v: variables seems like
> overdoing it to me.
>
> -- cheers, ingo
> --
>   -- Ingo Karkat -- /^-- /^-- /^-- /^-- /^-- /^-- http://ingo-karkat.de/ --
>   --      http://vim.sourceforge.net/account/profile.php?user_id=9713    --
>
> >
>

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

Raspunde prin e-mail lui