added N and W prority

This commit is contained in:
Eric Taylor
2020-05-08 08:29:46 -07:00
parent 16373b82df
commit 61960a9ae3
3 changed files with 6 additions and 2 deletions

View File

@@ -40,11 +40,11 @@ endfunction
function! todo#PrioritizeAdd (priority)
let oldpos=todo#GetCurpos()
let line=getline('.')
if line !~ '^([A-F])'
if line !~ '^([A-W])'
:call todo#PrioritizeAddAction(a:priority)
let oldpos[2]+=4
else
exec ':s/^([A-F])/('.a:priority.')/'
exec ':s/^([A-W])/('.a:priority.')/'
endif
call setpos('.',oldpos)
endfunction

View File

@@ -59,6 +59,8 @@ if !exists("g:Todo_txt_do_not_map") || ! g:Todo_txt_do_not_map
noremap <script> <silent> <buffer> <localleader>a :call todo#PrioritizeAdd('A')<CR>
noremap <script> <silent> <buffer> <localleader>b :call todo#PrioritizeAdd('B')<CR>
noremap <script> <silent> <buffer> <localleader>c :call todo#PrioritizeAdd('C')<CR>
noremap <script> <silent> <buffer> <localleader>n :call todo#PrioritizeAdd('N')<CR>
noremap <script> <silent> <buffer> <localleader>w :call todo#PrioritizeAdd('W')<CR>
" Insert date {{{3
if get(g:, "TodoTxtUseAbbrevInsertMode", 0)

View File

@@ -50,6 +50,8 @@ highlight default link TodoDone Comment
highlight default link TodoPriorityA Identifier
highlight default link TodoPriorityB statement
highlight default link TodoPriorityC type
highlight default link TodoPriorityN Todo
highlight default link TodoPriorityW CursorLineNr
highlight default link TodoDate PreProc
highlight default link TodoProject Special
highlight default link TodoContext Special