Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fprochazka/phpstorm-livetemplates
My set of Live Templates for PhpStorm
https://github.com/fprochazka/phpstorm-livetemplates
Last synced: 3 days ago
JSON representation
My set of Live Templates for PhpStorm
- Host: GitHub
- URL: https://github.com/fprochazka/phpstorm-livetemplates
- Owner: fprochazka
- Created: 2012-08-15T18:40:40.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2017-06-08T10:55:05.000Z (over 7 years ago)
- Last Synced: 2024-10-17T22:59:22.776Z (22 days ago)
- Homepage: http://www.jetbrains.com/phpstorm/webhelp/live-templates.html
- Size: 188 KB
- Stars: 72
- Watchers: 12
- Forks: 16
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# PhpStorm Live Templates
## Installation
First, find your configuration folder.
Windows: \.WebIde\config
Linux: ~\.WebIde\config
MacOS: ~/Library/Preferences/WebIdeOn my linux, it would be
~/.WebIde70/config
so you have to adjust commands to your platform. There is atemplates/
directory. It contains XML files with Live Templates.Create a git repository in the `templates/` dir and pull the templates
$ cd ~/.WebIde50/config/templates/
$ git init
$ git remote add origin git://github.com/fprochazka/phpstorm-livetemplates.git
$ git pull origin masterIf this wouldn't work, you should just backup your templates, clone the repo and merge them manually.
## Default Shortcuts
* Insert Live Template -
CTRL+J
* Surround with Live Template -CTRL+ALT+J
## PHP Templates
### pri, pro, pub
Private, protected and public method
### con
Constructor, that calls parent
### thr
Throw expression
### try
Surround code with
try {}
expression### ob
Surround code with output buffering
### fc
Surround statement with function call
### sta
Static function
The
$VISIBILITY$
variable within live template usesenum()
helper, so you can choose visibility easily![enum](https://dl.dropbox.com/u/32120652/phpstorm-livetemplate-visibilityselect.png)
## Nette Templates
### com
Nette component factory
### form
Component factory with basic Form definition and signal handler
### ren, act
Render and action method
### inj
Inject method for Nette presenter
### sup
Startup method
### sig
Signal method of Nette PresenterComponent
### att
Attached event on Nette component.
### obj
Code for including Nette\ObjectMixin into current class
## PHPUnit Templates
### test
Default empty test function for PhpUnit (todo: more)
## jQuery Templates
### fn
Common pattern for creating jQuery modules