sublime text : The emmet plugin doesn't work when tab key was pressed

Today, I switched my sublime text to version 3. And then I found that  the emmet plugin doesn‘t work when I press the tab key,  but it works by press "ctrl + e". So I went to github to see the readme file of the emmet-sublime plugin, and finally I got a way to resolve this problem.

The following solution would be helpful for you:

Original Text

Go to Preferences > Key Bindings — User and insert the following JSON snippet with properly configured scope selector instead of SCOPE_SELECTOR token:

{
  "keys": ["tab"],
  "command": "expand_abbreviation_by_tab", 

  // put comma-separated syntax selectors for which
  // you want to expandEmmet abbreviations into "operand" key
  // instead of SCOPE_SELECTOR.
  // Examples: source.js, text.html - source
  "context": [
    {
      "operand": "SCOPE_SELECTOR",
      "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 there are active tabstops
    {
      "operator": "equal",
      "operand": false,
      "match_all": true,
      "key": "has_next_field"
    }, 

    // 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"
    },
    {
      "match_all": true,
      "key": "is_abbreviation"
    }
  ]
}

How to get current syntax scope name?

Just press ??P (OSX) or Ctrl+Alt+Shift+P, it will be displayed on screen.

sublime text : The emmet plugin doesn't work when tab key was pressed

时间: 2024-12-28 16:24:18

sublime text : The emmet plugin doesn't work when tab key was pressed的相关文章

Sublime Text 3 Emmet插件安装

一.手动安装: 1. Emmet (ex-Zen Coding) for Sublime Text http://emmet.io (1) 下载:https://github.com/sergeche/emmet-sublime#readme (2) 打开Sublime Text 3,选择菜单:Preference-->Browse Package... 浏览插件: (3) 把emmet-sublime-master复制到此目录,重启 Sublime text 3; (4) 重启之后还会看到左下

Sublime Text Code Visualization Plugin

Using this plugin one can navigate the code easily. Source code and detailed user manual in https://github.com/league1991/CodeAtlasSublime . Find Callers/Callees Press Alt+C/V to find callers or callees Press Alt+Up/Down/Left/Right in Sublime Text to

sublime text插件emmet自定义模板

首先要找到 snippets.json这个文件,路径是preferences>browse packages,看看有没有emmet目录. 如果没有,可能是您没有安装emmet插件,或者您安装了但目录里没有这个文件夹,这时候您需要手动安装,下载地址 https://github.com/sergeche/emmet-sublime,再把下载的压缩包解压到 packages文件夹下,即可 如果有请打开 snippets.json这个文件,模板就是在这个文件里定义的,您可以自定义模板了.我加了一个vu

sublime text 插件emmet快捷命令

原文链接:http://www.17yaobai.com/?p=255 语法: 后代:> 缩写:nav>ul>li <nav> <ul> <li></li> </ul> </nav> 兄弟:+ 缩写:div+p+bq <div></div> <p></p> <blockquote></blockquote> 上级:^ 缩写:div+div>

sublime Text emmet插件使用手册

转自:http://www.w3cplus.com/tools/emmet-cheat-sheet.html 介绍 Emmet (前身为 Zen Coding) 是一个能大幅度提高前端开发效率的一个工具: 基本上,大多数的文本编辑器都会允许你存储和重用一些代码块,我们称之为"片段".虽然片段能很好地推动你得生产力,但大多数的实现都有这样一个缺点:你必须先定义你得代码片段,并且不能再运行时进行拓展. Emmet把片段这个概念提高到了一个新的层次:你可以设置CSS形式的能够动态被解析的表达

Sublime Text 3下C/C++开发环境搭建

Sublime Text 3下C/C++开发环境搭建 之前在Linux Mint 17一周使用体验中简单介绍过Sublime Text. 1.Sublime Text 3安装 Ubuntu.Linux Mint的软件管理器中已经能够找到Sublime Text 3,直接安装即可.或者去官网下载.deb或tarball安装包,手动安装. 2.Package Control管理器 ST最吸引我的第一点就是这个非常棒的扩展管理器!安装方法也很简单,在ST中按Ctrl+`进入ST的控制台,然后去官网上将

Getting started with TypeScript and Sublime Text -- 摘自https://cmatskas.com/getting-started-with-typescript-and-sublime-text/

Getting started with TypeScript and Sublime Text 04 March 2015  18 Comments  Posted in JavaScript, Open Source, TypeScript, Sublime Text UPDATED: This post has been rewritten around the official TypeScript plugin Typescript is awesome, period. TypeSc

Sublime Text常用快捷键及插件配置

最常用快捷键 Control+`控制台     Shift+cmd+P命令面板     cmd+F(Control+F)查找    option+cmd+F查找替换 cmd+/(Control+/)给选中行添加或去掉注释 cmd+Z(Control+Z)撤销      cmd+Y(Control+Y)恢复撤销 插件的安装配置 启用Package Control的方法: 菜单View——Show Console(该步骤或者用Control+`实现)打开控制台界面,贴入相关系统下的pyhon代码并回

Formatting XML and JSON using Sublime Text

Formatting XML and JSON using Sublime Text Last week I was trying to make some changes to my WCF service and had to deal with some XML data. The problem was the XML was not nicely formatted and I had to highlight couple of missing pieces of informati