How to auto format JSON on save in Vim -
to honest go
has spoiled me. go
got used having strict formatting standard beingness enforced editor (vim) , accepted , followed else on team , around world.
i wanted format json files on save same way.
question: how auto format/indent/lint json files on save in vim.
in 1 command, seek this:
execute '%!python -m json.tool' | w
you add together own key binding create simpler keystroke. of course, work, need have python installed on machine.
json vim format lint
No comments:
Post a Comment