Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I just ran across this page and thought I should mention how I do vim extensions in perl.
First, I put all the code in a module, which I load from the vim script. All of the mappings and functions I want to define are in the vim script, but they are just stubs for a perl functions, eg By putting only trivial perl in the vim script, I minimize difficult-to-debug problems that come from mixing perl and vim. Also, things like syntax highlighting work perfectly on the module. Second, I want the module to syntax-check outside of vim (the major pay-off of step one). This is a simple matter of duplicating the prototypes that vim implicitly sets up, eg I have not made any effort to make my module run outside of vim, as it is quite intimately tied to vim. Third (my favorite part), some syntactic sugar to make vim commands look like vim commands (this should be its own module, but I'm lazy):
By the way, the problem that you don't get any output from syntax errors is really a perl bug. In reply to Re: Writing a Filter::Simple -based filter for .vim
by pimlott
|
|