Here's a much better solution: Don't edit the theme's functions.php file. Don't put your custom code into that file either.
If you have snippets of code for a site, put them into a custom plugin. Put each one into its own plugin, in fact. Separate them by functionality.
I even made a handy dandy plugin to make this easier, called Pluginception.
The nice thing about editing plugins in the WordPress plugin edit screen: If you screw it up and cause a fatal error, WordPress will detect it and disable the plugin. This might break your site, but it probably won't break the admin screens and you can fix your error and reactivate the plugin.
Don't worry about the number of plugins. That's totally irrelevant. The code is what matters. The code has the same impact whether you put in a bunch of easily separated plugins or whether you shove it all together into one functions.php file that is dangerous to edit.