if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 " TODO: Add no_plugin_mappings or whatever nnoremap TwodoNewTodoBelow o- nnoremap TwodoNewTodoAbove O- nnoremap TwodoMarkComplete m`:s/\v^(\s*)[-_!xS] /\1v / \| nohlsearch`` nnoremap TwodoMarkDeleted m`:s/\v^(\s*)[-_!vS] /\1x / \| nohlsearch`` nnoremap TwodoMarkPartiallyCompleted m`:s/\v^(\s*)[-_!xv] /\1S / \| nohlsearch`` nnoremap TwodoRemoveOldTodos :g/^\s*[vx] /d \| nohlsearch nnoremap TwodoEscalate :call todo#Escalate() nnoremap TwodoDescalate :call todo#Descalate() nnoremap TwodoNextIncomplete :call todo#motion#NextIncomplete() nnoremap TwodoPreviousIncomplete :call todo#motion#PreviousIncomplete() xnoremap TwodoNextIncomplete :call todo#motion#NextIncomplete()v''o xnoremap TwodoPreviousIncomplete :call todo#motion#PreviousIncomplete()v''o onoremap TwodoNextIncomplete :call todo#motion#NextIncomplete() onoremap TwodoPreviousIncomplete :call todo#motion#PreviousIncomplete() if !hasmapto('TwodoNewTodoBelow') || !maparg('n', 'n') nmap n TwodoNewTodoBelow endif if !hasmapto('TwodoNewTodoAbove') || !maparg('N', 'n') nmap N TwodoNewTodoAbove endif if !hasmapto('TwodoMarkComplete') || !maparg('c', 'n') nmap c TwodoMarkComplete endif if !hasmapto('TwodoMarkDeleted') || !maparg('d', 'n') nmap d TwodoMarkDeleted endif if !hasmapto('TwodoMarkPartiallyCompleted') || !maparg('s', 'n') nmap s TwodoMarkPartiallyCompleted endif if !hasmapto('TwodoRemoveOldTodos') || !maparg('R', 'n') nmap R TwodoRemoveOldTodos endif if !hasmapto('TwodoEscalate') || !maparg('=', 'n') nmap = TwodoEscalate endif if !hasmapto('TwodoDescalate') || !maparg('-', 'n') nmap - TwodoDescalate endif if !hasmapto('TwodoNextIncomplete') && !maparg(']u', 'n') nmap ]u TwodoNextIncomplete xmap ]u TwodoNextIncomplete omap ]u TwodoNextIncomplete endif if !hasmapto('TwodoPreviousIncomplete') && !maparg('[u', 'n') nmap [u TwodoPreviousIncomplete xmap [u TwodoPreviousIncomplete omap [u TwodoPreviousIncomplete endif