DEV Community

Discussion on: What are your snippets?

Collapse
 
dianawebdev profile image
Diana

PhpStorm does this quite nicely too, but I just started to use it, so only one from my side (syntax out of config):

// Type tryc and hit tab, also for switching through the parts
try {
   $DOSOMETHING$
}
catch ($EXCEPTIONCLASS$ $e) {
   $HANDLEIT$
}
Collapse
 
codevault profile image
Sergiu Mureşan

That looks good!

What I do is, whenever I code something that I know is very similar to a previous thing I make it a template. Surely, it takes more time to create one in the beginning but you regain that when when you use it a third and fourth time. The time efficiency can get ridiculous!