Sublime Text – JSON formatter shortcut

I have come across this issue too. I tried to figure it out by install jsFormat as follows:

  1. Open Package Control panel command+shift+p (mac), install package.

  2. Install jsFormat.

  3. Edit the shortcut for the jsformat:
    sublime text preferences, package settings, jsFormat

  4. Choose Key-Binding user, then edit

    [
      {
        "keys": [
          "command+l"
        ],
        "command": "reindent"
      },
      {
        "keys": [
          "ctrl+shift+s"
        ],
        "command": "auto_save"
      }, 
      {
        "keys": [
          "ctrl+alt+f"
        ],
        "command": "js_format"
      }
    ]
    
  5. So next time when you try to format json code, just use ctrl+option+f for mac. Not mac, just use ctrl+alt+f

That’s all.

Hope this will help you.

Cheers

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)