on 12/12/2002 9:34 AM Errol Lewis said the following:
> Help, I am trying to add Perl syntax to cream. I am using the
> perl.vim the comes with VIM. I tried to create an add-on module
> which I place at the top of the file but every time VI starts the
> _vimrc file is loaded. How can I get Cream to work with the perl.vim
> file on a Windows platform so I can create Perl scripts?
> " list as an add-on if Cream project in use
> if exists("$CREAM")
> call Cream_addon_list(
> \ 'perl.vim',
> \ 'create Perl tags',
> \ 'add Perl syntax to cream',
> \ 'Perl',
> \ '<Nil>'
> \ '<Nil>}'
> \ )
Hmm... I'm not sure if I understand what you're trying to do. Let's
work through this one piece at a time.
First, Vim's ftplugin/perl.vim file should be automatically loaded
outside of anything that Cream is doing. By "add Perl syntax" did you
mean "syntax highlighting"? If so, Vim should take care of this with
or without Cream. Is this the problem?
Or perhaps you have some special customizations you are trying to add?
If so, you could just put them in a file called cream-user.vim and
Cream will automatically load them.
Thirdly, if you are trying to create a Perl module for Cream that has
a particular Add-on function that can be selected from the menu, then
it appears that you are on the right track to creating an add-on.
However, the last two fields in your statement above should then be
the function calls activated whenever someone picks the item from the
menu. The fifth argument is the insert mode call and the sixth is the
visual mode call. They both can't be <Nil> since then the menu pick
wouldn't do anything. (It appears that you have an errant trailing
bracket in the sixth argument, too.)
If you just want an insert mode call, leave the sixth argument off.
(I've added a ToDo to allow the vcall to be "<Nil>", which it
currently cannot be.)
Finally, you might be trying to create a module that changes the
environment a bit to facilitate Perl better but without a menu pick.
If so, don't bother making the call above. Cream will still source the
file if it's in the "addons/" subdirectory, but won't add any menu
items for it or allow a user-defined keymap to it.
Does any of this help?
Steve Hall [ digitect(at)mindspring.com ]
Try Cream in your Vim... it takes the bitterness out!