Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/gerardroche/sublime-php-grammar
- Owner: gerardroche
- License: bsd-3-clause
- Created: 2014-11-11T15:39:59.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-05-05T06:37:24.000Z (6 months ago)
- Last Synced: 2024-10-21T06:58:58.677Z (15 days ago)
- Topics: auto-complete, formatting, php, php-completions, sublime-text
- Language: PHP
- Homepage: https://www.gerardroche.com
- Size: 669 KB
- Stars: 31
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
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).