打開package control 或者直接快捷鍵command+shift+p
image.png
去到install package
image.png
搜索HTMLBeautify, 點(diǎn)擊自動(dòng)安裝,因?yàn)楸镜匾呀?jīng)安裝了,所以沒有顯示
image.png
設(shè)置快捷鍵
1.查看default
image.png
打開之后長這個(gè)樣子
image.png
下面是官方對(duì)每個(gè)參數(shù)定義的解釋,可以自己更改
image.png
2.自定義快捷鍵
進(jìn)入key bindings
image.png
會(huì)打開兩個(gè)文件: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é)束,去試下吧