The snippet is inside the archived JavaScript package, which is located in the installation directory, and then Packages/JavaScript.sublime-package
. Inside that package, the file's name is Snippets/Get-Elements.sublime-snippet
and it has the following contents:
<snippet>
<content><![CDATA[getElement${1/(T)|.*/(?1:s)/}By${1:T}${1/(T)|(I)|.*/(?1:agName)(?2:d)/}('$2')]]></content>
<tabTrigger>get</tabTrigger>
<scope>source.js</scope>
<description>Get Elements</description>
</snippet>
Basically, it works with conditional replace format strings. You can find the documentation for those in the boost regex docs, however I suggest to just have two different snippets in this situation with the triggers gett
and geti
respectively, since those still require the same number of key strokes but are way easier to create and maintain.
You can open archived resource files like this easily with the PackageResourceViewer package.
Details on what archived packages are: http://docs.sublimetext.info/en/latest/extensibility/packages.html