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) function! todo#PrioritizeAdd (priority)
let oldpos=todo#GetCurpos() let oldpos=todo#GetCurpos()
let line=getline('.') let line=getline('.')
if line !~ '^([A-F])' if line !~ '^([A-W])'
:call todo#PrioritizeAddAction(a:priority) :call todo#PrioritizeAddAction(a:priority)
let oldpos[2]+=4 let oldpos[2]+=4
else else
exec ':s/^([A-F])/('.a:priority.')/' exec ':s/^([A-W])/('.a:priority.')/'
endif endif
call setpos('.',oldpos) call setpos('.',oldpos)
endfunction 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>a :call todo#PrioritizeAdd('A')<CR>
noremap <script> <silent> <buffer> <localleader>b :call todo#PrioritizeAdd('B')<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>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 " Insert date {{{3
if get(g:, "TodoTxtUseAbbrevInsertMode", 0) if get(g:, "TodoTxtUseAbbrevInsertMode", 0)

View File

@@ -50,6 +50,8 @@ highlight default link TodoDone Comment
highlight default link TodoPriorityA Identifier highlight default link TodoPriorityA Identifier
highlight default link TodoPriorityB statement highlight default link TodoPriorityB statement
highlight default link TodoPriorityC type highlight default link TodoPriorityC type
highlight default link TodoPriorityN Todo
highlight default link TodoPriorityW CursorLineNr
highlight default link TodoDate PreProc 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