Vim distributed on recent linux distribution is now linked with

python3. Ensure compatibility with it.
This commit is contained in:
Florent Fievez
2016-08-09 14:57:43 +02:00
parent 1e3a5e58ae
commit 0863e1434e
2 changed files with 6 additions and 2 deletions

View File

@@ -7,5 +7,5 @@
# Website: http://github.com/freitass/todo.txt-vim
# Version: 0.1
from after import regex_date_after
from before import regex_date_before
from dateregex.after import regex_date_after
from dateregex.before import regex_date_before

View File

@@ -54,6 +54,10 @@ if has('python')
let b:curdir = expand('<sfile>:p:h')
let s:script_dir = b:curdir . "/python/"
execute "pyfile " . s:script_dir. "todo.py"
elseif has('python3')
let b:curdir = expand('<sfile>:p:h')
let s:script_dir = b:curdir . "/python/"
execute "py3file " . s:script_dir. "todo.py"
else
echom "Your version of vim has no python support. Overdue dates won't be highlighted"
endif