An open API service indexing awesome lists of open source software.

https://github.com/gridonic/idea-live-templates

A collection of Live Templates for PhpStorm
https://github.com/gridonic/idea-live-templates

Last synced: 11 months ago
JSON representation

A collection of Live Templates for PhpStorm

Awesome Lists containing this project

README

          

# IDEA Live Templates

A collection of useful live templates that you can use within your PhpStorm or IntelliJ IDEA installation.

The structure of this repository as well as the handy script to list all templates has been heavily inspired
by https://github.com/keyboardsurfer/idea-live-templates. Kudos go to the repository maintainer.

## Installation

- Find the [live templates location](https://www.jetbrains.com/help/idea/2016.2/live-templates.html) for your IntelliJ IDE version
- `cd` into that location, run `git clone https://github.com/gridonic/idea-live-templates.git gridonic`
- Copy all `.xml` files from the cloned repository into the `templates` folder `cp gridonic/*.xml .`
- Restart your IDE

## Update

- `cd` into your [live templates location](https://www.jetbrains.com/help/idea/2016.2/live-templates.html)
- Run `cd gridonic; git pull; cp *.xml ../; cd ..`
- Restart your IDE

## Included live templates

The list of included live templates is generated by `./listCurrentTemplates`

### GridonicCSS.xml
- __`///`__: "CSS sub-section comment block"
- __`//`__: "CSS single line comment"
- __`//master`__: "CSS master style sheet comment block"
- __`//method`__: "sassdoc method comment block"

### GridonicJS.xml
- __`log`__: "`console.log` statement in js"

### GridonicPHP.xml
- __`dprintr`__: "Debug `print_r` statement"

### GridonicTwig.xml
- __`trans`__: "Twig `trans` shortcut"

## Contribution to this collection

If you want to supply a template that is useful, follow this guide:

1. Fork the project
2. Add your own live templates
3. Run `./listCurrentTemplates.sh` and insert the relevant output in the README.md
4. Send a pull request
5. Wait
6. Profit