LoginSignup
67
37

More than 5 years have passed since last update.

Vim上でjqでjsonを整形

Last updated at Posted at 2014-12-23

vim用のjqプラグインがいろいろ出てますが、vimの標準コマンドだけでも割と簡単でした。

参考:Pretty-print JSON in vim

  1. jqをインストールします。

    brew install jq
    
  2. vimでjsonを開くかコピペします。

  3. vim上で以下を実行します。

    :%!jq '.'
    

以上

67
37
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
67
37