Re: Using + in Perl embedded in Vim functions
- Benji Fisher wrote:
> Bram Moolenaar wrote:Yeah, but this requires the code to check for the "<<EOF". It just
> > The code that checks for the "endfunction" doesn't know about Perl
> > commands. It recognizes the "$i" as the start of an ":insert" command
> > on the last line. This continues until a "." on a line by itself. This
> > is accepted (although the Perl code won't work):
> > function! Test()
> > perl <<EOF
> > my $i = 0;
> > $i++;
> > VIM::Msg("i = $i");
> > .
> > EOF
> > endfunction
> > Recognizing these Perl commands and skipping them would be possible, but
> > it also should be implemented for other languages then.
> Wouldn't it be simpler (and less language-specific) for the Vim
> parser to ignore everything from "perl <<EOF" to "EOF"? To the
> uneducated (me) it does not seem any more complicated than ignoring
> everything from "$i" to ".".
isn't there yet. Note that the "EOF" could be something else.
A mathematician is a device for turning coffee into theorems.
A computer programmer is a device for turning coffee into bugs.
/// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
/// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
\\\ Project leader for A-A-P -- http://www.a-a-p.org ///
\\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///