Hi,
Which "code" are you talking about? Could this be perl?
Here's one that does perl:
perltidy and
A Brief Perltidy Tutorial
BTW: This is not a native vim solution, but as explained in the brief tutorial, it can be used from within vim.
Hope this helps.