Skip to content

Commit

Permalink
Merge pull request #32 from Phillaf/master
Browse files Browse the repository at this point in the history
Parametric sort command
  • Loading branch information
arnaud-lb authored Mar 10, 2017
2 parents 4113c46 + ecde7c6 commit 3a6a13e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugin/phpns.vim
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

let s:capture = 0

let g:php_namespace_sort = get(g:, 'php_namespace_sort', "'{,'}-1sort")

let g:php_namespace_sort_after_insert = get(g:, 'php_namespace_sort_after_insert', 0)

function! PhpFindMatchingUse(name)
Expand Down Expand Up @@ -180,7 +182,7 @@ function! PhpSortUse()
let restorepos = line(".") . "normal!" . virtcol(".") . "|"
" insert after last use or namespace or <?php
if search('^use\_s\_[[:alnum:][:blank:]\\_]*;', 'be') > 0
execute "'{,'}-1sort"
execute g:php_namespace_sort
else
throw "No use statements found."
endif
Expand Down

0 comments on commit 3a6a13e

Please sign in to comment.