On Thu, Oct 1, 2009 at 7:41 AM, Bob Hiestand <[email protected]> wrote:
>
> On Wed, Sep 30, 2009 at 10:57 AM, Hari Krishna Dara <[email protected]> 
> wrote:
>>
>> 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.
>
> I'd prefer to see a separate way to access each modifier, though maybe
> that could be something like v:cmdmodifier["split"].  In any event, I
> would love this feature.

That is not convenient for most of the use cases. E.g., to modify the
window split behavior, the user could have specified any of "top",
"vertical", "leftabove", "rightbelow", "topleft" etc., so would you
search for each of the flags to compose the modifiers to pass down to
the final split your plugin is going to perform, instead of a simple
pass through like this?

  exec v:cmdmodifiers 'split' s:windowName

I think the sweet spot is a single string, but with any modifiers
expanded to their full name, as it serves all the needs.

-- 
Hari

>
> >
>

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

Raspunde prin e-mail lui