Autodetect python version

This commit is contained in:
ZyX 2013-03-24 05:51:41 +04:00
parent b517df774b
commit 87e39d0b56
1 changed files with 2 additions and 1 deletions

View File

@ -15,7 +15,8 @@ if ! has('python') && ! has('python3')
finish
endif
let s:powerline_pycmd = substitute(get(g:, 'powerline_pycmd', 'py'), '\v^(py)%[thon](3?)$', '\1\2', '')
let s:powerline_pycmd = substitute(get(g:, 'powerline_pycmd', has('python') ? 'py' : 'py3'),
\'\v^(py)%[thon](3?)$', '\1\2', '')
let s:powerline_pyeval = get(g:, 'powerline_pyeval', s:powerline_pycmd.'eval')
let s:import_cmd = 'from powerline.vim import VimPowerline'