Fievel work for python3 support
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ def _year_regex_before(year):
|
|||||||
|
|
||||||
year_regex += ')'
|
year_regex += ')'
|
||||||
return '-'.join((year_regex, r'\d{2}', r'\d{2}'))
|
return '-'.join((year_regex, r'\d{2}', r'\d{2}'))
|
||||||
|
|
||||||
def _month_regex_before(year, month):
|
def _month_regex_before(year, month):
|
||||||
if month == '01':
|
if month == '01':
|
||||||
return None
|
return None
|
||||||
@@ -64,7 +63,6 @@ def _day_regex_before(year, month, day):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def regex_date_before(given_date):
|
def regex_date_before(given_date):
|
||||||
year, month, day = given_date.isoformat().split('-')
|
year, month, day = given_date.isoformat().split('-')
|
||||||
|
|
||||||
|
|||||||
@@ -51,10 +51,12 @@ highlight default link TodoDate PreProc
|
|||||||
highlight default link TodoProject Special
|
highlight default link TodoProject Special
|
||||||
highlight default link TodoContext Special
|
highlight default link TodoContext Special
|
||||||
|
|
||||||
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/"
|
||||||
|
if has('python')
|
||||||
execute "pyfile " . s:script_dir. "todo.py"
|
execute "pyfile " . s:script_dir. "todo.py"
|
||||||
|
elseif has('python3')
|
||||||
|
execute "py3file " . s:script_dir. "todo.py"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let b:current_syntax = "todo"
|
let b:current_syntax = "todo"
|
||||||
|
|||||||
Reference in New Issue
Block a user