PHPGrammar
PHP macros for Sublime Text.
Details
Installs
- Total 57K
- Win 42K
- Mac 6K
- Linux 9K
Jun 9 | Jun 8 | Jun 7 | Jun 6 | Jun 5 | Jun 4 | Jun 3 | Jun 2 | Jun 1 | May 31 | May 30 | May 29 | May 28 | May 27 | May 26 | May 25 | May 24 | May 23 | May 22 | May 21 | May 20 | May 19 | May 18 | May 17 | May 16 | May 15 | May 14 | May 13 | May 12 | May 11 | May 10 | May 9 | May 8 | May 7 | May 6 | May 5 | May 4 | May 3 | May 2 | May 1 | Apr 30 | Apr 29 | Apr 28 | Apr 27 | Apr 26 | Apr 25 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 1 | 0 | 4 | 5 | 2 | 1 | 1 | 0 | 1 | 2 | 1 | 0 | 1 | 1 | 1 | 2 | 1 | 1 | 2 | 0 | 2 | 0 | 0 | 2 | 1 | 2 | 1 | 0 | 1 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 1 | 2 | 2 | 0 | 1 | 0 | 2 | 1 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 2 | 2 | 1 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 2 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
WHAT PHPGRAMMAR IS
An improved PHP syntax, good indentation rules, smart macros, and more.
Completions and snippets are provided separately by PHP Completions Kit and PHP Snippets.
INSTALLATION
Package Control installation
The preferred method of installation is Package Control.
Manual installation
Close Sublime Text, then download or clone this repository to a directory named PHPGrammar in the Sublime Text Packages directory for your platform:
OS | Command
– | —–
Linux | git clone https://github.com/gerardroche/sublime-php-grammar.git ~/.config/sublime-text-3/Packages/PHPGrammar
OSX | git clone https://github.com/gerardroche/sublime-php-grammar.git ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/PHPGrammar
Windows | git clone https://github.com/gerardroche/sublime-php-grammar.git %APPDATA%\Sublime/ Text/ 3/Packages/PHPGrammar
USAGE
Smart macros
To insert any literal character add Shift
e.g. in a case where Enter
runs a macro, to insert a newline on Enter
(instead of running the macro) press Shift+Enter
.
On Ctrl+Enter
<?php
array( // array(
'str|' // 'str',
) // |
// )
<?php
'str|ing' // 'string';
// |
<?php
function_call(|) // function_call();
// |
<?php
if ($condition|) // if ($condition) {
// |
// }
<?php
foreach ($x => $y|) // foreach ($x => $y) {
// |
// }
<?php
while ($condition|) // while ($condition) {
// |
// }
<?php
for ($i = 0; $i < ; $i++|) // for ($i = 0; $i < ; $i++) {
// |
// }
<?php
switch ($condition|) // switch ($condition) {
// |
// }
<?php
function x(|) // function x()
// {
// |
// }
<?php
class x // class x
{ // {
public function y(|) // public function y()
} // {
// |
// }
// }
On Ctrl+;
'str|ing' // 'string';|
<?php
function_call(|) // function_call();|
On Enter
array(|) // array(
// |
// )
<?php
function_call(|) // function_call(
// |
// )
<?php
new class_name(|) // new class_name(
// |
// )
On Tab
$arr = array( // $arr = array(
'str|' // 'str' => |
) // )
<?php
$arr = array( // $arr = array(
'str'| // 'str' => |
) // )
On [
$arr = | // $arr = [|];
On ]
$arr = [| // $arr = [|];
CONTRIBUTING
See CONTRIBUTING.md.
LICENSE
Released under the BSD 3-Clause License.