打开package control 或者直接快捷键command+shift+p

去到install package

搜索HTMLBeautify, 点击自动安装,因为本地已经安装了,所以没有显示

设置快捷键
1.查看default

打开之后长这个样子

下面是官方对每个参数定义的解释,可以自己更改

2.自定义快捷键
进入key bindings

会打开两个文件:default & user, 在user里改
粘上这一段,“keys”是你自己想设置的快捷键
{
"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,结束,去试下吧
网友评论