-
-
Save hzlzh/3128038 to your computer and use it in GitHub Desktop.
<snippet> | |
<!-- put this file in /packages/User/<Folder Name>/console_log.sublime-snippet then restart your Sublime Text 2 --> | |
<content><![CDATA[console.log($1);$0]]></content> | |
<tabTrigger>conl</tabTrigger> | |
<scope>text.html,source.js</scope> | |
<description>console.log()</description> | |
</snippet> | |
<snippet> | |
<!-- put this in another file /packages/User/<Folder Name>/console_dir.sublime-snippet then restart your Sublime Text 2 --> | |
<content><![CDATA[console.dir($1);$0]]></content> | |
<tabTrigger>cond</tabTrigger> | |
<scope>text.html,source.js</scope> | |
<description>console.dir()</description> | |
</snippet> |
Really useful! Thanks!
Hello everyone,
I am quite new in sublime, so, can someone tell if it is a program to see an output, like console.log("Hello!")?
But I still don't understand how does it work. I saved as instructed, then typed console.log("Hello!").sublime-conl and hit return
nothing happened, what did I do wrong?
this is an output from the
console.log("Hello!");
Could not open file:
[Finished in 0.1s with exit code 3]
[cmd: ['/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc', '']]
[dir: /Applications/Sublime Text.app/Contents/MacOS]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
@vlpak No, this is just a snippet (or a shortcut) to write faster the console.log()
command in JavaScript files or <scripts>
tags in HTML. Check the instructions posted by @SkullMasher.
Then you can type "conl" and press the "tab" key and sublime will complete the rest.
Thanks! Work perfectly!
Thank you
I'm using Sublime Build 3114 and the process mentioned by @SkullMasher still stands, apart from the path to add a new snippet.
Now it seems to be Tools > Developer > New Snippet