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 38K
  • Win 22K
  • Mac 11K
  • Linux 5K
Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5
Windows 5 3 2 0 10 2 1 5 5 8 7 2 5 1 2 2 2 5 2 2 3 3 4 4 4 6 1 0 7 10 7 6 7 4 1 9 3 7 10 2 2 2 4 10 5 8
Mac 4 4 1 2 4 1 0 3 1 5 5 2 2 0 2 3 1 8 2 0 2 4 5 6 3 4 1 2 6 9 4 3 5 0 1 0 5 4 3 1 2 0 5 3 2 8
Linux 0 3 0 2 0 1 0 0 2 0 2 1 0 1 1 0 2 1 2 1 1 0 3 4 1 0 0 1 2 0 3 1 2 1 0 1 0 1 0 1 4 0 0 2 1 2

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.