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

Php​Simple​Refactor

by lucacri ALL

PhpSimpleRefactor plugin for Sublime Text 3 - Deprecated

Details

  • 0.1.2
  • github.​com
  • github.​com
  • 11 years ago
  • 36 minutes ago
  • 11 years ago

Installs

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