From 703656144629aa5b2b24b3114cf730fb1bb36151 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Tue, 3 Apr 2018 16:48:24 -0700 Subject: [PATCH] Add VimwikiMakeTomorrowDiaryNote This change introduces a new global diary command "VimwikiMakeTomorrowDiaryNote". The purpose is the same as VimwikiMakeYesterdayDiaryNote, except it allows you to create a diary note in the future. I find this useful when trying to plan my day the night before. --- doc/vimwiki.txt | 18 ++++++++++++++++++ plugin/vimwiki.vim | 8 ++++++++ 2 files changed, 26 insertions(+) diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt index bcca97a..db6a93e 100644 --- a/doc/vimwiki.txt +++ b/doc/vimwiki.txt @@ -213,6 +213,22 @@ See also |:VimwikiTabMakeDiaryNote| < See also |:VimwikiMakeYesterdayDiaryNote| +[count]wm or VimwikiMakeTomorrowDiaryNote + Open diary wiki-file for tomorrow of the [count]'s wiki. + + wm opens diary wiki-file for tomorrow in the first + wiki from |g:vimwiki_list|. + 1wm as above opens diary wiki-file for tomorrow in + the first wiki from |g:vimwiki_list|. + 2wm opens diary wiki-file for tomorrow in the second + wiki from |g:vimwiki_list|. + 3wm opens diary wiki-file for tomorrow in the third + wiki from |g:vimwiki_list|. + etc. + To remap: > + :nmap dm VimwikiMakeTomorrowDiaryNote +< +See also |:VimwikiMakeTomorrowDiaryNote| ------------------------------------------------------------------------------ 3.2. Local mappings @@ -645,6 +661,8 @@ il A single list item. *:VimwikiMakeYesterdayDiaryNote* Open diary wiki-file for yesterday of the current wiki. +*:VimwikiMakeTomorrowDiaryNote* + Open diary wiki-file for tomorrow of the current wiki. ------------------------------------------------------------------------------ 4.2. Local commands *vimwiki-local-commands* diff --git a/plugin/vimwiki.vim b/plugin/vimwiki.vim index 8fe5f93..634d6b5 100644 --- a/plugin/vimwiki.vim +++ b/plugin/vimwiki.vim @@ -247,6 +247,8 @@ command! -count=1 VimwikiTabMakeDiaryNote \ call vimwiki#diary#make_note(v:count1, 1) command! -count=1 VimwikiMakeYesterdayDiaryNote \ call vimwiki#diary#make_note(v:count1, 0, vimwiki#diary#diary_date_link(localtime() - 60*60*24)) +command! -count=1 VimwikiMakeTomorrowDiaryNote + \ call vimwiki#diary#make_note(v:count1, 0, vimwiki#diary#diary_date_link(localtime() + 60*60*24)) command! VimwikiDiaryGenerateLinks \ call vimwiki#diary#generate_diary_section() @@ -297,6 +299,12 @@ endif nnoremap