A Vim plugin for formatting saved JSON file.
Add this repository to your Vundle configuration:
Plugin "XadillaX/json-formatter.vim"
Make sure you have Node.js installed and then install module below:
$ npm install -g jjson
Add this repository to your Vim-Plugn configuration:
Plug "XadillaX/json-formatter.vim", { "do": "npm install -g jjson" }
Add this repository to your Dein configuration:
call dein#add("XadillaX/json-formatter.vim", { "build": "npm install -g jjson" })
The JSONFormatter
command will either format the JSON supplied or open the quickfix window and show any errors reported by the tools. Clicking or hitting <Enter>
on any of the lines reported in the quickfix window will take you directly to that location.
See https://github.com/XadillaX/json-formatter.vim/blob/c671c41/doc/json_formatter.txt#L78-L163
Issues and PRs are welcomed!