0
点赞
收藏
分享

微信扫一扫

vim 格式化 json 字符串

小典典Rikako 2022-10-28 阅读 132


" vimrc
" json

let mapleader = "\<space>"
map <Leader>jf :%!python -m json.tool<CR>
command! JM :execute '%!python -m json.tool' | :execute '%!python -c "import re,sys;sys.stdout.write(re.sub(r\"\\\u[0-9a-f]{4}\", lambda m:m.group().decode(\"unicode_escape\").encode(\"utf-8\"), sys.stdin.read()))"'

 

举报

相关推荐

0 条评论