Created
October 10, 2016 03:45
-
-
Save hasen/4f126ba17b2e24d986f4449018405298 to your computer and use it in GitHub Desktop.
Vim function format with PSR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function format_psr() | |
!php-cs-fixer fix % --level=psr2 | |
!php-cs-fixer fix % --fixers=hpdoc_indent,phpdoc_params,short_array_syntax,multiline_array_trailing_comma,operators_spaces | |
!gsed -i 's/, ]/,]/g' % | |
endfunction | |
command format_psr :call format_psr() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment