@@ -33,51 +33,57 @@ endfu " }}}
3333" Public API {{{
3434
3535" Create a new item
36- nnore <Plug> (simple- todo - new ) i [ ]<space>
37- inore <Plug> (simple- todo - new ) [ ]<space>
36+ nnore <silent> < Plug> (simple- todo - new ) i [ ]<space>
37+ inore <silent> < Plug> (simple- todo - new ) [ ]<space>
3838
3939" Create a new item at the start of this line
40- inore <Plug> (simple- todo - new - start - of- line ) <Esc> mzI<c-r> = <SID> get_list_marker (line (' .' )-1 )<cr> [ ]<space><Esc> `z4la
41- nnore <Plug> (simple- todo - new - start - of- line ) mzI<c-r> = <SID> get_list_marker (line (' .' )-1 )<cr> [ ]<space><Esc> `z4l
42- vnore <Plug> (simple- todo - new - start - of- line ) I<c-r> = <SID> get_list_marker (line (' .' )-1 )<cr> [ ]<space>
40+ inore <silent> < Plug> (simple- todo - new - start - of- line ) <Esc> mzI<c-r> = <SID> get_list_marker (line (' .' )-1 )<cr> [ ]<space><Esc> `z4la
41+ nnore <silent> < Plug> (simple- todo - new - start - of- line ) mzI<c-r> = <SID> get_list_marker (line (' .' )-1 )<cr> [ ]<space><Esc> `z4l
42+ vnore <silent> < Plug> (simple- todo - new - start - of- line ) I<c-r> = <SID> get_list_marker (line (' .' )-1 )<cr> [ ]<space>
4343
4444" Create a new item below
45- nnore <Plug> (simple- todo - below) o <c-r> = <SID> get_list_marker (line (' .' )-1 )<cr> [ ]<space>
46- inore <Plug> (simple- todo - below) <Esc> o <c-r> = <SID> get_list_marker (line (' .' )-1 )<cr> [ ]<space>
45+ nnore <silent> < Plug> (simple- todo - below) o <c-r> = <SID> get_list_marker (line (' .' )-1 )<cr> [ ]<space>
46+ inore <silent> < Plug> (simple- todo - below) <Esc> o <c-r> = <SID> get_list_marker (line (' .' )-1 )<cr> [ ]<space>
4747
4848" Create a new item above
49- nnore <Plug> (simple- todo - above) O<c-r> = <SID> get_list_marker (line (' .' )+ 1 )<cr> [ ]<space>
50- inore <Plug> (simple- todo - above) <Esc> O<c-r> = <SID> get_list_marker (line (' .' )+ 1 )<cr> [ ]<space>
49+ nnore <silent> < Plug> (simple- todo - above) O<c-r> = <SID> get_list_marker (line (' .' )+ 1 )<cr> [ ]<space>
50+ inore <silent> < Plug> (simple- todo - above) <Esc> O<c-r> = <SID> get_list_marker (line (' .' )+ 1 )<cr> [ ]<space>
5151
5252" Mark item under cursor as done
53- nnore <Plug> (simple- todo - mark - as - done) :execute ' s/^\(\s*[-+*]\?\s*\)\[ \]/\1[' . g: simple_todo_tick_symbol . ' ]/' <cr>
54- vnore <Plug> (simple- todo - mark - as - done) :execute ' s/^\(\s*[-+*]\?\s*\)\[ \]/\1[' . g: simple_todo_tick_symbol . ' ]/' <cr>
55- inore <Plug> (simple- todo - mark - as - done) <Esc> :execute ' s/^\(\s*[-+*]\?\s*\)\[ \]/\1[' . g: simple_todo_tick_symbol . ' ]/' <cr>
53+ nnore <silent> <Plug> (simple- todo - mark - as - done) :execute ' s/^\(\s*[-+*]\?\s*\)\[ \]/\1[' . g: simple_todo_tick_symbol . ' ]/' <cr>
54+ \: silent ! call repeat#set (" \<Plug> (simple-todo-mark-as-done)" )<cr>
55+ vnore <silent> <Plug> (simple- todo - mark - as - done) :execute ' s/^\(\s*[-+*]\?\s*\)\[ \]/\1[' . g: simple_todo_tick_symbol . ' ]/' <cr>
56+ \: silent ! call repeat#set (" \<Plug> (simple-todo-mark-as-done)" )<cr>
57+ inore <silent> <Plug> (simple- todo - mark - as - done) <Esc> :execute ' s/^\(\s*[-+*]\?\s*\)\[ \]/\1[' . g: simple_todo_tick_symbol . ' ]/' <cr>
58+ \: silent ! call repeat#set (" \<Plug> (simple-todo-mark-as-done)" )<cr>
5659
5760" Mark as undone
58- nnore <Plug> (simple- todo - mark - as - undone) :execute ' s/^\(\s*[-+*]\?\s*\)\[' . g: simple_todo_tick_symbol . ' ]/\1[ ]/' <cr>
59- vnore <Plug> (simple- todo - mark - as - undone) :execute ' s/^\(\s*[-+*]\?\s*\)\[' . g: simple_todo_tick_symbol . ' ]/\1[ ]/' <cr>
60- inore <Plug> (simple- todo - mark - as - undone) <Esc> :execute ' s/^\(\s*[-+*]\?\s*\)\[' . g: simple_todo_tick_symbol . ' ]/\1[ ]/' <cr>
61+ nnore <silent> <Plug> (simple- todo - mark - as - undone) :execute ' s/^\(\s*[-+*]\?\s*\)\[' . g: simple_todo_tick_symbol . ' ]/\1[ ]/' <cr>
62+ \: silent ! call repeat#set (" \<Plug> (simple-todo-mark-as-undone)" )<cr>
63+ vnore <silent> <Plug> (simple- todo - mark - as - undone) :execute ' s/^\(\s*[-+*]\?\s*\)\[' . g: simple_todo_tick_symbol . ' ]/\1[ ]/' <cr>
64+ \: silent ! call repeat#set (" \<Plug> (simple-todo-mark-as-undone)" )<cr>
65+ inore <silent> <Plug> (simple- todo - mark - as - undone) <Esc> :execute ' s/^\(\s*[-+*]\?\s*\)\[' . g: simple_todo_tick_symbol . ' ]/\1[ ]/' <cr>
66+ \: silent ! call repeat#set (" \<Plug> (simple-todo-mark-as-undone)" )<cr>
6167
6268" }}}
6369" Key bindings {{{
6470
6571if g: simple_todo_map_keys
66- nmap <silent> < Leader> i <Plug> (simple-todo-new)
67- imap <silent> < Leader> i <Plug> (simple-todo-new)
68- imap <silent> < Leader> I <Plug> (simple-todo-new-start-of-line)
69- nmap <silent> < Leader> I <Plug> (simple-todo-new-start-of-line)
70- vmap <silent> < Leader> I <Plug> (simple-todo-new-start-of-line)
71- nmap <silent> < Leader> o <Plug> (simple-todo-below)
72- imap <silent> < Leader> o <Plug> (simple-todo-below)
73- nmap <silent> < Leader> O <Plug> (simple-todo-above)
74- imap <silent> < Leader> O <Plug> (simple-todo-above)
75- nmap <silent> < Leader> x <Plug> (simple-todo-mark-as-done)
76- vmap <silent> < Leader> x <Plug> (simple-todo-mark-as-done)
77- imap <silent> < Leader> x <Plug> (simple-todo-mark-as-done)
78- nmap <silent> < Leader> X <Plug> (simple-todo-mark-as-undone)
79- vmap <silent> < Leader> X <Plug> (simple-todo-mark-as-undone)
80- imap <silent> < Leader> X <Plug> (simple-todo-mark-as-undone)
72+ nmap <Leader> i <Plug> (simple-todo-new)
73+ imap <Leader> i <Plug> (simple-todo-new)
74+ imap <Leader> I <Plug> (simple-todo-new-start-of-line)
75+ nmap <Leader> I <Plug> (simple-todo-new-start-of-line)
76+ vmap <Leader> I <Plug> (simple-todo-new-start-of-line)
77+ nmap <Leader> o <Plug> (simple-todo-below)
78+ imap <Leader> o <Plug> (simple-todo-below)
79+ nmap <Leader> O <Plug> (simple-todo-above)
80+ imap <Leader> O <Plug> (simple-todo-above)
81+ nmap <Leader> x <Plug> (simple-todo-mark-as-done)
82+ vmap <Leader> x <Plug> (simple-todo-mark-as-done)
83+ imap <Leader> x <Plug> (simple-todo-mark-as-done)
84+ nmap <Leader> X <Plug> (simple-todo-mark-as-undone)
85+ vmap <Leader> X <Plug> (simple-todo-mark-as-undone)
86+ imap <Leader> X <Plug> (simple-todo-mark-as-undone)
8187endif
8288
8389" }}}
0 commit comments