From 682b2787a199870e24ae19dd2497492fe588d395 Mon Sep 17 00:00:00 2001 From: xwartz Date: Sun, 6 Nov 2016 13:29:27 +0800 Subject: [PATCH] Fix trigger reload file when format --- Auto-Spacing.py | 9 +++++---- README-ZH.md | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Auto-Spacing.py b/Auto-Spacing.py index b725232..54f0ba6 100644 --- a/Auto-Spacing.py +++ b/Auto-Spacing.py @@ -88,10 +88,11 @@ def get_buffer_text(self, region): def run_script_on_file(self, data): try: viewText = self.view.substr(sublime.Region(0, self.view.size())) - file = codecs.open(data,'w','utf-8') - file.write(PluginUtils.spacing(viewText)) - file.close() - output = codecs.open(data,'r','utf-8').read() + # file = codecs.open(data,'w','utf-8') + # file.write(PluginUtils.spacing(viewText)) + # file.close() + # output = codecs.open(data,'r','utf-8').read() + output = PluginUtils.spacing(viewText) return output diff --git a/README-ZH.md b/README-ZH.md index 7688e9a..2d21d51 100644 --- a/README-ZH.md +++ b/README-ZH.md @@ -1,6 +1,6 @@ ## Auto-Spacing -Sublime Text 3 插件,给中英文之间加上空格。 +Sublime Text 3插件,给中英文之间加上空格。 为什么你们就是不能加个空格呢,为什么我就是能这样娴熟地加上空格呢。