I have following two snippets defined (for shell script and perl):
elif_sh.sublime-snippet:
<snippet>
<content><![CDATA[
if [ ]; then
elif [ ]; then
else
fi
]]></content>
<tabTrigger>elif_sh</tabTrigger>
</snippet>
elif_pl.sublime-snippet:
<snippet>
<content><![CDATA[
if () {
;
}
elsif () {
;
}
else {
;
}
]]></content>
<tabTrigger>elif_pl</tabTrigger>
</snippet>
Both are working fine (I either type elif_sh or elif_pl and hit the tab) but I’m curious if is possible to type just elif hit tab and appropriate snippet will be used, depending on file type (or set syntax) being edited. Thanks