Sublime Forum

Save() API method

#1

I’m curious is there way to save file with API. I use Sublime in openSUSE with KDE and I don’t like that Sublime use gtk file dialogs for openening and saving. I found this simple plugin sublimetext.com/docs/3/api_ … ime.Window. Have you any ideas how it can be implementing? Maybe it make sense to request to enhance API?

0 Likes

#2

I think you have to first give a filename to the view using retarget and after run the standard save command (not tested):

view.retarget(new_file_path) view.run_command('save')

1 Like

#3

Thanks a lot bizoo! It works!

0 Likes