From 1e2051727674f0650f7c516eb8565b9bd098be2b Mon Sep 17 00:00:00 2001 From: Chiel92 Date: Sun, 18 Aug 2013 15:57:04 +0200 Subject: [PATCH] removed obsolete reset of formatprg --- plugin/autoformat.vim | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugin/autoformat.vim b/plugin/autoformat.vim index 4d009cb..eea5558 100644 --- a/plugin/autoformat.vim +++ b/plugin/autoformat.vim @@ -1,10 +1,7 @@ -"Function for finding and setting the formatter with the given name, +"Function for finding and setting the formatter with the given name, "if the formatter is installed globally or in the formatters folder let s:formatterdir = fnamemodify(expand(""), ":p:h:h")."/formatters/" function! s:set_formatprg() - "Reset previous formatprg - set formatprg="" - "Get formatprg config for current filetype let s:formatprg_var = "g:formatprg_".&filetype let s:formatprg_args_var = "g:formatprg_args_".&filetype @@ -12,7 +9,7 @@ function! s:set_formatprg() if !exists(s:formatprg_var) "No formatprg defined - if exists("g:autoformat_verbosemode") + if exists("g:autoformat_verbosemode") echoerr "No formatter defined for filetype '".&filetype."'." endif return 0 @@ -31,7 +28,7 @@ function! s:set_formatprg() let s:formatprg = s:formatterdir.s:formatprg if !executable(s:formatprg) "Configured formatprg not installed - if exists("g:autoformat_verbosemode") + if exists("g:autoformat_verbosemode") echoerr "Defined formatter ".eval(s:formatprg_var)." is not executable." endif return 0