diff --git a/autoload/vimwiki/tags.vim b/autoload/vimwiki/tags.vim index debfff6..240ec9c 100644 --- a/autoload/vimwiki/tags.vim +++ b/autoload/vimwiki/tags.vim @@ -162,7 +162,7 @@ function! s:load_tags_metadata() abort endif let metadata = {} for line in readfile(metadata_path) - if line =~# '^!_TAG_FILE_' + if line =~# '^!_TAG_.*$' continue endif let parts = matchlist(line, '^\(.\{-}\);"\(.*\)$') @@ -278,8 +278,17 @@ function! s:write_tags_metadata(metadata) abort endfor endfor call sort(tags, 's:tags_entry_cmp') - call insert(tags, "!_TAG_FILE_SORTED\t1\t") - call writefile(tags, metadata_path) + let tag_comments = [ + \ "!_TAG_FILE_FORMAT\t2", + \ "!_TAG_FILE_SORTED\t1", + \ "!_TAG_OUTPUT_MODE\tvimwiki-tags", + \ "!_TAG_PROGRAM_AUTHOR\tVimwiki", + \ "!_TAG_PROGRAM_NAME\tVimwiki Tags", + \ "!_TAG_PROGRAM_URL\thttps://github.com/vimwiki/vimwiki", + \ "!_TAG_PROGRAM_VERSION\t2.4.1", + \ ] + call writefile(tag_comments, metadata_path) + call writefile(tags, metadata_path, 'a') endfunction diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt index 482f8dd..18f17b7 100644 --- a/doc/vimwiki.txt +++ b/doc/vimwiki.txt @@ -3558,6 +3558,7 @@ Removed:~ point. Fixed:~ + * Issue #779: Vimwiki tags file meets ctags standard. * Issue #781: Compatablity fixes for older versions of Vim. * Issue #691: Allow |:VimwikiGoBackLink| to go back multiple times. * Update MathJax CDN loading instructions.