diff options
author | Ricky Anderson <ricky_anderson2696@yahoo.com> | 2020-01-07 00:39:34 +0700 |
---|---|---|
committer | Ricky Anderson <ricky_anderson2696@yahoo.com> | 2020-01-07 00:39:34 +0700 |
commit | 36fd3b427def5baf40654e7b632b6f2573f34e40 (patch) | |
tree | 6ea854eab1cd35eb5b1ab7ad0f94d9bc751988be | |
parent | 2bedaf4672e3bfd4c5fc886ed0b4b6749e3066dc (diff) | |
download | todo.txt-vim-36fd3b427def5baf40654e7b632b6f2573f34e40.zip |
Add g:TodoTxtUseAbbrevInsertMode to control usage of abbreviations or
mapping in insert mode
-rw-r--r-- | ftplugin/todo.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ftplugin/todo.vim b/ftplugin/todo.vim index 6d25a4a..4bc3cb9 100644 --- a/ftplugin/todo.vim +++ b/ftplugin/todo.vim @@ -61,10 +61,17 @@ if !exists("g:Todo_txt_do_not_map") || ! g:Todo_txt_do_not_map noremap <script> <silent> <buffer> <localleader>c :call todo#PrioritizeAdd('C')<CR> " Insert date {{{3 +if get(g:, "TodoTxtUseAbbrevInsertMode", 0) inoreabbrev <script> <silent> <buffer> date: <C-R>=strftime("%Y-%m-%d")<CR> inoreabbrev <script> <silent> <buffer> due: due:<C-R>=strftime("%Y-%m-%d")<CR> inoreabbrev <script> <silent> <buffer> DUE: DUE:<C-R>=strftime("%Y-%m-%d")<CR> +else + inoremap <script> <silent> <buffer> date<Tab> <C-R>=strftime("%Y-%m-%d")<CR> + + inoremap <script> <silent> <buffer> due: due:<C-R>=strftime("%Y-%m-%d")<CR> + inoremap <script> <silent> <buffer> DUE: DUE:<C-R>=strftime("%Y-%m-%d")<CR> +endif noremap <script> <silent> <buffer> <localleader>d :call todo#PrependDate()<CR> |