Add :VimwikiMakeYesterdayDiaryNote command
Opens diary for yesterday. For when you stay up past midnight.
This commit is contained in:
parent
2afff4c411
commit
64f71bc785
@ -198,6 +198,24 @@ See also |:VimwikiMakeDiaryNote|
|
|||||||
See also |:VimwikiTabMakeDiaryNote|
|
See also |:VimwikiTabMakeDiaryNote|
|
||||||
|
|
||||||
|
|
||||||
|
[count]<Leader>w<Leader>y or <Plug>VimwikiMakeYesterdayDiaryNote
|
||||||
|
Open diary wiki-file for yesterday of the [count]'s wiki.
|
||||||
|
|
||||||
|
<Leader>w<Leader>y opens diary wiki-file for yesterday in the first
|
||||||
|
wiki from |g:vimwiki_list|.
|
||||||
|
1<Leader>w<Leader>y as above opens diary wiki-file for yesterday in
|
||||||
|
the first wiki from |g:vimwiki_list|.
|
||||||
|
2<Leader>w<Leader>y opens diary wiki-file for yesterday in the second
|
||||||
|
wiki from |g:vimwiki_list|.
|
||||||
|
3<Leader>w<Leader>y opens diary wiki-file for yesterday in the third
|
||||||
|
wiki from |g:vimwiki_list|.
|
||||||
|
etc.
|
||||||
|
To remap: >
|
||||||
|
:nmap <Leader>dy <Plug>VimwikiMakeYesterdayDiaryNote
|
||||||
|
<
|
||||||
|
See also |:VimwikiMakeYesterdayDiaryNote|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
3.2. Local mappings
|
3.2. Local mappings
|
||||||
|
|
||||||
@ -567,6 +585,9 @@ il A single list item.
|
|||||||
*:VimwikiTabMakeDiaryNote*
|
*:VimwikiTabMakeDiaryNote*
|
||||||
Open diary wiki-file for today of the current wiki in a new tab.
|
Open diary wiki-file for today of the current wiki in a new tab.
|
||||||
|
|
||||||
|
*:VimwikiMakeYesterdayDiaryNote*
|
||||||
|
Open diary wiki-file for yesterday of the current wiki.
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
4.2. Local commands *vimwiki-local-commands*
|
4.2. Local commands *vimwiki-local-commands*
|
||||||
|
@ -523,6 +523,8 @@ command! -count=1 VimwikiMakeDiaryNote
|
|||||||
\ call vimwiki#diary#make_note(v:count1)
|
\ call vimwiki#diary#make_note(v:count1)
|
||||||
command! -count=1 VimwikiTabMakeDiaryNote
|
command! -count=1 VimwikiTabMakeDiaryNote
|
||||||
\ call vimwiki#diary#make_note(v:count1, 1)
|
\ call vimwiki#diary#make_note(v:count1, 1)
|
||||||
|
command! -count=1 VimwikiMakeYesterdayDiaryNote
|
||||||
|
\ call vimwiki#diary#make_note(v:count1, 0, strftime(VimwikiGet('diary_link_fmt', v:count1 - 1), localtime() - 60*60*24))
|
||||||
|
|
||||||
command! VimwikiDiaryGenerateLinks
|
command! VimwikiDiaryGenerateLinks
|
||||||
\ call vimwiki#diary#generate_diary_section()
|
\ call vimwiki#diary#generate_diary_section()
|
||||||
@ -565,6 +567,12 @@ endif
|
|||||||
nnoremap <unique><script> <Plug>VimwikiTabMakeDiaryNote
|
nnoremap <unique><script> <Plug>VimwikiTabMakeDiaryNote
|
||||||
\ :VimwikiTabMakeDiaryNote<CR>
|
\ :VimwikiTabMakeDiaryNote<CR>
|
||||||
|
|
||||||
|
if !hasmapto('<Plug>VimwikiMakeYesterdayDiaryNote')
|
||||||
|
exe 'nmap <silent><unique> '.g:vimwiki_map_prefix.'<Leader>y <Plug>VimwikiMakeYesterdayDiaryNote'
|
||||||
|
endif
|
||||||
|
nnoremap <unique><script> <Plug>VimwikiMakeYesterdayDiaryNote
|
||||||
|
\ :VimwikiMakeYesterdayDiaryNote<CR>
|
||||||
|
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
" MENU {{{
|
" MENU {{{
|
||||||
|
Loading…
Reference in New Issue
Block a user