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
  • 31 minutes ago
  • 11 years ago

Installs

  • Total 11K
  • Win 6K
  • Mac 2K
  • Linux 2K
Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 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
Windows 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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
Mac 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 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 1 1 0 1 0 0 0 0 1 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