ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

JSONComma

by jsoncomma ST3

A Sublime Text plugin to deal with those damn JSON commas!

Details

Installs

  • Total 40K
  • Win 23K
  • Mac 12K
  • Linux 5K
Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6
Windows 1 5 1 3 2 7 1 3 3 2 6 3 8 3 3 2 5 5 2 4 3 1 4 4 0 0 0 1 3 5 8 4 5 5 2 6 3 0 0 3 4 2 0 4 6 4
Mac 1 4 3 3 1 7 2 0 1 4 8 4 2 0 0 5 1 4 1 8 0 2 1 3 0 0 0 0 2 3 11 4 0 4 3 3 1 0 0 2 2 1 1 3 6 2
Linux 0 0 1 1 2 0 0 0 1 1 2 2 0 0 0 2 1 1 0 1 0 0 2 0 0 0 0 0 0 0 0 0 0 1 0 0 2 0 0 2 1 3 2 0 0 3

Readme

Source
raw.​githubusercontent.​com

JSONComma

This is the official plugin adapting jsoncomma to Sublime Text 3.

jsoncomma is a simple utility which manages the commas in your JSON-like files. It adds needed ones, and removes the others.

Settings

JSONComma will run every time you save a json-like file. It tries to be smart about what is JSON like (more details in the should_be_enabled function). However, you can explicitly choose whether it should fix your file on save by changing the view setting like so:

{
    "jsoncomma_enabled": false
}

So, for example, if you want to disable running on save for all .json file, you can open a JSON file and search up in the command palette Preferences: Settings Syntax Specific and add the text above. This will explicitly disable running on save.

Similarly, you can explicitly enable it for any syntax you want. All it takes a view settings.

If JSONComma is disabled for the current view (as in it won't run on save), you can fix up some specific text by selecting it and searching up in the command palette JSONComma: Fix Selection.

Automatic download

JSONComma can automatically download the jsoncomma server for you. If you accept it, this package will keep it updated for you. For the curious, here is where the binary is download on your system:

Platform Location
Windows %APPDATA%\jsoncomma\jsoncomma.exe
Mac OS ~/Library/Application Support/jsoncomma/jsoncomma
Linux $XDG_DATA_HOME/.local/share/jsoncomma/jsoncomma

Note about naming

In general, you should refer to jsoncomma all in lower case. It's just that this plugin for Sublime Text has upper case letters to fit with the editor's style.