Skip to content

Functions for simplify work with PHP - projects

Notifications You must be signed in to change notification settings

ta-tikoma/php.easy.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 

Repository files navigation

Php Easy Vim

A few functions for make work with PHP 7.4 (or more) projects easy and quickly.

Install

Plug 'ta-tikoma/php.easy.vim'

Some settings

If you want to make self key binding

let g:phpEasyUseDefaultKeyBinding = 0

If you need check stack functions of php#easy

php#easy#helpers#insert#is()

Features

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

Examples

Init

Init trait -it

init trait

Init interface -ii

init interface

Init abstract class -iac

init abstract class

Init class -ic

init class

Add doc block -b

Class

doc class

Constant

doc constant

Property

doc property

Method

doc method

Variable

doc variable