Skip to content

Commit c85000a

Browse files
committed
Support --config-file option
1 parent e76e700 commit c85000a

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ Vim-php-cs-fixer
33

44
[![](https://img.shields.io/travis/stephpy/vim-php-cs-fixer.svg)](https://travis-ci.org/stephpy/vim-php-cs-fixer)
55
[![](https://img.shields.io/github/issues/stephpy/vim-php-cs-fixer.svg)](https://github.com/stephpy/vim-php-cs-fixer/issues)
6-
[![](https://img.shields.io/badge/doc-%3Ah%20vim-php-cs-fixer-blue.svg)](doc/vim-php-cs-fixer.txt)
6+
[![](https://img.shields.io/badge/doc-%3Ah%20vim--php--cs--fixer-blue.svg)](doc/vim-php-cs-fixer.txt)
7+
[![](https://img.shields.io/badge/license-MIT-blue.svg)](doc/vim-php-cs-fixer.txt)
78

89
Integrate [php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer).
910

@@ -16,6 +17,7 @@ This plugin will execute the `php-cs-fixer` command on the directory or file (de
1617
" let g:php_cs_fixer_path = "~/php-cs-fixer.phar" " define the path to the php-cs-fixer.phar
1718
let g:php_cs_fixer_level = "symfony" " which level ?
1819
let g:php_cs_fixer_config = "default" " configuration
20+
"let g:php_cs_fixer_config_file = '.php_cs' " configuration file
1921
let g:php_cs_fixer_php_path = "php" " Path to PHP
2022
" If you want to define specific fixers:
2123
"let g:php_cs_fixer_fixers_list = "linefeed,short_tag,indentation"

doc/vim-php-cs-fixer.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on the directory or file (depends on which command you call).
1010
==============================================================================
1111
LICENSE *vim-php-cs-fixer-license*
1212

13-
Copyright 2012 by Stéphane PY
13+
Copyright 2016 by Stéphane PY
1414

1515
Permission is hereby granted, free of charge, to any person obtaining
1616
a copy of this software and associated documentation files (the

plugin/php-cs-fixer.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ end
2424
if exists('g:php_cs_fixer_config')
2525
let g:php_cs_fixer_command = g:php_cs_fixer_command.' --config='.g:php_cs_fixer_config
2626
endif
27+
28+
if exists('g:php_cs_fixer_config_file') && filereadable(g:php_cs_fixer_config_file)
29+
let g:php_cs_fixer_command = g:php_cs_fixer_command . ' --config-file=' . g:php_cs_fixer_config_file
30+
endif
2731
"}}}
2832

2933

0 commit comments

Comments
 (0)