-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Wouldn't it be better to use the OS' native "save as" dialog, instead of an input panel?
I realize that there is no API to ask the user to choose a file, but wouldn't the following suffice?
import sublime
import sublime_plugin
class SaveCopyAsCommand(sublime_plugin.TextCommand):
def run(self, edit):
previous_path = self.view.file_name()
self.view.run_command('prompt_save_as')
self.view.retarget(previous_path or '')
def is_enabled(self):
return self.view.file_name() is not Nonei.e. let ST show it's normal Save As prompt, then set the view back to tracking the original file path
Cerberus-tm and englishextra
Metadata
Metadata
Assignees
Labels
No labels