Embedded C code in Ruby strings
Nikolai Weibull
mailing-lists.vim-ruby-development at rawuncut.elitemail.org
Mon Nov 15 09:24:41 EST 2004
* Jonathan Paisley <jp-www at dcs.gla.ac.uk> [Nov 15, 2004 15:00]:
> I've been playing with RubyInline recently, and have been using here docs
> for the embedded C code. e.g.,
>
> class SomeClass
> inline do |builder|
> builder.c <<-EOC
> int min(int x,int y) { return x < y ? x : y; }
> EOC
> end
> end
>
> I wanted to highlight in vim the embedded C code as C, so I added extra
> definitions for the ruby here doc which match against the tag 'EOC'
> (end-of-C).
This should probably not go into the core.
nikolai
--
::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
More information about the vim-ruby-devel
mailing list