目录
在Tools中修改Text Editor
使用Pretty JSON插件
Ctrl+Shift+P打开搜索面板,然后输入PC,安装Package Control:Install Package
安装成功后再次快捷键Ctrl+Shift+P打开搜索面板,然后输入Pretty Json,选择JSON格式化安装
Pretty JSON:Format JSON-->格式化
Pretty JSON:Minify JSON-->压缩数据
Pretty JSON:Validate-->验证JSON的格式是否正确
Pretty JSON:Format and Sort JSON-->格式化JSON数据并排序
Pretty JSON:json2xml-->将JSON数据转成xml
安装成功后可以对插件进行快捷键设置
设置-->插件设置-->Pretty JSON-->setting
- [
- {
- "keys": [
- "ctrl+alt+j"
- ],
- "command": "pretty_json"
- },
- {
- "keys": [
- "ctrl+alt+m"
- ],
- "command": "un_pretty_json"
- },
- {
- "keys": ["ctrl+alt+shift+j"],
- "command": "jq_pretty_json"
- },
- {
- "keys": ["ctrl+r"],
- "command": "pretty_json_goto_symbol",
- "context": [
- { "key": "selector", "operator": "equal", "operand": "source.json" }
- ]
- }
-
- ]