コード例 #1
0
ファイル: js_formatter.py プロジェクト: foresthz/JsFormat
 def on_pre_save(self, view):
     if(s.get("format_on_save") and jsf_activation.is_js_buffer(view)):
         # only auto-format on save if there are no "lint errors"
         # here are some named regions from sublimelint see https://github.com/lunixbochs/sublimelint/tree/st3
         lints_regions = ['lint-keyword-underline', 'lint-keyword-outline']
         for linter in lints_regions:
             if len(view.get_regions(linter)):
                 return
         view.run_command("js_format")
コード例 #2
0
 def on_pre_save(self, view):
     if (s.get("format_on_save") and jsf_activation.is_js_buffer(view)):
         # only auto-format on save if there are no "lint errors"
         # here are some named regions from sublimelint see https://github.com/lunixbochs/sublimelint/tree/st3
         lints_regions = ['lint-keyword-underline', 'lint-keyword-outline']
         for linter in lints_regions:
             if len(view.get_regions(linter)):
                 return
         view.run_command("js_format")
コード例 #3
0
ファイル: js_formatter.py プロジェクト: foresthz/JsFormat
 def is_visible(self):
     return jsf_activation.is_js_buffer(self.view)
コード例 #4
0
 def is_visible(self):
     return jsf_activation.is_js_buffer(self.view)
コード例 #5
0
 def on_pre_save(self, view):
     if (s.get("format_on_save") == True
             and jsf_activation.is_js_buffer(view)):
         view.run_command("js_format")
コード例 #6
0
ファイル: js_formatter.py プロジェクト: ArtakManukyan/config
	def on_pre_save(self, view):
		if(s.get("format_on_save") == True and jsf_activation.is_js_buffer(view)):
			view.run_command("js_format")