Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Use fabpot/PHP-CS-Fixer

branch: master

Update README.md

--fixers argument need a value, in this example we do it wrong. Fix #8
latest commit 125b8b0bf7
Stéphane PY authored
Octocat-spinner-32 doc Add definition of a license and author's name May 10, 2013
Octocat-spinner-32 plugin Add definition of a license and author's name May 10, 2013
Octocat-spinner-32 README.md Update README.md January 16, 2014
README.md

Vim-php-cs-fixer

Integrate php-cs-fixer created by fabpot.

This plugin will execute the php-cs-fixer command on the directory or file (depends on which command you call). See options to know how to customize that.

Options available:

" If php-cs-fixer is in $PATH, you don't need to define line below
" let g:php_cs_fixer_path = "~/php-cs-fixer.phar" " define the path to the php-cs-fixer.phar
let g:php_cs_fixer_level = "all"                  " which level ?
let g:php_cs_fixer_config = "default"             " configuration
let g:php_cs_fixer_php_path = "php"               " Path to PHP
" If you want to define specific fixers:
"let g:php_cs_fixer_fixers_list = "linefeed,short_tag,indentation"
let g:php_cs_fixer_enable_default_mapping = 1     " Enable the mapping by default (<leader>pcd)
let g:php_cs_fixer_dry_run = 0                    " Call command with dry-run option
let g:php_cs_fixer_verbose = 0                    " Return the output of command if 1, else an inline information.

Default mapping is <leader>pcd

If you want to change it:

nnoremap <silent><leader>pcd :call PhpCsFixerFixDirectory()<CR>
nnoremap <silent><leader>pcf :call PhpCsFixerFixFile()<CR>

Installation

Via Vundle, add:

Bundle 'stephpy/vim-php-cs-fixer'

To see how to install php-cs-fixer, look at php-cs-fixer repository.

If you see any improvement or question, contribute or create an issue

Something went wrong with that request. Please try again.