From 0863e1434e9a89ace06c4856b6cb32ba9906e3de Mon Sep 17 00:00:00 2001 From: Florent Fievez Date: Tue, 9 Aug 2016 14:57:43 +0200 Subject: [PATCH] Vim distributed on recent linux distribution is now linked with python3. Ensure compatibility with it. --- syntax/python/dateregex/dateregex/__init__.py | 4 ++-- syntax/todo.vim | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/syntax/python/dateregex/dateregex/__init__.py b/syntax/python/dateregex/dateregex/__init__.py index cfbc141..6864127 100644 --- a/syntax/python/dateregex/dateregex/__init__.py +++ b/syntax/python/dateregex/dateregex/__init__.py @@ -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 diff --git a/syntax/todo.vim b/syntax/todo.vim index e4116ec..5096019 100644 --- a/syntax/todo.vim +++ b/syntax/todo.vim @@ -54,6 +54,10 @@ if has('python') let b:curdir = expand(':p:h') let s:script_dir = b:curdir . "/python/" execute "pyfile " . s:script_dir. "todo.py" +elseif has('python3') + let b:curdir = expand(':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