ASBFAT:Sublime Text 3

841 阅读2分钟

插件配置

PackageController (包管理器 基础中的基础)

安装方法:

  • 使用Ctrl+`快捷键或者通过View->Show Console菜单打开命令行,粘贴如下代码:
import urllib.request,os,hashlib; h = 'df21e130d211cfc94d9b0905775a7c0f' + '1e3d39e33b79698005270310898eea76'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)

babel-sublime,语法高亮

安装方法:

  • 按ctrl + shift +p打开包管理器界面,输入install 然后选中install package回车,出现输入框
  • 输入babel,回车
  • 配置:View -> Synatx -> OpenAllWithCurrent... -> Babel -> JavaScript(babel)

Emmet

github地址:github.com/sergeche/em…

  • 通过ctrl + shift +p打开包管理器安装
  • 输入 Emmet
  • 可以通过输入 ! 后按快捷键 Ctrl + E (或者 Tab ,需要修改配置快速生成HTML.
  • 不好用的话可以这样配置:
[{
    "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": "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 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"
        }, {
            "translate_tabs_to_spaces": true
        }
    ]
} ,{
    "keys": [
        "super+e"
    ],
    "args": {
        "action": "expand_abbreviation"
    },
    "command": "run_emmet_action",
    "context": [{
        "key": "emmet_action_enabled.expand_abbreviation"
    }]
}, {
    "keys": ["tab"],
    "command": "expand_abbreviation_by_tab",
    "context": [{
        "operand": "source.js",
        "operator": "equal",
        "match_all": true,
        "key": "selector"
    }, {
        "key": "preceding_text",
        "operator": "regex_contains",
        "operand": "",
        "match_all": true
    }, {
        "key": "selection_empty",
        "operator": "equal",
        "operand": true,
        "match_all": true
    }]
}]

jsformat 主要是用来格式化显示

安装方法

  • 呼起 package controller ,输入 jsformat
  • 下载后 Preference -> Package Setting -> Jsformat -> Setting-User,打开新页面.
  • 输入:
{
    "e4x": true,
    // jsformat options
    "format_on_save": false, // 注:此值如果改为true则每次保存的时候自动格式化
}

ReactJS

包括:

  • ReactJS
  • React Tempates
  • React Coffee Snippets
  • React DevelopMent Snippets
  • React ES6 Snipptes
  • ReactJS Snippets
  • React and React Router Snipptes
  • reactjs+react es6 + react template 最精简版,保证 rcc 可以直接创建类