Skip to content

Commit

Permalink
Merge pull request jdavisclark#148 from titoBouzout/master
Browse files Browse the repository at this point in the history
Allow to disable "format_selection"
  • Loading branch information
Davis Clark committed Jul 7, 2015
2 parents add9241 + 7a96f8f commit 42cd3a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions JsFormat.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

// jsformat options
"format_on_save": false,
"format_selection": true,
"jsbeautifyrc_files": false,
"ignore_sublime_settings": true
}
2 changes: 1 addition & 1 deletion js_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def run(self, edit):
selection = self.view.sel()[0]

# formatting a selection/highlighted area
if(len(selection) > 0):
if(len(selection) > 0 and s.get("format_selection")):
jsf.format_selection(self.view, edit, opts)
else:
jsf.format_whole_file(self.view, edit, opts)
Expand Down

0 comments on commit 42cd3a1

Please sign in to comment.