Fix bug in translating verbose flag to python

This commit is contained in:
Chiel92 2015-05-30 16:18:30 +02:00
parent 495dc9651d
commit 2232436991
2 changed files with 2 additions and 2 deletions

View File

@ -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:

View File

@ -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 = [