Sublime Text



  1. Www.sublimetext.com
  2. Sublimetext Para Linux

Download Sublime Text for Windows now from Softonic: 100% safe and virus free. More than 7906 downloads this month. Download Sublime Text latest versi. Sublime Text is available for Mac, Windows and Linux. One license is all you need to use Sublime Text on every computer you own, no matter what operating system it uses. Sublime Text uses a custom UI toolkit, optimized for speed and beauty, while taking advantage of native functionality on each platform.

Sublime text downloadBrowse

Prettify/Minify/Query/Goto/Validate/Lint JSON plugin for Sublime Text 2 & 3

Labelsjson, pretty, lint, minify, validate, query, json2xml

Installs

  • Total834K
  • Win343K
  • Mac358K
  • Linux134K
Apr 21Apr 20Apr 19Apr 18Apr 17Apr 16Apr 15Apr 14Apr 13Apr 12Apr 11Apr 10Apr 9Apr 8Apr 7Apr 6Apr 5Apr 4Apr 3Apr 2Apr 1Mar 31Mar 30Mar 29Mar 28Mar 27Mar 26Mar 25Mar 24Mar 23Mar 22Mar 21Mar 20Mar 19Mar 18Mar 17Mar 16Mar 15Mar 14Mar 13Mar 12Mar 11Mar 10Mar 9Mar 8Mar 7
Windows2152372761129221924226126225994992172382612431448669178229260245257988521426626823825295114222252269260257917725226025327624392
Mac2593253128283244334310336299869126030132131418475712392883052813049175257328340342276738424732432234430910210928133036932123487
Linux69869339258485837979322981738075613136546691797426257175727263342763817476673928637673988235

Readme

Source
raw.​githubusercontent.​com

Prettify/Minify/Query/Goto/Validate/Lint JSON plugin for Sublime Text 3 & 4

Installation

Package Control (Recommended)

Install this sublime text ¾ package via Package Control search for package: “Pretty JSON

Manual Installation

Sublime Text 4

  • cd <Packages directory> (MacOS: ~/Library/Application Support/Sublime Text/Packages)
  • git clone https://github.com/dzhibas/SublimePrettyJson.git 'Pretty JSON'

Sublime Text 3

  • cd <Packages directory> (MacOS: ~/Library/Application Support/Sublime Text 3/Packages)
  • git clone https://github.com/dzhibas/SublimePrettyJson.git 'Pretty JSON'
  • cd Pretty JSON
  • git checkout st3

Sublime Text 2No longer supported

Usage

To prettify JSON, make selection of json (or else it will try to use full view buffer) and press keys:

  • Linux: ctrl+alt+j
  • Windows: ctrl+alt+j
  • OS X: cmd+ctrl+j

or through Command Palette Ctrl+Shift+P find “Pretty JSON: Format JSON” (you can search for part of it like 'pretty format')

If selection is empty and configuration entry use_entire_file_if_no_selection is true, tries to prettify whole file

Www.sublimetext.com

If JSON is not valid it will be displayed in status bar of Sublime Text

Validate JSON

Using Command Palette Ctrl+Shift+P find “Pretty JSON: Validate” (you can search for partial string 'validate') this will validate selection or full file and will show in dialog if it's valid or invalid. In case of found errors view will jump to error and will highlight it

Compress / Minify JSON

Using Command Palette Ctrl+Shift+P find “Pretty JSON: Minify JSON” (you can search for part of it like 'json minify') this will make selection or full buffer as single line JSON which later you can use in command lines (curl/httpie) or somewhere else…

To map a key combination like Ctrl+Alt+M to the Minify command, you can add a setting like this to your .sublime-keymap file (eg: Packages/User/Default (Windows).sublime-keymap):

Convert JSON to XML

Using Command Palette Ctrl+Shift+P search for “Pretty JSON: json2xml” (you can search for part of it like '2XML') this will convert your selected JSON of full buffer to XML and replace syntax and buffer to XML output

./jQ query/filter usage

Demo:

If on your machine “./jq” tool is available with ctrl+atl+shift+jyou can run against your json. output will be opened in new view so you can once again apply jq on new buffer

You can find instructions of tool here:

Default configuration

  • use_entire_file_if_no_selection

    • Default: true
  • indent

    • Default: 2
    • Integer represents amount of spaces
    • t will utilize a tab character
  • sort_keys

    • Default: false
  • ensure_ascii

    • Default: false
  • line_separator

    • “,”
  • value_separator

    • “: ”
    • Value separator in config, so if you need to get rid of extra space you can remove it with this param
  • keep_arrays_single_line

    • Default: false
    • If we need to re-structure arrays and make them single-line
  • max_arrays_line_length

    • Default: 120
    • If array for example '[“a”, “b”, 123213, ….]' length will reach max it will be kept multi-line
  • pretty_on_save

    • Default: false
    • Do we need to automatically Pretty JSON on save
  • validate_on_save

    • Default: true
    • Do we need validate JSON files on each save
  • reindent_block

    • Default: false
    • If we are formatting a selection, if we need to reindent theresulting block to follow the flow of the source documentthe posible values are 'minimal' and 'start'

    using minimal, the resulting json lines are indented as much spaces as the line where the selection starts. e.g

    gets formatted as:

    using start, the resulting json lines are indented a numberof spaces equal to the column number of the start of the selection

    with start the previous example gets formatted as:

Sublime Text

Using tabs for indentation

You can change configuration key indent to string value 't' or any other string Update my mac to 10.11.

Sublimetext Para Linux

Be sure 'Indent Using Spaces' is unchecked otherwise you will not see effect and ST3/4 will convert it back to spaces

Contributors

Others

If you YAMLing then maybe you interested in this plugin: PrettyYAML