Python-like indentation for Ruby
Although I don't know Python, I've always liked the idea of using indentation to mark blocks. One indents the code anyway, the lack of explicit end-of-block marks requires less lines, and the listing gets cleaner for my taste.
I wrote today some Elisp to let Emacs hide ends in a row and collapse their lines, intended for reading Ruby.
Thus, Emacs can display
def method(foo)
if condition(foo) then
do_something(foo)
end
foo.each do |bar|
bar.each do |baz|
do_something_else(baz)
end
end
end
as
def method(foo)
if condition(foo) then
do_something(foo)
foo.each do |bar|
bar.each do |baz|
do_something_else(baz)
which I find much more pleasant.