From 550c956cdda80c0f7a3006ca48537d479450e769 Mon Sep 17 00:00:00 2001 From: Ricky Anderson Date: Thu, 9 Jan 2020 11:02:14 +0700 Subject: [PATCH] Add g:TodoTxtUseAbbrevInsertMode documentations. --- README.markdown | 15 +++++++++++++++ doc/todo.txt | 20 ++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/README.markdown b/README.markdown index 5ca3983..cd57b57 100644 --- a/README.markdown +++ b/README.markdown @@ -296,6 +296,21 @@ following to your vimrc: let g:Todo_txt_prefix_creation_date=1 +With insert mode maps on, typing `date` or `due:` can feel like glitches +This is because vim wait for mappings before inserting the words to the buffer. +To prevent the glitches, abbreviations can be used instead of mappings. +To turn it on, add the following to your vimrc: + + let g:TodoTxtUseAbbrevInsertMode=1 + +Abbreviations uses word separator to expand the abbreviations, thus `` +is unavailable on abbreviations. Turning abbreviations mode will change +`date` mapping into `date:`. The resulting abbreviations would be: + ++ `date:` : (Insert mode) Insert the current date ++ `due:` : (Insert mode) Insert `due:` followed by the current date ++ `DUE:` : (Insert mode) Insert `DUE:` followed by the current date + ### Done diff --git a/doc/todo.txt b/doc/todo.txt index 468301e..a6925da 100644 --- a/doc/todo.txt +++ b/doc/todo.txt @@ -320,6 +320,26 @@ following to your vimrc: let g:Todo_txt_prefix_creation_date=1 < +With insert mode maps on, typing `date` or `due:` can feel like glitches +This is because vim wait for mappings before inserting the words to the buffer. +To prevent the glitches, abbreviations can be used instead of mappings. +To turn it on, add the following to your vimrc: +> + let g:TodoTxtUseAbbrevInsertMode=1 +< + +Abbreviations use word separator to expand the abbreviations, thus `` +is unavailable on abbreviations. Turning abbreviations mode will change +`date` mapping into `date:`. The resulting abbreviations would be: + + `date:` : (Insert mode) Insert the current date + + `due:` : (Insert mode) Insert `due:` followed by the current date + + `DUE:` : (Insert mode) Insert `DUE:` followed by the current date + +For more information regarding abbreviations, see |abbreviations| + 7.4 Done *TodoTxt-Done*