打開package control 或者直接快捷鍵command+shift+p

image.png
去到install package

image.png
搜索HTMLBeautify, 點擊自動安裝,因為本地已經(jīng)安裝了,所以沒有顯示

image.png
設(shè)置快捷鍵
1.查看default

image.png
打開之后長這個樣子

image.png
下面是官方對每個參數(shù)定義的解釋,可以自己更改

image.png
2.自定義快捷鍵
進(jìn)入key bindings

image.png
會打開兩個文件:default & user, 在user里改
粘上這一段,“keys”是你自己想設(shè)置的快捷鍵
{
"keys": ["ctrl+f"], // create your own key command combination here!
"command": "html_beautify", // command that executes html_beautify
"context": [{
// these options ensure that the command is executed in the right files/context
"key": "selector",
"operator": "equal",
"operand": "text.html,text.html.twig,text.twig,source.html,source.html.twig,source.twig"
}]
}
okay,結(jié)束,去試下吧