用Sublime Text3 编辑js文件时,发现无法运用Tab键进行自动补全,需要用ctrl+e,于是百度寻求解决方案,发现如下代码。
粘贴至 按键绑定-用户 里即可。然后,ctrl+shift+p 选择禁用emmet,启动emmet,完成配置生效。
[
{
"keys": ["tab"],
"command": "expand_abbreviation_by_tab",
// Extend Emmet to js & jsx
"context": [
{
"operand": "source.js",
"operator": "equal",
"match_all": true,
"key": "selector"
},
// run only if there's no selected text
{
"match_all": true,
"key": "selection_empty"
},
// don't work if completion popup is visible and you
// want to insert completion with Tab. If you want to
// expand Emmet with Tab even if popup is visible --
// remove this section
{
"operand": false,
"operator": "equal",
"match_all": true,
"key": "auto_complete_visible"
}
]
}
]
本文介绍如何在SublimeText3中配置Emmet插件,实现JS文件中使用Tab键进行自动补全功能。通过修改按键绑定设置,并启用及禁用相应功能,使Emmet在JS文件中更高效地工作。

被折叠的 条评论
为什么被折叠?



