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

Php​Simple​Refactor

by lucacri ALL

PhpSimpleRefactor plugin for Sublime Text 3 - Deprecated

Details

Installs

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

Readme

Source
raw.​githubusercontent.​com

PHPSimpleRefactor for Sublime Text

A simple way to integrate PHP Refactoring Browser's method extraction in Sublime Text 3


Requirements

You need to have PHP installed and PHP Refactoring Browser's refactor.phar file.

Installation

The package is available on Package Control.

Configuration

Edit the file PHPSimpleRefactor.sublime-settings (Preferences > Package Settings > PHPSimpleRefactor > Settings – User) with the correct php_path and refactor_path.

Example:

/** FILE: PHPSimpleRefactor.sublime-settings **/

{
    "php_path" : "/Applications/MAMP/bin/php/php5.5.3/bin/PHP",
    "refactor_path" : "/usr/local/bin/refactor" 
}

Usage

There are two functionalities:

Extract method: Select the lines that you'd like to extract to a new method, and use the shortcut ctrl+alt+r (or right click on the text and select “PHPSimpleRefactor -> Extract method”). The plugin will ask you for the method name to use.

Rename local variable: Right click inside the scope that contains the local variable that you want to rename and select “PHPSimpleRefactor -> Rename local variable”. The plugin will ask you for the variable old name and the new name.

License

MIT