From ecde7c65b7f62cb0593099e868a2f6e7ac7efb8b Mon Sep 17 00:00:00 2001 From: Philippe Lafrance Date: Wed, 8 Mar 2017 13:10:07 -0500 Subject: [PATCH] Parametric sort command --- plugin/phpns.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/phpns.vim b/plugin/phpns.vim index 1b42e85..9610403 100644 --- a/plugin/phpns.vim +++ b/plugin/phpns.vim @@ -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) @@ -180,7 +182,7 @@ function! PhpSortUse() let restorepos = line(".") . "normal!" . virtcol(".") . "|" " insert after last use or namespace or 0 - execute "'{,'}-1sort" + execute g:php_namespace_sort else throw "No use statements found." endif