From 2232436991bd16b6764e1bcf2502fd708974f2b0 Mon Sep 17 00:00:00 2001 From: Chiel92 Date: Sat, 30 May 2015 16:18:30 +0200 Subject: [PATCH] Fix bug in translating verbose flag to python --- plugin/autoformat.vim | 2 +- plugin/defaults.vim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/autoformat.vim b/plugin/autoformat.vim index e3a8292..b08190c 100644 --- a/plugin/autoformat.vim +++ b/plugin/autoformat.vim @@ -103,7 +103,7 @@ import vim, subprocess from subprocess import Popen, PIPE text = '\n'.join(vim.current.buffer[:]) formatprg = vim.eval('&formatprg') -verbose = vim.eval('verbose') +verbose = bool(int(vim.eval('verbose'))) p = subprocess.Popen(formatprg, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE) stdoutdata, stderrdata = p.communicate(text) if stderrdata: diff --git a/plugin/defaults.vim b/plugin/defaults.vim index 3c4cb63..352e25a 100644 --- a/plugin/defaults.vim +++ b/plugin/defaults.vim @@ -66,7 +66,7 @@ endif " Javascript let g:formatdef_jsbeautify_javascript = '"js-beautify -f - -".(&expandtab ? "s ".&shiftwidth : "t").(&textwidth ? " -w ".&textwidth : "")' -let g:formatdef_pyjsbeautify_javascript = '"-".(&expandtab ? "s ".&shiftwidth : "t").(&textwidth ? " -w ".&textwidth : "")." -"' +let g:formatdef_pyjsbeautify_javascript = '"js-beautify -".(&expandtab ? "s ".&shiftwidth : "t").(&textwidth ? " -w ".&textwidth : "")." -"' let g:formatdef_jscs = '"jscs -x"' if !exists('g:formatters_javascript') let g:formatters_javascript = [