VIM RPC Plugin

This is the original VIM plugin, and is bundled with Phpactor by default.

Installation

Prerequisites:

Using the vim-plug plugin manager add the following in your VIM configuration (e.g. ~/.vimrc or ~/.config/nvim/init.vim when using Neovim):

Plug 'phpactor/phpactor', {'for': 'php', 'branch': 'master', 'do': 'composer install --no-dev -o'}

Reload VIM (or :source ~/.vimrc) then update your plugins:

:PlugInstall

If you need to install the dependencies manually, then:

$ cd ~/.vim/plugged/phpactor
$ composer install

Now open a PHP file and issue the following command :PhpactorStatus:

Support
-------
[✔] Composer detected - faster class location and more features!
[✔] Git detected - enables faster refactorings in your repository scope!
[✔] XDebug is disabled. XDebug has a negative effect on performance.

Config files
------------
[✔] /home/daniel/www/phpactor/phpactor/.phpactor.yml
[✔] /home/daniel/.config/phpactor/phpactor.yml
[✘] /etc/xdg/phpactor/phpactor.yml

To find out more about the plugin type :help phpactor

Troubleshooting

E492: Not an editor command: PhpactorStatus

You need to open a PHP file before using Phpactor.

Phpactor requires at least PHP 7.3.0

If you run an older version of PHP by default, you will need to install another version and set :phpactorPhpBin in your .vimrc (or equivalent):

let g:phpactorPhpBin = "/usr/bin/php7.3"

Composer not found** or **Git not detected

The Git and Composer checks are referring to the current “workspace” (i.e. where you started Vim from). If you’ve already setup Git and Composer for your project, ensure you are starting Vim from the project directory to enable detection.

Usage and Configuration

To find out how to use the plugin type :help phpactor or view the Help.

Complementary Plugins

The following plugins add more functionality to Phpactor