Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP8-ify all the things. #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions FileReloader.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
import sublime, sublime_plugin
import sublime
import sublime_plugin


class ReloadAllFilesCommand(sublime_plugin.WindowCommand):
def run(self):
self.focus_all_views()
def run(self):
self.focus_all_views()

def focus_all_views(self):
window = self.window
saved_view = window.active_view()
total_groups = window.num_groups()
def focus_all_views(self):
window = self.window
saved_view = window.active_view()
total_groups = window.num_groups()

for i in range(0, total_groups):
window.focus_group(i)
views = window.views_in_group(i)
for i in range(0, total_groups):
window.focus_group(i)
views = window.views_in_group(i)

# Reload all views in current group
for inner_view in views:
window.focus_view(inner_view)
window.run_command("revert")
# Reload all views in current group.
for inner_view in views:
window.focus_view(inner_view)
window.run_command("revert")

# Set the focus back to the saved view
window.focus_view(saved_view)
# Set the focus back to the saved view:
window.focus_view(saved_view)