zoukankan      html  css  js  c++  java
  • 让 .vue 支持 atom

    Tab key

    Currently, Emmet expands abbreviations by Tab key only for HTML, CSS, Sass/SCSS and LESS syntaxes. Tab handler scope is limited because it overrides default snippets.

    If you want to make Emmet expand abbreviations with Tab key for other syntaxes, you can do the following:

    1. Use Open Your Keymap menu item to open your custom keymap.cson file.
    2. Add the following section into it:
    'atom-text-editor[data-grammar="YOUR GRAMMAR HERE"]:not([mini])':
        'tab': 'emmet:expand-abbreviation-with-tab'

    Replace YOUR GRAMMAR HERE with actual grammar attribute value. The easiest way to get grammar name of currently opened editor is to open DevTools and find corresponding <atom-text-editor> element: it will contain data-grammar attribute with value you need. For example, for HTML syntax it’s a text html basic.

    You can add as many sections as you like for different syntaxes. Note that default snippets will no longer work, but you can add your own snippets in Emmet.

    // github 上的官方文档说,修改  keymap.cson 即可。此文件在window下的目录是 atomapp-xxxxx esourcesappdot-atomkeymap.cson ,完后,在最后一行添加即可。

    不过我在使用中也不是很好,比如说   div.test 就不能生成带class的div,只能是纯标签。所以,在非 html,我一般用 ctrl +e

    'atom-text-editor[data-grammar="vue"]:not([mini])':
        'tab': 'emmet:expand-abbreviation-with-tab'
    

      

  • 相关阅读:
    uva 11729 Commando War
    剑指offer 38 数字在排序数组中出现的次数
    剑指offer 35 第一个只出现一次的字符
    剑指offer 33 把数组排成最小的数
    剑指offer17 合并两个排序的链表
    跳台阶
    app上线
    剑指offer54 表示数值的字符串
    剑指offer49 把字符串转换成整数
    段错误
  • 原文地址:https://www.cnblogs.com/Tachi/p/6527977.html
Copyright © 2011-2022 走看看