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
- Host: GitHub
- URL: https://github.com/gridonic/idea-live-templates
- Owner: gridonic
- License: mit
- Created: 2016-09-22T06:04:38.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-22T07:51:02.000Z (over 9 years ago)
- Last Synced: 2025-03-18T11:49:01.124Z (about 1 year ago)
- Language: Shell
- Size: 12.7 KB
- Stars: 1
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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