aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2020-03-10 00:49:25 +0100
committerTeddy Wing2020-03-12 23:21:55 +0100
commit68a2dea0305109accbf628294eadbe284c36bfa5 (patch)
tree6249d1800197a5f2a28b69dccf69d4e5ff6348fa
parentb71e2fe5d13cc6ac878748c5b778d5f4a3b6d295 (diff)
downloaddotvim-68a2dea0305109accbf628294eadbe284c36bfa5.tar.bz2
todo: Add `<Plug>` mappings
-rw-r--r--bundle/todo/plugin/todo.vim13
1 files changed, 11 insertions, 2 deletions
diff --git a/bundle/todo/plugin/todo.vim b/bundle/todo/plugin/todo.vim
index e8f0229..1c7ccfd 100644
--- a/bundle/todo/plugin/todo.vim
+++ b/bundle/todo/plugin/todo.vim
@@ -4,5 +4,14 @@ endif
let g:loaded_todo = 1
-nnoremap [t :call todo#PreviousTODO()<CR>
-nnoremap ]t :call todo#NextTODO()<CR>
+nnoremap <Plug>(todo-previous) :call todo#PreviousTODO()<CR>
+nnoremap <Plug>(todo-next) :call todo#NextTODO()<CR>
+
+
+if !hasmapto('<Plug>(todo-previous)', 'n') && !maparg('[t', 'n')
+ nmap [t <Plug>(todo-previous)
+endif
+
+if !hasmapto('<Plug>(todo-next)', 'n') && !maparg(']t', 'n')
+ nmap ]t <Plug>(todo-next)
+endif