"Joao Pedrosa" <joaopedrosa / myrealbox.com> wrote in message news:1055601220.9254.8.camel / localhost.localdomain... > Hi, > > > Vim did format it, but not as expected. It doesn't even indent > correctly for me. Anyone can confirm that it doesn't work properly ? > > Thanks Michael, > Joao I use vim for my ruby coding. I set smartindent on as well--not sure how much difference that makes for ruby. It mostly does the right thing, but... The problem is that it will end up completely in the weeds after it gets one line wrong (since vim indents seem to be very much based on what the previous line was). I've found I can't indent too many lines at once without this happening. So I don't find I can use gg=G without being unhappy. Some things that aren't necessarily 'wrong', but aren't how I like them: foo = "someverylongstring and some other "+ "something else" The "something else" just lines up with the previous line. I'd like to see it indented. Same goes for any non-complete line. bar = some_method(afjdksajk, gjfrjeje, fjdkjska, dfjkdsjk, ss) I'd like for this to have the second line line up with the open paren. Basically, I want things to work how ruby-mode for emacs works but I want to use vim :) There are just two things I miss from emacs now that I've made the switch: psgml-mode, and the near certainty that emacs indent will tell me when I've goofed something up and make it look just how I like it. >xemacs -batch myprog.rb -eval '(indent-region (point-min) (point-max) >nil)' -f save-buffer -kill This thread is useful to me though, as I can just define a vim map that will run the buffer through emacs batch mode and get it how I like it :) Thanks, Tim, for the tip!