I do exactly the same with TextMate and MacVim and they work properly without the need of what you mentioned. I only add sudo when the file is not in my home directory. I don't even have to add sudo with TextMate, it asks me for the password when I hit save.