Merge pull request #50 from fievel/master

vim python3 compatibility
This commit is contained in:
Leandro Freitas
2016-09-10 10:04:29 -04:00
committed by GitHub
2 changed files with 6 additions and 2 deletions

View File

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

View File

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