How to get user input before saving a file in Sublime Text
- by EddieJessup
I'm making a plugin in Sublime Text that prompts the user for a password to encrypt a file before it's saved. There's a hook in the API that's executed before a save is executed, so my naïve implementation is:
class TranscryptEventListener(sublime_plugin.EventListener):
def on_pre_save(self, view):
# If document is set to encode on…