Skip to content

Instantly share code, notes, and snippets.

@hasen
Created Oct 10, 2016
Embed
What would you like to do?
Vim function format with PSR
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