A few functions for make work with PHP 7.4 (or more) projects easy and quickly.
Plug 'ta-tikoma/php.easy.vim'
let g:phpEasyUseDefaultKeyBinding = 0
php#easy#helpers#insert#is()
Default Key Binding | Function | Description |
---|---|---|
Any | function or property or constant | |
-y |
php#easy#any#orchestrator#copy |
Yank (copy) any under cursor |
-r |
php#easy#any#orchestrator#replica |
Replica any: Copy under cursor, paste after current and trigger rename function |
-d |
php#easy#any#orchestrator#delete |
Delete any under cursor |
-b |
php#easy#any#orchestrator#docBlock |
PhpDocBlock for any or class or variable |
Append | ||
-c |
php#easy#any#entities#constant#append() |
Append constant |
-p |
php#easy#any#entities#property#append() |
Append property |
-m |
php#easy#any#entities#method#append() |
Append method |
-a |
php#easy#argument#append() |
Append new argument in current function |
Argument | ||
-da |
php#easy#argument#delete() |
Delete argument by number in current function |
DI | ||
-di |
php#easy#di#append() |
Append depended injection: add constructor to current class (if not exist), append argument and property |
Objects | ||
-ic |
php#easy#any#entities#object#class() |
Initialize class in current file |
-iac |
php#easy#any#entities#object#abstractClass() |
Initialize abstract class in current file |
-ii |
php#easy#any#entities#object#interface() |
Initialize interface in current file |
-it |
php#easy#any#entities#object#trait() |
Initialize trait in current file |
-ie |
php#easy#any#entities#object#enum() |
Initialize enum in current file |
Other | ||
php#easy#other#log() |
Append on new line print structure for debug | |
php#easy#other#changeVisibility() |
Change visibility property or function on current line | |
Navigation | ||
php#easy#navigation#next() |
Jump to next constant, property, start or end method | |
php#easy#navigation#prev() |
Jump to prev constant, property, start or end method |