Work in progress.
Control+Shift+J will format the current document. Will format a selection as long as the selection is complete JSON.
- Non UTF-8 encodings are not handled well in Sublime Text 2 versions below 2144.
-
Change to Sublime Text packages folder:
- OS X: "~/Library/Application Support/Sublime Text 2/Packages"
- Windows: "%APPDATA%\Sublime Text 2\Packages"
- Linux: "~/.config/sublime-text-2/Packages"
-
Run the command:
git clone git://github.com/chrislongo/TidyJSON.git
-
Preferences->Package Settings->TidyJSON->Settings Default contains settings that can be tweaked per system.
Malformed JSON.
Current document or selection is not valid JSON.