diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim index c0318f9..8afd99a 100644 --- a/autoload/vimwiki/base.vim +++ b/autoload/vimwiki/base.vim @@ -2379,6 +2379,11 @@ function! vimwiki#base#search(search_pattern) abort endtry endfunction +function! vimwiki#base#deprecate(old, new) abort + echohl WarningMsg + echo a:old 'is deprecated and will be removed in future versions, use' a:new 'instead.' + echohl None +endfunction " ------------------------------------------------------------------------- " Load syntax-specific Wiki functionality diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt index 71df094..50ae174 100644 --- a/doc/vimwiki.txt +++ b/doc/vimwiki.txt @@ -387,13 +387,13 @@ MAP MODE *vimwiki_wd* wd n Delete wiki page you are in. - Maps to |:VimwikiDeleteLink|. - Remap command: `VimwikiDeleteLink` + Maps to |:VimwikiDeleteFile|. + Remap command: `VimwikiDeleteFile` *vimwiki_wr* wr n Rename wiki page you are in. - Maps to |:VimwikiRenameLink|. - Remap command: `VimwikiRenameLink` + Maps to |:VimwikiRenameFile|. + Remap command: `VimwikiRenameFile` *vimwiki_=* = n Add header level. Create if needed. @@ -793,10 +793,10 @@ Vimwiki file. Supports |cmdline-completion| for link name. If name is not specified, a prompt will be shown. -*:VimwikiDeleteLink* +*:VimwikiDeleteFile* Delete the wiki page you are in. -*:VimwikiRenameLink* +*:VimwikiRenameFile* Rename the wiki page you are in. *:VimwikiNextTask* @@ -3506,7 +3506,7 @@ https://github.com/vimwiki-backup/vimwiki/issues. 2.5 (in progress)~ New:~ - * PR #787: |:VimwikiRenameLink| works for all directories: even + * PR #787: |:VimwikiRenameFile| works for all directories: even wiki_root/diary/2019-12-11.md if current file is wiki_root/dir1/file.md. * Issue #764: fenced code blocks are properly supported for markdown syntax i.e. more than 3 backticks, adds tilde support. @@ -3576,6 +3576,11 @@ New:~ * PR #857: Make default template responsive * PR #879: Generate links when diary & wiki dir are the same +Changed:~ + * Issue #796: Rename |:VimwikiGenerateTags| to |:VimwikiGenerateTagLinks| + * Issue #638: Rename |:VimwikiDeleteLink| to |:VimwikiDeleteFile| + * Issue #638: Rename |:VimwikiRenameLink| to |:VimwikiRenameFile| + Removed:~ * PR #698: Remove awa check triggering silent file edits. * Options g:vimwiki_use_mouse and g:vimwiki_table_mappings. These are @@ -3585,7 +3590,6 @@ Removed:~ Fixed:~ * Issue #90: VimwikiRenameLink doesn't update links in diary. - * Issue #796: Rename |:VimwikiGenerateTags| to |:VimwikiGenerateTagLinks| * Issue #790: Allow tags before a header with markdown syntax. * Issue #779: Vimwiki tags file meets ctags standard. * Issue #781: Compatablity fixes for older versions of Vim. diff --git a/ftplugin/vimwiki.vim b/ftplugin/vimwiki.vim index 229cded..43568ab 100644 --- a/ftplugin/vimwiki.vim +++ b/ftplugin/vimwiki.vim @@ -242,8 +242,14 @@ command! -buffer VimwikiTOC call vimwiki#base#table_of_contents(1) command! -buffer VimwikiNextTask call vimwiki#base#find_next_task() command! -buffer VimwikiNextLink call vimwiki#base#find_next_link() command! -buffer VimwikiPrevLink call vimwiki#base#find_prev_link() -command! -buffer VimwikiDeleteLink call vimwiki#base#delete_link() -command! -buffer VimwikiRenameLink call vimwiki#base#rename_link() +command! -buffer VimwikiDeleteFile call vimwiki#base#delete_link() +command! -buffer VimwikiDeleteLink + \ call vimwiki#base#deprecate("VimwikiDeleteLink", "VimwikiDeleteFile") | + \ call vimwiki#base#delete_link() +command! -buffer VimwikiRenameFile call vimwiki#base#rename_link() +command! -buffer VimwikiRenameLink + \ call vimwiki#base#deprecate("VimwikiRenameLink", "VimwikiRenameFile") | + \ call vimwiki#base#rename_link() command! -buffer VimwikiFollowLink call vimwiki#base#follow_link('nosplit', 0, 1) command! -buffer VimwikiGoBackLink call vimwiki#base#go_back_link() command! -buffer -nargs=* VimwikiSplitLink call vimwiki#base#follow_link('hsplit', ) @@ -304,6 +310,10 @@ command! -buffer -nargs=* -complete=custom,vimwiki#tags#complete_tags \ VimwikiSearchTags VimwikiSearch /::/ command! -buffer -nargs=* -complete=custom,vimwiki#tags#complete_tags \ VimwikiGenerateTagLinks call vimwiki#tags#generate_tags(1, ) +command! -buffer -nargs=* -complete=custom,vimwiki#tags#complete_tags + \ VimwikiGenerateTags + \ call vimwiki#base#deprecate("VimwikiGenerateTags", "VimwikiGenerateTagLinks") | + \ call vimwiki#tags#generate_tags(1, ) command! -buffer VimwikiPasteUrl call vimwiki#html#PasteUrl(expand('%:p')) command! -buffer VimwikiCatUrl call vimwiki#html#CatUrl(expand('%:p')) @@ -357,10 +367,10 @@ nnoremap