diff options
author | Teddy Wing | 2020-03-21 20:55:09 +0100 |
---|---|---|
committer | Teddy Wing | 2020-03-21 20:55:09 +0100 |
commit | c08bded55f2709aa2b0bf9829c02e06684769801 (patch) | |
tree | 54ee35c5bddb5ba37b047e4ed424251d7c6da37c /ftplugin | |
parent | 99fe2c62624f279dc2250872da003bc43cee386b (diff) | |
parent | c7ac0e17fe4acb714b135f9b4ffac24351b3de56 (diff) | |
download | vim-twodo-c08bded55f2709aa2b0bf9829c02e06684769801.tar.bz2 |
Merge branch 'next-previous-incomplete-mappings'
Diffstat (limited to 'ftplugin')
-rw-r--r-- | ftplugin/todo.vim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ftplugin/todo.vim b/ftplugin/todo.vim index f392c94..e7664d8 100644 --- a/ftplugin/todo.vim +++ b/ftplugin/todo.vim @@ -3,6 +3,8 @@ if exists("b:did_ftplugin") endif let b:did_ftplugin = 1 +" TODO: Add no_plugin_mappings or whatever + nnoremap <silent> <buffer> <Plug>TwodoNewTodoBelow o- nnoremap <silent> <buffer> <Plug>TwodoNewTodoAbove O- @@ -13,6 +15,11 @@ nnoremap <silent> <buffer> <Plug>TwodoRemoveOldTodos :<c-u>g/^\s*[vx] /d \| nohl nnoremap <silent> <buffer> <Plug>TwodoEscalate :<c-u>call todo#Escalate()<cr> nnoremap <silent> <buffer> <Plug>TwodoDescalate :<c-u>call todo#Descalate()<cr> +nnoremap <silent> <buffer> <Plug>TwodoNextIncomplete :<c-u>call todo#motion#NextIncomplete()<cr> +nnoremap <silent> <buffer> <Plug>TwodoPreviousIncomplete :<c-u>call todo#motion#PreviousIncomplete()<cr> +onoremap <silent> <buffer> <Plug>TwodoNextIncomplete :<c-u>call todo#motion#NextIncomplete()<cr> +onoremap <silent> <buffer> <Plug>TwodoPreviousIncomplete :<c-u>call todo#motion#PreviousIncomplete()<cr> + if !hasmapto('<Plug>TwodoNewTodoBelow') || !maparg('<leader>n', 'n') nmap <silent> <buffer> <leader>n <Plug>TwodoNewTodoBelow endif @@ -44,3 +51,19 @@ endif if !hasmapto('<Plug>TwodoDescalate') || !maparg('<leader>-', 'n') nmap <silent> <buffer> <leader>- <Plug>TwodoDescalate endif + +if !hasmapto('<Plug>TwodoNextIncomplete', 'n') && !maparg(']u', 'n') + nmap <buffer> ]u <Plug>TwodoNextIncomplete +endif + +if !hasmapto('<Plug>TwodoNextIncomplete', 'o') && !maparg(']u', 'o') + omap <buffer> ]u <Plug>TwodoNextIncomplete +endif + +if !hasmapto('<Plug>TwodoPreviousIncomplete', 'n') && !maparg('[u', 'n') + nmap <buffer> [u <Plug>TwodoPreviousIncomplete +endif + +if !hasmapto('<Plug>TwodoPreviousIncomplete', 'o') && !maparg('[u', 'o') + omap <buffer> [u <Plug>TwodoPreviousIncomplete +endif |