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