https://github.com/gh640/sublimephparrayconverter
🐘 A Sublime Text 3 / 4 package which converts PHP array syntax.
https://github.com/gh640/sublimephparrayconverter
php sublime-package sublime-text sublime-text-3 sublime-text-4
Last synced: about 1 year ago
JSON representation
🐘 A Sublime Text 3 / 4 package which converts PHP array syntax.
- Host: GitHub
- URL: https://github.com/gh640/sublimephparrayconverter
- Owner: gh640
- License: mit
- Created: 2017-06-07T13:13:55.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-06-13T03:08:17.000Z (about 5 years ago)
- Last Synced: 2025-03-25T15:49:01.982Z (over 1 year ago)
- Topics: php, sublime-package, sublime-text, sublime-text-3, sublime-text-4
- Language: Python
- Homepage: https://packagecontrol.io/packages/PhpArrayConverter
- Size: 262 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SublimePhpArrayConverter
A Sublime Text 3 / 4 package which converts PHP array syntax to brackets.

- [PhpArrayConverter - Packages - Package Control](https://packagecontrol.io/packages/PhpArrayConverter)
## Dependencies
This package needs `php` command to work.
## Installation
### Option 1: Install via "Package Control" (recommended)
1. Ensure you have Package Control installed. See https://packagecontrol.io/installation .
2. Install the package with Package Control. Open up the command palette (ctrl/cmd + shift + p), execute the following command: `Package Control: Install Package`, then enter `PhpArrayConverter`.
### Option 2: Download manually
1. Download the zip file: https://github.com/gh640/SublimePhpArrayConverter/archive/master.zip
2. Unzip the archive, rename the 'SublimePhpArrayConverter' folder to 'PhpArrayConverter' and move it into your Sublime Text 'Packages' directory.
## Usage
### Commands
You can run the conversion from the command palette.
1. Open the command palette (ctrl/cmd + shift + p).
2. Select `PhpArrayConverter: Convert array`.
If you are selecting a part of text when running the command, only arrays in it are targeted. If there's no text selected, all arrays in the active file will be converted.
### Settings
The default settings are set as below.
```json
{
"auto_convert_on_save": false,
"path": ""
}
```
These values can be overwritten through `Preferences` - `Package settings` - `PhpArrayConverter` - `Settings - User`.
- `auto_convert_on_save` is a setting to turn on/off the auto conversion function. The default value is `false` and the auto conversion function is disabled. If you want to enable the auto conversion, set this to `true` in your setting file.
- `path` is a value which is converted to the environment variable `$PATH` when `php` command to tokenize the php code is run. Change this value to specify which `php` should be used in your environment.
## Links
- [`ComposerPackageInfo`](https://github.com/gh640/SublimeComposerPackageInfo): A Sublime Text 3 package which shows Composer packages information in a popup.
## License
Licensed under the MIT license.