Sublime Forum

How can I reload the current file use sublime plugin?

#1

Hello guys, how can I reload the current file from disk use sublime plugin ?
Any hlep will welcome ,thanks! :unamused:

0 Likes

#2
sublime.active_window().active_view().run_command("revert")

Unfortunately I forgot who told me that, so I can’t credit him :confused:

0 Likes

Refresh current view
#3

[quote=“NoxArt”]sublime.active_window().active_view().run_command("revert")
Unfortunately I forgot who told me that, so I can’t credit him :/[/quote]

Thank u,it can work in sublime console but doesn’t work in code.

0 Likes

#4

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?

0 Likes