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.
This commit is contained in:
committed by
Michael F. Schönitzer
parent
65c4ffacca
commit
7036561446
@ -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 {{{
|
||||
|
Reference in New Issue
Block a user