Home Download Buy Blog Forum Support

How can I reload the current file use sublime plugin?

How can I reload the current file use sublime plugin?

Postby msmark on Wed Oct 23, 2013 4:47 pm

Hello guys, how can I reload the current file from disk use sublime plugin ?
Any hlep will welcome ,thanks! :roll:
msmark
 
Posts: 2
Joined: Wed Oct 23, 2013 4:41 pm

Re: How can I reload the current file use sublime plugin?

Postby NoxArt on Fri Oct 25, 2013 11:45 am

Code: Select all
sublime.active_window().active_view().run_command("revert")

Unfortunately I forgot who told me that, so I can't credit him :/
NoxArt
 
Posts: 14
Joined: Mon Jan 30, 2012 9:05 pm

Re: How can I reload the current file use sublime plugin?

Postby msmark on Sun Oct 27, 2013 3:26 pm

NoxArt wrote:
Code: Select all
sublime.active_window().active_view().run_command("revert")

Unfortunately I forgot who told me that, so I can't credit him :/

Thank u,it can work in sublime console but doesn't work in code.
msmark
 
Posts: 2
Joined: Wed Oct 23, 2013 4:41 pm

Re: How can I reload the current file use sublime plugin?

Postby NoxArt on Sun Oct 27, 2013 6:04 pm

Works for me. It's been a part of my plugin for a decent time, I experience it almost daily. It's used after the plugin downloads a file to refresh the view to see the changes. There's probably an issue with using it in your code ... or you have some particular weird scenario when it does not work :/. No error is reported?
NoxArt
 
Posts: 14
Joined: Mon Jan 30, 2012 9:05 pm


Return to Plugin Development

Who is online

Users browsing this forum: Exabot [Bot] and 6 guests