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

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.