[Ubuntuの] 崇高にテキストスニペットを作成します。
「ツール」/「新しいスニペット」に移動します…
開いたファイルには次のように表示されます:
<スニペット>
<コンテンツ><![川を渡ってランプを運ぶ問題の後[
こんにちは, ${1:この} です ${2:スニペット}.
]]></コンテンツ>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<!-- <tabTrigger>こんにちは</tabTrigger> -->
<!-- Optional: Set a scope to limit where the スニペット will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
Lưu lại với tên filename.sublime-snippet
Bạn chú ý こんにちは, ${1:この} です ${2:スニペット} chính là đoạn code đầy đủ mà bạn ấn tab.
交換する <!– こんにちは –> hello に等しい。hello はショートカット キーワードです。. sau khi bạn viết hello và ấn tab thì sẽ hiện ra こんにちは, this is a snippet
Các giá trị trong $ 含めて ${1:この} です ${2:スニペット} là các giá trị khi ấn tab thì sẽ nhảy đến và bạn có thể thay thế chúng bằng giá trị của mình.
VD tạo 1 ファイル while.sublime-snippet. Khi ấn while và tab thì sẽ hiện ra:
<snippet>
<content><![CDATA[
while (${1:/* condition */})
{
${2:/*code*/}
}
]]></content>
<tabTrigger>while</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>



最近のコメント