5 Commits

Author SHA1 Message Date
giardn a54a3002e2 Update vimwiki.txt - Issue #795: VimwikiRebuildTags 2026-04-30 12:15:09 -06:00
giardn 389533bbbb Update tags.vim
Remove stale entries for files no longer on disk
2026-04-30 12:15:09 -06:00
xtbqimuxmvtx 92e911c25e Fixed to include default options first, markdown as example 2026-04-29 18:26:52 -06:00
xtbqimuxmvtx 70e3aa519b Update README.md lazy install
Fixed to declare variables inline as per lazy convention
2026-04-29 18:26:52 -06:00
xtbqimuxmvtx 9edd8724c8 Update README.md 2026-04-29 18:26:52 -06:00
3 changed files with 38 additions and 0 deletions
+22
View File
@@ -10,6 +10,8 @@
- [Pathogen](#installation-using-pathogen)
- [Vim-Plug](#installation-using-vim-plug)
- [Vundle](#installation-using-vundle)
- [Lazy](#installation-using-lazy)
- [Basic Markup](#basic-markup)
- [Lists](#lists)
- [Key Bindings](#key-bindings)
@@ -142,6 +144,26 @@ vim +PluginInstall +qall
```
#### Installation using [Lazy](https://github.com/folke/lazy.nvim)
Add repository within `require('lazy').setup` call in your vimrc (or for plugins file ie. /lua/plugins/, do the same within a `return{}` statement).
If you are unfamiliar with lua, note that the brackets `{`, `}` need a closing comma (`},`) if you are adding this to an existing function like the .setup call.
``` { 'vimwiki/vimwiki' } ```
**Example with options (Change syntax to markdown)**:
``` lua
{
'vimwiki/vimwiki',
init = function()
vim.g.vimwiki_path = '~/vimwiki/'
vim.g.vimwiki_syntax = 'markdown'
vim.g.vimwiki_ext = 'md'
end,
}
```
#### Manual Install
Download the [zip archive](https://github.com/vimwiki/vimwiki/archive/dev.zip)
+7
View File
@@ -47,6 +47,13 @@ function! vimwiki#tags#update_tags(full_rebuild, all_files) abort
let wiki_base_dir = vimwiki#vars#get_wikilocal('path')
let tags_file_last_modification = getftime(vimwiki#tags#metadata_file_path())
let metadata = s:load_tags_metadata()
" Remove stale entries for files no longer on disk
let l:ext = vimwiki#vars#get_wikilocal('ext')
for pagename in keys(metadata)
if !filereadable(wiki_base_dir . pagename . l:ext)
call remove(metadata, pagename)
endif
endfor
for file in files
if all_files || getftime(file) >= tags_file_last_modification
let subdir = vimwiki#base#subdir(wiki_base_dir, file)
+9
View File
@@ -980,6 +980,7 @@ Vimwiki file.
*:VimwikiRebuildTags*
Rebuilds the tags metadata file for all wiki files newer than the metadata
file.
Stale entries for files that have been deleted or moved are removed automatically.
Necessary for all tags related commands: |vimwiki-syntax-tags|.
:VimwikiRebuildTags! does the same for all files.
@@ -4019,6 +4020,7 @@ Contributors and their Github usernames in roughly chronological order:
- @jiamingc
- Alex Claman (@claman)
- @qadzek
- Nathan Giard (@giardn)
==============================================================================
@@ -4038,6 +4040,13 @@ master is retained as a legacy mirror of the dev branch.
This is somewhat experimental, and will probably be refined over time.
2026.04.08~
Fixed:~
* Issue #795: VimwikiRebuildTags now removes stale entries for files
that have been deleted or moved
2024.01.24~
New:~