1. 点击Reference后 ,点击 Browse Packages
2. 在打开的窗口,打开命令行工具,当前为packages目录
3. 输入命令git clone https://github.com/dzhibas/SublimePrettyJson.git, 然后将SublimePrettyJson下的Pretty JSON.sublime-settings 文件放到 packages目录下的User下
如下:
git clone https://github.com/dzhibas/SublimePrettyJson.git
cp SublimePrettyJson/Pretty\ JSON.sublime-settings User/
4. 打开SublimePrettyJson下Default (Linux).sublime-keymap, 将注释掉的内容全部打开即可,如下:
[
{
"keys": [
"ctrl+alt+j"
],
"command": "pretty_json"
},
{
"keys": ["ctrl+r"],
"command": "pretty_json_goto_symbol",
"context": [
{ "key": "selector", "operator": "equal", "operand": "source.json" }
]
}
]
5. 重启sublime, 文本中字符串接口 Ctrl + alt + j 进行json格式化
|