I want long JSON files to collapse in Sublime Text 3 like the Chrome network tab Preview section. Is there any Sublime Text package for this.
Something similar to following picture
Some of the answers here suggested Pretty JSON
, but it didn't work for me. Although the installation was successful but still after pressing the shortcut key [command + control + j]
, it didn't work for me. I double-checked the setting, everything was correct. I was using Sublime version 3.2.2
and my macOS version was Catalina Version 10.15.3
. I also found a thread in Github where multiple people mentioned the same issue with Sublime version 3.
Added a screenshot of my settings for reference.
Even though Pretty JSON
didn't work for me what worked for me was HTML-CSS-JS Prettify
.
Following are the steps to install through Sublime Package Manager:
1. Cmd+Shift+P
2. type install
, select Package Control: Install Package
3. type prettify
, select HTML-CSS-JS Prettify
After installing it, for formatting the JSON text we need to use the shortcut key [command + shift + h]
. That will format our JSON text.
Note: HTML-CSS-JS Prettify requires NodeJS in your system to work.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With