I do not know how to do it I want to write first of all code, then press TAB and this code will be wrapped in brackets with console.log command. Help please)
Here is my approach - Sublime Text 3 (3126) @ Ubuntu 16.04.
Open Sublime Text editor and go to:
Tools -> Developer -> New Snippet...
Then paste the following code:
<snippet>
<content><![CDATA[console.log(${1:}$SELECTION);${0}]]></content>
<tabTrigger>console.log</tabTrigger>
<scope>text.plain, source.js</scope>
</snippet>
(<scope></scope>
is optional, and feel free to put whatever you want in <tabTrigger></tabTrigger>
section)
Press CTRL + S, choose name (e.g. console.log.sublime-snippet
) and save it.
Open any JS file, start typing console
and the snippet will appear.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With