sublimetext-codeformatter
sublimetext-codeformatter copied to clipboard
Format only selection
Feature: possibility to format only selection part of code
Has this been implemented yet?
I've modified the code myself, this seems to work for me:
In CodeFormatter.py, change line 180 from:
file_text = sublime.Region(0, view.size())
to:
file_text = view.sel()[0] if view.sel()[0] else sublime.Region(0, view.size())
This will populate "file_text" with the selected text or will fall back to the default if nothing was selected.
Cf. also issue #335.
Is this project abandoned?