Add: prioritize update the priority
When there is already a priority in the line, we update it instead of adding a new one
This commit is contained in:
@@ -111,8 +111,12 @@ function! TodoTxtPrioritizeDecrease()
|
|||||||
normal! 0f)h
|
normal! 0f)h
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! TodoTxtPrioritizeAdd (priority)
|
function! TodoTxtPrioritizeAdd (priority)
|
||||||
" Need to figure out how to only do this if the first visible letter in a line is not (
|
let line=getline('.')
|
||||||
|
if line !~ '^([A-F])'
|
||||||
|
:call TodoTxtPrioritizeAddAction(a:priority)
|
||||||
|
else
|
||||||
|
exec ':s/^([A-F])/('.a:priority.')/'
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user