2016-05-13 11 views
1

私は崇高なテキストでerbタグの次のショートカットを使用します。ショートカット3

{ "keys": ["option+."], "command": "erb", "context": 
    [ 
    { "key": "selector", "operator": "equal", "operand": "text.html.ruby, text.haml, source.yaml, source.css, source.scss, source.js, source.coffee" } 
    ] 
} 

を誰かが押しているので、空のハンドルバー(エンバーアプリ)を表示するためのショートカットを作成し、私を助けてくださいoption + /私は{{ }}を産生することができます(真ん中に作られたスペースはニンジンが始まる場所で、テキストを入力する場所になります)。

私は既にhttps://github.com/daaain/Handlebarsを使用していますが、このパッケージは空のハンドルバーを生成しません。

ありがとうございました!

答えて

1

あなたはinsert_snippetコマンドを使用して行うことができます。

{ 
    "keys": ["option+/"], 
    "command": "insert_snippet", 
    "args": { "contents": "{{ ${1} }}" }, 
    "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.ruby, text.haml, source.yaml, source.css, source.scss, source.js, source.coffee" } ] 
}, 

参考:それがあった

Sublime Text > Unofficial Docs > Snippets

+1

おかげで、!私はショートカットキーを 'option + /'に優先的に変更しました。 –

+0

@JoshZandman:私の悪い点は、LOLをテストした後に 'option'を追加するのを忘れてしまったことです。ちょうど@答えを更新しました。 – Enteleform

関連する問題