Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gerardroche/sublime-php-grammar

PHP macros for Sublime Text.
https://github.com/gerardroche/sublime-php-grammar

auto-complete formatting php php-completions sublime-text

Last synced: 9 days ago
JSON representation

PHP macros for Sublime Text.

Awesome Lists containing this project

README

        

# WHAT PHPGRAMMAR IS

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

[![Codecov Coverage Status](https://img.shields.io/codecov/c/github/gerardroche/sublime-php-grammar/master?style=flat-square&label=codecov)](https://codecov.io/gh/gerardroche/sublime-php-grammar/branch/master) [![Downloads](https://img.shields.io/packagecontrol/dt/PHPGrammar.svg?style=flat-square)](https://packagecontrol.io/packages/PHPGrammar)

Completions and snippets are provided separately by [PHP Completions Kit](https://packagecontrol.io/browse/authors/gerardroche) and [PHP Snippets](https://packagecontrol.io/browse/authors/gerardroche).

## INSTALLATION

### Package Control installation

The preferred method of installation is [Package Control](https://packagecontrol.io/browse/authors/gerardroche).

### 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
$y|) // foreach ($x => $y) {
// |
// }
```

```php
|
) // )
```

```php
|
) // )
```

#### On `[`

```
$arr = | // $arr = [|];
```

#### On `]`

```
$arr = [| // $arr = [|];
```

## CONTRIBUTING

See [CONTRIBUTING.md](CONTRIBUTING.md).

## LICENSE

Released under the [BSD 3-Clause License](LICENSE).