超ド級のポイントを突くSublime3 スニペットの作成方法
Sublimetext3のスニペットの作り方
既に解説されたサイトはたくさんあります(汗)
ここにある素晴らしい記事を読めばスニペットがいかに使えるかは、わかります。
スニペットを作成するフローに着目したい
<snippet> <content><![CDATA[ Hello, ${1:this} is a ${2:snippet}. ]]></content> <!-- Optional: Set a tabTrigger to define how to trigger the snippet --> <!-- <tabTrigger>hello</tabTrigger> --> <!-- Optional: Set a scope to limit where the snippet will trigger --> <!-- <scope>source.python</scope> --> </snippet>
こういうものが出てくる。
簡単なことで、コメントアウトが外れていないからだw
みな、常識のようにしているけれど、<!-- -->
はコメントアウトだ
<snippet> <content><![CDATA[ print("hello") ]]></content> <!-- Optional: Set a tabTrigger to define how to trigger the snippet --> <tabTrigger>hello</tabTrigger> <!-- Optional: Set a scope to limit where the snippet will trigger --> <!-- <scope>source.python</scope> --> </snippet>
こうしなければTab補完がきかない