diff --git a/Readme.md b/Readme.md index aaf55ae..6eafc05 100644 --- a/Readme.md +++ b/Readme.md @@ -24,8 +24,8 @@ Once you install Package Control, restart ST2 and bring up the Command Palette ( AutoPEP8 runs in one of two modes: -+ **AutoPep8 Format** (`Command/Control+Shift+F8`) - automatically formats code -+ **AutoPep8 Preview** (`Command/Control+F8`) - open new tab to preview changes ++ **AutoPep8 Format** (`Command/Control + Shift + 8`) - automatically formats code ++ **AutoPep8 Preview** (`Command/Control + 8`) - open new tab to preview changes You can also select mode by mouse right click. diff --git a/messages/install.txt b/messages/install.txt index b1a74c3..1785d42 100644 --- a/messages/install.txt +++ b/messages/install.txt @@ -12,7 +12,7 @@ Features: AutoPEP8 runs in one of two modes: - AutoPep8 Format (Command/Control+Shift+F8) - automatically formats code - AutoPep8 Preview (Command/Control+F8) - open new tab to preview changes + AutoPep8 Format (Command/Control + Shift + 8) - automatically formats code + AutoPep8 Preview (Command/Control + 8) - open new tab to preview changes You can also select mode by mouse right click. \ No newline at end of file diff --git a/sublautopep8.py b/sublautopep8.py index d0369c6..b432b97 100644 --- a/sublautopep8.py +++ b/sublautopep8.py @@ -128,8 +128,10 @@ def run(self, edit, preview=True): (0.0, 0.0)) # magic, next line doesn't work without it self.view.set_viewport_position(vector) - if not has_changes: - sublime.message_dialog("0 issues to fix") + if has_changes: + sublime.status_message('AutoPEP8: Issues fixed') + else: + sublime.status_message('AutoPEP8: No issues to fix') def is_visible(self, *args): return self.view.settings().get('syntax') == "Packages/Python/Python.tmLanguage" @@ -183,11 +185,13 @@ def run(self, paths=None, preview=True): else: preview_output += out_data.decode('utf-8') - sublime.status_message("") - if has_changes and preview_output: - self.new_view('utf-8', preview_output) - if not has_changes: - sublime.message_dialog("0 issues to fix") + if has_changes: + if preview_output: + self.new_view('utf-8', preview_output) + else: + sublime.status_message('AutoPEP8: Issues fixed') + else: + sublime.status_message('AutoPEP8: No issues to fix') def files(self, path): result = []