On Mon 27-Nov-06 12:30am -0600, Yegappan Lakshmanan wrote:
> On 11/26/06, Bill McCarthy <[EMAIL PROTECTED]> wrote:
>> On Sun 26-Nov-06 8:55pm -0600, Yegappan Lakshmanan wrote:
>>
>> > On 11/24/06, Bill McCarthy <[EMAIL PROTECTED]> wrote:
>>
>> >> From calendar.vim (which is in my AsNeeded directory):
>> ---------------------------------
>>
>> <snip>
>>
>> > When I placed the above mappings in the .vimrc file, the mappings
>> > for \cal and \caL are removed and the new mappings \cv and \ch
>> > open the calendar window.
>>
>> Only If I move calendar.vim from AsNeeded/ to plugin/ can I
>> duplicate those results. As my question begins, the plugin
>> is in AsNeeded/. I am trying to figure out how to eliminate
>> the duplication with the plugin in AsNeeded/.
>>
>> Are \cal and \caL not defined when the plugin is in
>> AsNeeded?
> Yes. The plugins under the AsNeeded (and autoload) directory
> are sourced only when an undefined function or a command is
> invoked. If you invoke the ":Calendar" command, then your
> maps should start to work.
True, if I define (in vimrc):
nmap <unique> <Leader>ch <Plug>CalendarH
nmap <unique> <Leader>cv <Plug>CalendarV
Then AsNeeded is not transparent. One needs to first
execute a command - not desirable.
If instead, I define:
nmap <unique> <Leader>ch :CalendarH<CR>
nmap <unique> <Leader>cv :Calendar<CR>
Then there is no need to execute a command before invoking a
mapping - AsNeeded is transparent. However the default
mappings inside calendar.vim take effect, so there are now
two mappings to each of the commands.
--
Best regards,
Bill