Update readme

This commit is contained in:
Chiel92 2015-06-22 09:18:49 +02:00
parent 47bd95f672
commit 509f982da6
2 changed files with 3 additions and 2 deletions

View File

@ -9,7 +9,7 @@ When no formatprogram exists (or no formatprogram is installed) for a certain fi
How to install
-----------------------
It is required that your vim has builtin python support. You can check whether this is the case
by running `vim --version` and check that `+python` is listed among features.
by running `vim --version` and check that `+python` or `+python3` is listed among features.
####Vundle
Put this in your .vimrc

View File

@ -86,13 +86,13 @@ function! s:TryAllFormatters(...) range
" once for getting the final expression
let &formatprg = eval(eval(formatdef_var))
" Detect if +python or +python3 is available, and call the corresponding function
if !has("python") && !has("python3")
echohl WarningMsg |
\ echomsg "WARNING: vim has no support for python, but it is required to run the formatter!" |
\ echohl None
return 1
endif
if has("python")
let success = s:TryFormatterPython()
else
@ -120,6 +120,7 @@ endfunction
" Call formatter
" If stderr is empty, apply result, return 1
" Otherwise, return 0
" +python version
function! s:TryFormatterPython()
" Detect verbosity