diff options
author | Teddy Wing | 2020-03-21 17:59:40 +0100 |
---|---|---|
committer | Teddy Wing | 2020-03-21 17:59:40 +0100 |
commit | 5ee078bc4c434764f413b036fcb39ca97b5ae74e (patch) | |
tree | 037ee00ef8e05e35f753b762548f3c9d91ea0673 | |
parent | 6a9876afd797eb306f63cda250bc2815d3f3ceef (diff) | |
download | vim-twodo-5ee078bc4c434764f413b036fcb39ca97b5ae74e.tar.bz2 |
Try adding xmaps and omaps for next and previous commands
The xmaps don't really work. Going to the next/previous TODO works, but
extending the selection doesn't because of the way I set it up with the
mark system. We'd probably need a more involved function here to do what
we want.
Currently doesn't support counts. I'll have to add that in.
-rw-r--r-- | ftplugin/todo.vim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ftplugin/todo.vim b/ftplugin/todo.vim index a223984..c876313 100644 --- a/ftplugin/todo.vim +++ b/ftplugin/todo.vim @@ -17,6 +17,10 @@ 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> +xnoremap <silent> <buffer> <Plug>TwodoNextIncomplete :<c-u>call todo#motion#NextIncomplete()<cr>v''o +xnoremap <silent> <buffer> <Plug>TwodoPreviousIncomplete :<c-u>call todo#motion#PreviousIncomplete()<cr>v''o +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 @@ -52,8 +56,12 @@ endif if !hasmapto('<Plug>TwodoNextIncomplete') && !maparg(']u', 'n') nmap <buffer> ]u <Plug>TwodoNextIncomplete + xmap <buffer> ]u <Plug>TwodoNextIncomplete + omap <buffer> ]u <Plug>TwodoNextIncomplete endif if !hasmapto('<Plug>TwodoPreviousIncomplete') && !maparg('[u', 'n') nmap <buffer> [u <Plug>TwodoPreviousIncomplete + xmap <buffer> [u <Plug>TwodoPreviousIncomplete + omap <buffer> [u <Plug>TwodoPreviousIncomplete endif |