Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Knp University:
Our favorite PhpStorm Live Templates: Share yours
Aug 21, 2015 @ 15:49:39

The Knp University site has a posted an article where they've shared their favorite PHPStorm Live templates, a set of handy shortcuts that can make for less typing on your part and, as a result, less development time spent on common keystrokes.

Most editors have a feature like this, and if you’re not leveraging them, you’re slowing yourself down. Seriously: taking a few minutes to get into these now could add up to a lot of hours saved in the future. The vim users at KnpLabs love this kind of stuff, and have published their own snippets (docteurklein, PedroTroller, Einenlum).

In our tutorial about live templates, we turn formhandle into a snippet that types about 10 lines of form-handling boilerplate code from 10 characters of text. So I started wondering: what are some other awesome live templates we should all be using?

To this end, they've created a repository to store some of these helpful shortcuts. Their list so far includes shortcuts for a 404 if statement, several Twig tags, several for use in a controller context and YAML formatting. The repository includes instructions on how to install the shortcuts and how to include only the ones you want.

tagged: phpstorm live template share repository starter snippet shortcut

Link: http://knpuniversity.com/blog/phpstorm-live-templates


Trending Topics: