Update tags file format. Closes #779.

This commit is contained in:
Rane Brown 2019-12-30 10:07:20 -07:00
parent 719036b011
commit b9eec79cc6
2 changed files with 13 additions and 3 deletions

View File

@ -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

View File

@ -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.