Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Commit

Permalink
Fix trigger reload file when format
Browse files Browse the repository at this point in the history
  • Loading branch information
xwartz committed Nov 6, 2016
1 parent 36e753d commit 682b278
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions Auto-Spacing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion README-ZH.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Auto-Spacing

Sublime Text 3 插件,给中英文之间加上空格。
Sublime Text 3插件,给中英文之间加上空格。

为什么你们就是不能加个空格呢,为什么我就是能这样娴熟地加上空格呢。

Expand Down

0 comments on commit 682b278

Please sign in to comment.