mirror of
https://github.com/freitass/todo.txt-vim.git
synced 2025-11-16 13:53:47 -05:00
Fixes #14. Also changes some shortcuts
This commit is contained in:
@@ -32,7 +32,11 @@ function! TodoTxtMarkAsDone()
|
||||
normal! Ix
|
||||
endfunction
|
||||
|
||||
function! TodoTxtMarkAllAsDone()
|
||||
function! TodoTxtMarkAllAsDone()
|
||||
:g!/^x /:call TodoTxtMarkAsDone()
|
||||
endfunction
|
||||
|
||||
function! TodoTxtRemoveCompleted()
|
||||
:g/^x /d
|
||||
endfunction
|
||||
|
||||
@@ -55,17 +59,22 @@ if !hasmapto("<leader>d",'v')
|
||||
vnoremap <script> <silent> <buffer> <leader>d :call TodoTxtPrependDate()<CR>
|
||||
endif
|
||||
|
||||
" Mark done {{{2
|
||||
if !hasmapto("<leader>D",'n')
|
||||
" Mark done {{{2
|
||||
if !hasmapto("<leader>x",'n')
|
||||
nnoremap <script> <silent> <buffer> <leader>x :call TodoTxtMarkAsDone()<CR>
|
||||
endif
|
||||
|
||||
if !hasmapto("<leader>D",'v')
|
||||
|
||||
if !hasmapto("<leader>x",'v')
|
||||
vnoremap <script> <silent> <buffer> <leader>x :call TodoTxtMarkAsDone()<CR>
|
||||
endif
|
||||
|
||||
" Mark all done {{{2
|
||||
if !hasmapto("DD",'n')
|
||||
" Mark all done {{{2
|
||||
if !hasmapto("<leader>X",'n')
|
||||
nnoremap <script> <silent> <buffer> <leader>X :call TodoTxtMarkAllAsDone()<CR>
|
||||
endif
|
||||
|
||||
" Remove completed {{{2
|
||||
if !hasmapto("<leader>D",'n')
|
||||
nnoremap <script> <silent> <buffer> <leader>D :call TodoTxtRemoveCompleted()<CR>
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user