Sublime CodeFormatter supports formatting PHP, JavaScript / JSON / JSONP, HTML, CSS, Python. Although I haven't used CodeFormatter for a long time, I was impressed with the JS, HTML, and CSS "decorating" features. I have not tried using it with PHP (I am not involved in PHP development) or Python (with which I have no experience), but both languages ββhave many parameters in the .sublime-settings file.
However, however, the settings are not so easy to find. On Windows, you will need to go to %AppData%\Roaming\Sublime Text #\Packages\CodeFormatter\CodeFormatter.sublime-settings . Since I don't have a Mac, I'm not sure where the settings file is on OS X.
Regarding the shortcut key, I added this key binding to my " Key Bindings - User " file:
{ "keys": ["ctrl+k", "ctrl+d"], "command": "code_formatter" }
I use Ctrl + K , Ctrl + D because this is what Visual Studio uses for formatting. You can change it, of course, just remember that what you choose may conflict with some other function key combination.
Update:
Sublime Text CodeFormatter seems to have made access to the .sublime-settings file .sublime-settings . If you install CodeFormatter using the package management module, you can access the settings using Preferences -> Package Settings -> CodeFormatter -> Settings - Default and override these settings using the menu item Preferences -> Package Settings -> CodeFormatter -> Settings - User .
Sumner Evans Apr 25 '13 at 13:25 2013-04-25 13:25
source share