Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@hasen
Created October 10, 2016 03:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hasen/4f126ba17b2e24d986f4449018405298 to your computer and use it in GitHub Desktop.
Save hasen/4f126ba17b2e24d986f4449018405298 to your computer and use it in GitHub Desktop.
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