Skip to content

Latest commit

 

History

History
42 lines (24 loc) · 848 Bytes

File metadata and controls

42 lines (24 loc) · 848 Bytes

vim-php-cs-fixer


Introduction

vim-php-cs-fixer is a vim plugin for integrate PHP Coding Standards Fixer in vim.

Requirement

Installation

Installation with pathogen

cd ~/.vim/bundle
git clone https://github.com/emmanuelgrognet/vim-phpcsfixer.git

Installation with vim-plug

Plug 'vim-phpcsfixer'

Configuration

Set path of php-cs-fixer.path

For example :

let g:php_cs_fixer_phar_path = 'c:\Program Files\php71\php-cs-fixer.phar'

Mapping

To call the plugin define your key mapping.

nmap <silent> <Leader>pcs :call PHPCSFix()<CR>

Options availables

let g:vim_php_cs_fixer_php_path = 'php'
let g:vim_php_cs_fixer_rules = '@PSR1,@PSR2'