A custom snippet is a template that allows you to easily enter repeated code patterns. This Snippet Generator by Pawel Grzybek makes it easy to create your own for VS Code, Sublime, & Atom.
For further actions, you may consider blocking this person and/or reporting abuse
Oldest comments (22)
My big three are:
console.log([Cursor Here])
Tip 3 is great. Is it for vim or vscode maybe?
I use it on VS Code. :)
I use a console.log() snippet all the time.
As an added bonus I put a matching variable/value cursor like this:
console.log("[Cursor Here]", [Cursor Here])
I like this idea for when I'm not using Turbo Console Log.
I have a few here (even if it requires an update !)
I can be happy with snippets just for function definition, ifs and console.log.
While using a pluginless vim these abbreviations are timesavers:
tsrsfc
: produces a functional component for React with TypeScript.ac-api-action/-delete/-post/-put
: produces a stubbed REST APIs for .net Core.:shrug
gets me ¯\(ツ)/¯I've got
/shrug
set up via Alfred so I get ¯_(ツ)_/¯ anywhere and everywhere. I also made it a keyboard shortcut on my phone. 😂I like using a line of dashes to separate logical chunks of code in my classes (related methods, public vs private methods, fields, constructors, etc.). I have
//-
expand on tab to a full line of dashes and place the cursor above it to quickly add a comment.Here's the "Live Template" used in the IntelliJ products:
I was thinking of writing some snippets but who has the time :P
I use Slick slider pretty frequently so I wrote a custom snippet for the settings 😆
gist.github.com/joelkrause/426ce6b...
My most used for PHP / Symfony development are:
ecd (echo dump die):
echo '<pre>';
\Doctrine\Common\Util\Debug::dump($END$);
exit(__FILE__ . ' on Line ' . __LINE__);
vdd (var dump die):
var_dump($END$);
exit(__FILE__ . ' on Line ' . __LINE__);
pdd (print dump die):
echo '<pre>';
print_r($END$);
exit(__FILE__ . ' on Line ' . __LINE__);
When i need to debug they are big timesavers!
I like the inclusion of line numbers. Might steal that.
Yeah I was doing that:
Useful for debugging.
pdb in python to import pdb library and set a break point