On Fri, Oct 2, 2009 at 1:26 PM, Bob Hiestand <[email protected]> wrote: > > On Thu, Oct 1, 2009 at 5:20 PM, Hari Krishna Dara <[email protected]> wrote: >> >> On Thu, Oct 1, 2009 at 7:41 AM, Bob Hiestand <[email protected]> wrote: >>> 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. > > If you change that to: > > exec v:cmdmodifiers['split'] 'split' s:windowName >
There would also be v:cmdmodifiers['tab'] that is of use here. And also :keepalt and may be others in the future. I think a string that has all expanded modifiers is simpler to use than a dictionary for most plugins. Would v:cmdmodifiers['split'] return a string of all modifiers or just the internal flag cmdmod_T.split? What about others that are just boolean flags? Would v:cmdmodifiers['keepjumps'] either return a blank string or the string 'keepjumps' depending on whether the flag is set or not? What about tab? Would it return the tab number, or the "[count]tab" string? -- Thanks, Hari > ... then you have what I requested. The 'split' entry of > v:cmdmodifiers would contain all the split-specific modifiers. I > can't think of other command-modifying commands off-hand; :silent and > :verbose already are available in variable form. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
