vimwiki

Personal wiki for vim
git clone https://github.com/vimwiki/vimwiki.git
Log | Files | Refs | README | LICENSE

commit 703656144629aa5b2b24b3114cf730fb1bb36151
parent 65c4ffaccac9516182bdf9b64dbd67d2799520f8
Author: Brian Gianforcaro <bgianf@microsoft.com>
Date:   Tue,  3 Apr 2018 16:48:24 -0700

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.

Diffstat:
Mdoc/vimwiki.txt | 18++++++++++++++++++
Mplugin/vimwiki.vim | 8++++++++
2 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt @@ -213,6 +213,22 @@ See also |:VimwikiTabMakeDiaryNote| < See also |:VimwikiMakeYesterdayDiaryNote| +[count]<Leader>w<Leader>m or <Plug>VimwikiMakeTomorrowDiaryNote + Open diary wiki-file for tomorrow of the [count]'s wiki. + + <Leader>w<Leader>m opens diary wiki-file for tomorrow in the first + wiki from |g:vimwiki_list|. + 1<Leader>w<Leader>m as above opens diary wiki-file for tomorrow in + the first wiki from |g:vimwiki_list|. + 2<Leader>w<Leader>m opens diary wiki-file for tomorrow in the second + wiki from |g:vimwiki_list|. + 3<Leader>w<Leader>m opens diary wiki-file for tomorrow in the third + wiki from |g:vimwiki_list|. + etc. + To remap: > + :nmap <Leader>dm <Plug>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 @@ -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 <unique><script> <Plug>VimwikiMakeYesterdayDiaryNote \ :VimwikiMakeYesterdayDiaryNote<CR> +if !hasmapto('<Plug>VimwikiMakeTomorrowDiaryNote') + exe 'nmap <silent><unique> '.s:map_prefix.'<Leader>m <Plug>VimwikiMakeTomorrowDiaryNote' +endif +nnoremap <unique><script> <Plug>VimwikiMakeTomorrowDiaryNote + \ :VimwikiMakeTomorrowDiaryNote<CR> + "}}} " MENU {{{