Hari Krishna Dara schrieb:
> On Wed, Sep 30, 2009 at 2:27 AM, Andy Wokula <[email protected]> wrote:
>> Hari Krishna Dara schrieb:
>>> On Tue, Sep 29, 2009 at 5:35 PM, Kana Natsuno <[email protected]>
>>> wrote:
>> At least
>> :map <SNR>
>>
>> prints all my <SID> mappings, which include the script numbers, and I
>> can do e.g.
>>
>> :nn <SNR>15_yank :call <SNR>15_yank()<CR>
>>
>> at the command line to re-execute what was previously defined by a
>> script as:
>>
>> :nn <SID>yank :call <SID>yank()<CR>
>
> This is not a "feature" per se, you are simply finding all those maps
> that have an <SID> in the front.
Not only an <SID> (<SNR> actually), but also the script-ID.
> This is not the case that we are trying to point out. Consider these
> two samples:
>
> :nmap <script> <F12> <Plug>SomeScriptLocal
> :inoremap <expr> <Tab> <SID>expandTab()<CR>
(sorry these examples hurt the eyes ...)
I'm pretty much aware of that ... you pointed out several things and I
was only referring to the following paragraph:
>>> If we can extend the :map command to accept an optional scriptID as
>>> <script:SID>, then we could output map commands with the original SID
>>> in place, but then there are two issues:
Again: This functionality is already there (?).
> Are you referring to the <script:SID> format already being there?
Yes, I did.
> I just checked, it is not there.
Ah, you want to add a new map-modifier <script:SID> next to <script>,
<expr>, etc? And with SID replaced by the script number? For example
:nn <script:15> <SID>yank :call <SID>yank()<CR><SID>DoMore
(Please correct this as needed)
But how is this different from
:nn <script> <SNR>15_yank :call <SNR>15_yank()<CR><SNR>15_DoMore
> You could of course call script local functions using the <SNR>_
> syntax, but it doesn't serve all cases.
Ok.
Which are those cases?
Which are those cases solved by your suggestion?
> I went ahead and did a POC for this feature and am attaching the
> patch.
Looks promising, but I'll have to let others comment on that.
--
Andy
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---