-
-
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> |
Thanks bro' :)
Nice! Thanks :)
+1. Thanks for this!
That's also a nice introduction to sublime text hacking. Thanks.
By the way to use this :
- Tools > New Snippet
- Paste the code. If you don't like 'conl' as trigger change it on line 4 tabTrigger.
- Hit save. You should be in the correct folder by default (Sublime Text 3/Packages/User)
- Name your snippet with whatever you want and put the .sublime-snippet extension at the end.
- Get back to your js file and do try your trigger word you specified on line 4.
- Profit !
Thank you...
Thx man ;)
Awesome! Really nice one!
Great! 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
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
Simple , fast and perfect :)