When I open for example my hosts file, in /etc/hosts, and enters some stuff, Sublime can’t save because I need to authenticate. Sublime should handle this.
Authenticate on save
This would be a great feature. This is the ONLY thing I still use Textmate for, to save files that you need to ‘sudo’ to modify.
Use case:
$ subl /etc/hosts
edit file contents
cmd + s
prompt for password and have Sublime take care of the rest
At risk of becoming repetitive, this is also the only reason I’ve found so far for sticking with TextMate.
+3
Stuart
I just registered to say in a loud and booming voice: **plus one **!
I need this all the time to edit /etc/hosts.
Up vote sublimetext.userecho.com/topic/2 … n-to-save/ if you want support for this feature.
feature added
Build 2147
Release Date: 15 December 2011
OSX: Prompting for elevated privileges when saving protected files
Sublime can now, via authentication, save changes to existing superuser files. However, it cannot (1) create such files (if one tries to create a new file, in a privileged location, Sublime just cannot save it), (2) when Sublime can save the file, i.e. when the file exists already, it prompts for authentication (unless it - Sublime - is run as root) every time one saves.
Both 1 and 2 are a considerable inconvenience and should not be hard to fix.
On both 1 and 2, cf. this already extant feature request. Also, I think that I myself have already filed a request along the lines of 2, and a dev said Sublime would consider it, but I cannot now find that request.