Fievel work for python3 support

This commit is contained in:
David Beniamine
2016-09-05 15:26:03 +02:00
5 changed files with 13 additions and 13 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

@@ -24,7 +24,6 @@ def _year_regex_before(year):
year_regex += ')'
return '-'.join((year_regex, r'\d{2}', r'\d{2}'))
def _month_regex_before(year, month):
if month == '01':
return None
@@ -64,7 +63,6 @@ def _day_regex_before(year, month, day):
def regex_date_before(given_date):
year, month, day = given_date.isoformat().split('-')

View File

@@ -51,10 +51,12 @@ highlight default link TodoDate PreProc
highlight default link TodoProject Special
highlight default link TodoContext Special
if has('python')
let b:curdir = expand('<sfile>:p:h')
let s:script_dir = b:curdir . "/python/"
if has('python')
execute "pyfile " . s:script_dir. "todo.py"
elseif has('python3')
execute "py3file " . s:script_dir. "todo.py"
endif
let b:current_syntax = "todo"