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
Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 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
Windows 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
Mac 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 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 1 1 0 1 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

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