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
|
||||
endfunction
|
||||
|
||||
function! TodoTxtPrioritizeAdd (priority)
|
||||
" Need to figure out how to only do this if the first visible letter in a line is not (
|
||||
function! TodoTxtPrioritizeAdd (priority)
|
||||
let line=getline('.')
|
||||
if line !~ '^([A-F])'
|
||||
:call TodoTxtPrioritizeAddAction(a:priority)
|
||||
else
|
||||
exec ':s/^([A-F])/('.a:priority.')/'
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user