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

Php​Array​Converter

by Goto Hayato ST3

A Sublime Text 3 package which converts PHP array syntax.

Details

Installs

  • Total 314
  • Win 206
  • OS X 67
  • Linux 41
Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8
Windows 0 1 1 2 1 0 0 0 3 1 0 2 1 1 2 2 0 1 1 2 6 3 0 1 0 5 2 2 1 0 5 2 3 2 3 0 0 1 2 2 2 4 0 0 2 1
OS X 0 0 0 1 0 0 1 1 0 0 1 2 0 0 1 0 0 0 0 2 0 1 0 0 1 1 0 2 1 1 0 1 0 1 1 0 1 1 2 2 0 1 0 0 0 1
Linux 0 0 1 0 0 0 0 0 0 0 0 0 2 2 0 1 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 2 1 0 1 0 0 0

Readme

Source
raw.​githubusercontent.​com

SublimePhpArrayConverter

A Sublime Text 3 package which converts PHP array syntax to brackets.

ScreenShot

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.

{
  "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.

License

Licensed under the MIT license.