The vBulletin template editor is awful, let be honest. But I found a little Firefox addon that brings it one step closer to being bareable. It allows you to use tabs in textareas which I find really useful as I like my code tidy. It doesn't seem to obtrusive either so its really worth installing.
https://addons.mozilla.org/en-US/firefox/addon/3955
Another good one is foxreplace. Ive not used this yet though but it seems good
https://addons.mozilla.org/en-US/firefox/addon/6510