From 857d5e7a2911b3e5a645fbac0e2cc6162732a107 Mon Sep 17 00:00:00 2001 From: kayw Date: Mon, 13 Jun 2016 20:40:11 +0800 Subject: [PATCH] fix: do not treat following "|" and strings as arguments in Autoformat command related issue: https://github.com/Chiel92/vim-autoformat/issues/124 copy from this code: https://github.com/rhysd/vim-crystal/blob/master/ftplugin/crystal.vim#L51 --- plugin/autoformat.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/autoformat.vim b/plugin/autoformat.vim index 699b305..09a7e87 100644 --- a/plugin/autoformat.vim +++ b/plugin/autoformat.vim @@ -272,7 +272,7 @@ endfunction " Create a command for formatting the entire buffer " Save and recall window state to prevent vim from jumping to line 1 -command! -nargs=? -range=% -complete=filetype Autoformat let winview=winsaveview()|,call s:TryAllFormatters()|call winrestview(winview) +command! -nargs=? -range=% -complete=filetype -bar Autoformat let winview=winsaveview()|,call s:TryAllFormatters()|call winrestview(winview) " Functions for iterating through list of available formatters