Thanks for your reply
Could you give some more details how to do it?
Iām not Python developer but I assume that it should be fairly easy to add that kind of feature to ST2 and itās very important to me, because Iām preparing SASS video course and it would be great if I could show everything on-the-fly in ST.
EDIT:
Success! You gave me a good hint and then I started to dig in Sublime Text API and āHow to write a pluginā tutorials. I made two plugins and everything works as expected, but itās some kind of a workaround. Anyway, thanks for help! Code that I wrote is below. Maybe someone will use it:
Plugin for reloading all opened files (all tabs)
[code]import sublime, sublime_plugin
class ReloadAllFilesCommand(sublime_plugin.WindowCommand):
def run(self):
# Run command after 1sec (i.e. wait for SASS to compile CSS)
sublime.set_timeout(self.focus_all_views, 1000);
def focus_all_views(self):
window = self.window
# Remember current view
current_view = window.active_view()
# Save group number
gr_number = window.num_groups()
# Loop through all groups
for i in range(0, gr_number):
# Focus group
window.focus_group(i)
# Save views in that group
views_in_i = window.views_in_group(i)
# Focus all views here
for inner_view in views_in_i:
window.focus_view(inner_view)
# Back to current view
window.focus_view(current_view)
[/code]
Plugin for saving file and reloading all opened files
[code]import sublime, sublime_plugin
class SaveAndReloadCommand(sublime_plugin.WindowCommand):
def run(self):
self.window.run_command(āsaveā)
self.window.run_command(āreload_all_filesā)[/code]
And finally, user key binding:
{ "keys": "ctrl+s"], "command": "save_and_reload" }
Maybe itās not the best possible solution, but like I said - Iām not Python programmer and itās my first ST2 plugin