Fievel work for python3 support
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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('-')
|
||||
|
||||
|
||||
@@ -51,10 +51,12 @@ highlight default link TodoDate PreProc
|
||||
highlight default link TodoProject Special
|
||||
highlight default link TodoContext Special
|
||||
|
||||
let b:curdir = expand('<sfile>:p:h')
|
||||
let s:script_dir = b:curdir . "/python/"
|
||||
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')
|
||||
execute "py3file " . s:script_dir. "todo.py"
|
||||
endif
|
||||
|
||||
let b:current_syntax = "todo"
|
||||
|
||||
Reference in New Issue
Block a user