Indent for Ruby, to reformat it

To be explicit, you need at least:

set nocompatible
syntax on
filetype on
filetype indent on
filetype plugin on

martin

···

Kirk Haines <khaines@enigo.com> wrote:

Follow the instructions found there or on the vim-ruby page:

http://vim-ruby.rubyforge.org

to install, and then make sure your .vimrc is setup to make use of what you
just installed.

The last bit is important. Otherwise, you get really nasty looking
indentation.

Well, I just updated and most if not all went away! I am a really
happy camper now. But!!!... if I do find any *real* bugs (i.e. not
from 2 yrs ago) I'll let someone know for sure ;-).

Jacob

···

On 10/10/05, Doug Kearns <dougkearns@gmail.com> wrote:

On Mon, Oct 10, 2005 at 02:20:46AM +0900, Jacob Quinn Shenker wrote:
> Vim's Ruby indentation has actually worked very well for me, although
> the syntax coloring gets confused at times.

If you report them as bugs someone might try and fix them. :wink:

<snip>

Regards,
Doug

David Vallner <david@vallner.net> writes:

Hack up three lines of Emacs Lisp to get the Emacs ruby-mode to do the
indentation for you? I usually get good results with XEmacs indenting my
code for me, although I don't have a quick and dirty way to do it via
the command line at hand.

Yes, that's what I meant.

  xemacs -batch foo.rb -eval '(indent-region (point-min) (point-max) nil)' -f save-buffer -kill

Tim