require "inline"
class Mytest
#c is here, not alignment
inline do |builder|
builder.c
"
long add(int b, int a)
{
return a +
b;
}"
#c end
end
end
are there some tool can alignment C in Ruby??thanks
> i edit a Ruby file, and programming with inline C, mode is ruby-mode,
> so emacs can't alignment C, like this:
> are there some tool can alignment C in Ruby??thanks
I don't know if there is such tool but Emacs has a built-in feature
which can handle several modes in the same text content: indirect
buffers. Clone your buffer with "C-x 4 c" so you have two buffers which
always have equal content and refer to the same file but are otherwise
separate buffers. You can use different major and minor modes and
buffer-local variables in indirect buffers.