How to fix JSON indentation in vim?

前端 未结 8 1333
粉色の甜心
粉色の甜心 2020-12-29 03:55

In vim, the default indentation for JSON is:

{
    \"employees\": [
    { \"firstName\":\"John\" , \"lastName\":\"Doe\" }, 
    { \"firstName\":\"Anna\" , \"         


        
8条回答
  •  萌比男神i
    2020-12-29 04:28

    Easier way is to just external command as a filter for a selection. e.g.

    1. Make a selection
    2. Type :!python -m json.tool

提交回复
热议问题