[prev in list] [next in list] [prev in thread] [next in thread]
List: vim
Subject: Re: ruby embedding and here documents
From: Bram Moolenaar <Bram () moolenaar ! net>
Date: 2002-12-29 21:39:32
[Download RAW message or body]
Emmanuel Touzery wrote:
> In general i have no problems embedding ruby code in vim macros using
> here documents, eg
> function A()
> ruby << EOF
> # ruby code
> EOF
> endfunction
>
> however vim does not seem to support that then the ruby code itself uses here
> documents..
> eg try to source this:
> ---------8<----------------
> function! Test()
> ruby << EOF
> a << TT
> TT
> EOF
> endfunction
> ---------------------------------
>
> you will get a E126: Missing :endfunction. if you remove the inner a<<TT\nTT,
> the problem disappears.
The problem is that the "a << TT" is recognized as an ":append" command.
Vim then searches for a line containing just a dot.
There is no special case for handling the "ruby << EOF" command inside a
function. I'll add a remark in the todo list that the lines until "EOF"
are to be consumed.
--
hundred-and-one symptoms of being an internet addict:
209. Your house stinks because you haven't cleaned it in a week.
/// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\
/// Creator of Vim - Vi IMproved -- http://www.vim.org \\\
\\\ Project leader for A-A-P -- http://www.a-a-p.org ///
\\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic