ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

PHPGrammar

by gerardroche ST3

PHP macros for Sublime Text.

Details

Installs

  • Total 56K
  • Win 41K
  • Mac 6K
  • Linux 9K
Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11
Windows 2 2 5 7 1 4 8 3 4 2 5 3 2 2 3 3 4 5 3 4 3 2 5 2 0 0 3 4 3 5 2 2 3 7 6 2 3 1 1 3 1 3 2 7 1 4
Mac 1 0 1 2 0 0 0 2 1 0 2 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 2
Linux 0 1 1 0 0 0 0 2 0 2 0 1 0 0 0 2 0 1 1 1 0 2 2 2 2 1 0 0 1 1 2 0 2 1 0 0 3 1 1 1 0 3 2 1 1 0

Readme

Source
raw.​githubusercontent.​com

WHAT PHPGRAMMAR IS

An improved PHP syntax, good indentation rules, smart macros, and more.

Travis CI Build Status AppVeyor Build status Coveralls Coverage Status Codecov Coverage Status Minimum Sublime Version Latest Version GitHub stars Downloads

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.