https://github.com/rtuin/phpstorm-livetemplates-twig
PHPStorm live templates for Twig
https://github.com/rtuin/phpstorm-livetemplates-twig
Last synced: 5 months ago
JSON representation
PHPStorm live templates for Twig
- Host: GitHub
- URL: https://github.com/rtuin/phpstorm-livetemplates-twig
- Owner: rtuin
- License: mit
- Created: 2015-02-25T10:34:52.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-01T13:04:12.000Z (over 11 years ago)
- Last Synced: 2025-10-05T21:50:13.734Z (9 months ago)
- Size: 121 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Live templates for Twig to use in PhpStorm
## Installation
### Step 1
To install the live template file issue the following command:
```bash
curl -o ~/Library/Preferences/WebIde80/templates/Twig.xml \
https://raw.githubusercontent.com/rtuin/phpstorm-livetemplates-twig/master/Twig.xml
```
Where `WebIde80` stands for PhpStorm 8. More info can be found in the [JetBrains PhpStorm documentation](https://www.jetbrains.com/phpstorm/help/live-templates.html#d766914e117)
### Step 2
Restart PhpStorm
## Templates and usage
### Translation template
**Alias:** `trn`
**Produces:** `{{ '' | trans }}`
### Block creation
**Alias:** `block`
**Produces:**
```
{% block $START$ %}
$END$
{% endblock %}
```
## Contributing
Contributions are more than welcome. Issue a pull-request for your contributions.
## License
Please refer to the LICENSE.md file.