Indenting here documents (was Re: [ANN] Vim/Ruby Configuration Files, 2005.10.05)

Nikolai Weibull mailing-lists.vim-ruby-development at
Wed Oct 12 11:34:55 EDT 2005

Hugh Sasse wrote:

> It is working for me in so far as it will leave the EOF where I put
> it.  If it starts out (incorrectly) indented it will remain indented. If
> everything is left-justified (all lines start in column 1 (pausing
> only to fend off a FORTRAN programmer!)) then the EOF and the quoted
> text gets left in column 1 and the rest gets indented correctly.  Of
> course, it would be lovely if it were able to figure out, with
> reference to the << and the <<- what should actually happen, but
> this is much better than before because indenting doesn't break
> stuff that works.  Since I can't figure out how to do the ideal,
> this is enough to make me happy.

Yes, the indentation code leaves all strings as they were.  It simple
returns the indent(".").  There’s really no other way of doing it
without a lot of messing about.  I mean, a user has probably indented a
string the way they have for a reason.  The indentation code isn’t meant
to work for stuff that has had all its indentation removed.  (Where do
you get these files without indentation anyway?),

Nikolai Weibull: now available free of charge at!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.

More information about the vim-ruby-devel mailing list