【开发工具】Sublime Text3

本文介绍如何在SublimeText3中配置Emmet插件,实现JS文件中使用Tab键进行自动补全功能。通过修改按键绑定设置,并启用及禁用相应功能,使Emmet在JS文件中更高效地工作。

用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"
          }
        ]
    }
]


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值