A collection of miscellaneous snippets for coding in PHP using Sublime Text 2
Latest commit 94b6ec1 Oct 12, 2012 @stuartherbert Merge pull request #2 from Stubbs/master
Fixes for the getset snippet.
Permalink
Failed to load latest commit information.
LICENSE.md
README.md
license-mit.sublime-snippet
license-newbsd.sublime-snippet
php-getset.sublime-snippet Fixed PSR-01 compliance Oct 12, 2012
php-mit.sublime-snippet
php-newbsd.sublime-snippet Initial commit Feb 3, 2012
php-section-comment.sublime-snippet

README.md

Additional PHP Snippets For Sublime Text 2

Sublime Text 2 already ships with a lot of snippets for writing PHP code. This is a collection of additional snippets contributed by the PHP community.

Installation

Use Sublime Text 2's Package Control (Preferences -> Package Control -> Install Package -> Additional PHP Snippets) to install this plugin.

Snippets

We add the following snippets to speed up writing PHP code.

To use any of the snippets, simply type the name of the snippet, then press the key. Sublime Text 2 will insert the snippet, and you can then use the key to move through any placeholders that you need to replace.

For LICENSE.md-type files:

  • license-mit: insert the MIT license
  • license-newbsd: insert the new BSD license

__ For PHP files:__

  • php-getset: create getter/setter methods quickly and easily (based on a snippet originally published by @akrabat)
  • php-mit: insert the MIT license as a PHP docblock
  • php-newbsd: insert the new BSD license as a PHP docblock
  • php-section-comment: insert a prominent comment to help break up the sections of your class

Contributions Welcome

Requests for features, and pull requests with patches, are most welcome :)