I've just re-read the problem, I thought he was talking about vim automatically indenting everything.
It should be reasonably easy to create a function for this though, prefix each line in the buffer with 'indent(".")' spaces, or copy the whitespace at the beginning of the current line.