Hi,
Michel wrote:
# On Thu, 12 Oct 2000 11:46:50 +0900, Dave Thomas wrote:
# > Ah, you're missing my trivial emacs function:
# >
# > (defun ruby-xmp-region (reg-start reg-end)
#
# For the vim-dudes a trivial mapping:
#
# map <M-F10> :!ruby -r xmp -n -e 'xmp($_, "\%l\t\t\# \%r\n")'<CR>
#
# Highlight code using shift-v and hit meta-f10.
Thanks Dave and Michel and Gotoken--hope this tip ends up in the Ruby FAQ.
Another bit of information that may help out others is that the Ruby xmp
library is something you have to get from the RAA, which will point you to
this page for downloads:
http://www.notwork.org/~gotoken/ruby/p/xmp/
This suggests an interesting evaluation mode for some future Ruby IDE:
a = "" # => ""
b = "s #{a}so" # => "s so"
c = " i#{b} c" # => " is so c"
d = "is#{c}oo" # => "is is so coo"
e = "Th#{d}l!" # => "This is so cool!"
Since this is something every Ruby unit should always have on tap, how
about making the mere 227 line xmp library part of the standard Ruby
distribution?
Conrad Schneiker
(This note is unofficial and subject to improvement without notice.)