Last Updated: February 25, 2016
·
2.419K
· vraa

[Sublime] Type echo, press tab, get console.log

If you are using Sublime text editor for your JavaScript development, you might find this snippet helpful. In Sublime, create a new snippet and enter the following code in there.

<snippet>
<content><![CDATA[
console.log(
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>echo</tabTrigger> -->
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
</snippet>

Save the file as echo.sublime-snippet. Restart Sublime.

From now on wards, you can simply type echo and press tab to get it expanded to console.log(.

4 Responses
Add your response

I prefer this one :

<snippet>
    <content><![CDATA[console.log(${1});]]></content>
    <tabTrigger>cl</tabTrigger>
    <description>console.log();</description>
</snippet>
over 1 year ago ·

I prefer this one: :-P

<snippet>
    <content><![CDATA[console.log(${1});]]></content>
    <tabTrigger>cl</tabTrigger>
    <description>console.log();</description>
    <scope>source.js</scope>
</snippet>
over 1 year ago ·

I can't wait to try this!

over 1 year ago ·