mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-18 21:33:07 +02:00
plugin: Prefer python3 over python2 by default
This commit is contained in:
parent
40b4f2c28a
commit
cf3789f074
2 changed files with 12 additions and 5 deletions
|
@ -674,6 +674,13 @@ constructs.
|
|||
*taskwiki_disable*
|
||||
Setting any non-empty value for this variable will disable taskwiki.
|
||||
|
||||
*taskwiki_use_python2*
|
||||
Setting this variable to non-empty value (such as "yes") will force
|
||||
taskwiki to use python2.
|
||||
|
||||
Example:
|
||||
let g:taskwiki_use_python2="yes"
|
||||
|
||||
|
||||
=============================================================================
|
||||
9. TROUBLESHOOTING *taskwiki-trouble*
|
||||
|
|
|
@ -4,16 +4,16 @@ if version < 704
|
|||
finish
|
||||
endif
|
||||
|
||||
" Check presence of the python support
|
||||
if has("nvim")
|
||||
" Python version detection.
|
||||
elseif has("nvim")
|
||||
let g:taskwiki_py='py3 '
|
||||
let g:taskwiki_pyfile='py3file '
|
||||
elseif has("python3") && ! exists("g:taskwiki_use_python2")
|
||||
let g:taskwiki_py='py3 '
|
||||
let g:taskwiki_pyfile='py3file '
|
||||
elseif has("python")
|
||||
let g:taskwiki_py='py '
|
||||
let g:taskwiki_pyfile='pyfile '
|
||||
elseif has("python3")
|
||||
let g:taskwiki_py='py3 '
|
||||
let g:taskwiki_pyfile='py3file '
|
||||
else
|
||||
echoerr "Taskwiki requires Vim compiled with the Python support."
|
||||
finish
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue