I suggest you don’t… The theme editor is for emergencies IMO…
With an FTP client using a text editor you’ll have far less trouble.
Some people use the editor in the admin to edit theme and plug-in files (I recommend against this unless you can maintain 644 on the files being edited there), discover they have permission issues (as the PHP process will have different credentials on most servers) and change their files to 666. I’m uncomfortable with this. And I have a crush on FileZilla. Yes, I need to get out more.
If I ftp to my site with FileZilla and double-click on a file, it opens in my favorite text editor ( Edit:Settings:File viewing / editing in FileZilla’s menu) and in a much more ‘comfortable’ environment I can make changes, save, and click OK to upload the changed file to the server. The other benefit to this is that the file is being read and written through ftp which maintains my user/group identity, giving me more security and control.
For IIS, the correct answer is to give IUSER_K2SERVER access to modify the files in your theme directory.
Of course backing up and using FTP is a better solution for normal use. Unfortunately “normal use” is a very rare thing in the real world 😉