Compare commits
10 Commits
v2024.01.24
..
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| a54a3002e2 | |||
| 389533bbbb | |||
| 92e911c25e | |||
| 70e3aa519b | |||
| 9edd8724c8 | |||
| 72792615e7 | |||
| 5cca07970c | |||
| 705ad1e0dd | |||
| 7ad424ea42 | |||
| 69318e74c8 |
@@ -10,6 +10,8 @@
|
|||||||
- [Pathogen](#installation-using-pathogen)
|
- [Pathogen](#installation-using-pathogen)
|
||||||
- [Vim-Plug](#installation-using-vim-plug)
|
- [Vim-Plug](#installation-using-vim-plug)
|
||||||
- [Vundle](#installation-using-vundle)
|
- [Vundle](#installation-using-vundle)
|
||||||
|
- [Lazy](#installation-using-lazy)
|
||||||
|
|
||||||
- [Basic Markup](#basic-markup)
|
- [Basic Markup](#basic-markup)
|
||||||
- [Lists](#lists)
|
- [Lists](#lists)
|
||||||
- [Key Bindings](#key-bindings)
|
- [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
|
#### Manual Install
|
||||||
|
|
||||||
Download the [zip archive](https://github.com/vimwiki/vimwiki/archive/dev.zip)
|
Download the [zip archive](https://github.com/vimwiki/vimwiki/archive/dev.zip)
|
||||||
|
|||||||
@@ -262,11 +262,20 @@ function! vimwiki#base#resolve_link(link_text, ...) abort
|
|||||||
\ vimwiki#vars#get_wikilocal('ext', link_infos.index)
|
\ vimwiki#vars#get_wikilocal('ext', link_infos.index)
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
" append extension iff one not already present or it's not the targeted
|
" append extension if one not already present or it's not the targeted
|
||||||
" wiki extension - https://github.com/vimwiki/vimwiki/issues/950
|
" wiki extension - https://github.com/vimwiki/vimwiki/issues/950
|
||||||
let ext = fnamemodify(link_text, ':e')
|
let ext = fnamemodify(link_text, ':e')
|
||||||
let ext_with_dot = '.' . ext
|
let ext_with_dot = '.' . ext
|
||||||
if ext ==? '' || ext_with_dot !=? vimwiki#vars#get_wikilocal('ext', link_infos.index)
|
|
||||||
|
" Check if a .md must be added
|
||||||
|
" See #1271 to modify files with a "."
|
||||||
|
let do_add_ext = ext ==? ''
|
||||||
|
if vimwiki#vars#get_syntaxlocal('open_link_add_ext')
|
||||||
|
let do_add_ext = do_add_ext || ext_with_dot !=? vimwiki#vars#get_wikilocal('ext', link_infos.index)
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Add the dot
|
||||||
|
if do_add_ext
|
||||||
let link_infos.filename .= vimwiki#vars#get_wikilocal('ext', link_infos.index)
|
let link_infos.filename .= vimwiki#vars#get_wikilocal('ext', link_infos.index)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -100,7 +100,8 @@ function! s:normalize_link_syntax_n() abort
|
|||||||
let sub = vimwiki#base#normalize_link_in_diary(lnk)
|
let sub = vimwiki#base#normalize_link_in_diary(lnk)
|
||||||
else
|
else
|
||||||
let sub = vimwiki#base#normalize_link_helper(lnk,
|
let sub = vimwiki#base#normalize_link_helper(lnk,
|
||||||
\ vimwiki#vars#get_global('rxWord'), '',
|
\ vimwiki#vars#get_global('rxWord'),
|
||||||
|
\ vimwiki#vars#get_global('rxWord'),
|
||||||
\ vimwiki#vars#get_syntaxlocal('Link1'))
|
\ vimwiki#vars#get_syntaxlocal('Link1'))
|
||||||
endif
|
endif
|
||||||
call vimwiki#base#replacestr_at_cursor('\V'.lnk, sub)
|
call vimwiki#base#replacestr_at_cursor('\V'.lnk, sub)
|
||||||
|
|||||||
@@ -47,6 +47,13 @@ function! vimwiki#tags#update_tags(full_rebuild, all_files) abort
|
|||||||
let wiki_base_dir = vimwiki#vars#get_wikilocal('path')
|
let wiki_base_dir = vimwiki#vars#get_wikilocal('path')
|
||||||
let tags_file_last_modification = getftime(vimwiki#tags#metadata_file_path())
|
let tags_file_last_modification = getftime(vimwiki#tags#metadata_file_path())
|
||||||
let metadata = s:load_tags_metadata()
|
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
|
for file in files
|
||||||
if all_files || getftime(file) >= tags_file_last_modification
|
if all_files || getftime(file) >= tags_file_last_modification
|
||||||
let subdir = vimwiki#base#subdir(wiki_base_dir, file)
|
let subdir = vimwiki#base#subdir(wiki_base_dir, file)
|
||||||
|
|||||||
@@ -851,6 +851,10 @@ function! s:get_common_syntaxlocal() abort
|
|||||||
" HTML comment
|
" HTML comment
|
||||||
let res.comment_regex = {'type': type(''), 'default': '\%(^\s*%%.*$\|<!--\%([^>]\|\n\)*-->\)'}
|
let res.comment_regex = {'type': type(''), 'default': '\%(^\s*%%.*$\|<!--\%([^>]\|\n\)*-->\)'}
|
||||||
|
|
||||||
|
" Opening link with dot in the ref, see #1271 and ref and Brennen comment:
|
||||||
|
" -- https://github.com/vimwiki/vimwiki/issues/1271#issuecomment-1482207680
|
||||||
|
let res.open_link_add_ext = {'type': type(1), 'default': 1}
|
||||||
|
|
||||||
return res
|
return res
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
+11
-2
@@ -980,6 +980,7 @@ Vimwiki file.
|
|||||||
*:VimwikiRebuildTags*
|
*:VimwikiRebuildTags*
|
||||||
Rebuilds the tags metadata file for all wiki files newer than the metadata
|
Rebuilds the tags metadata file for all wiki files newer than the metadata
|
||||||
file.
|
file.
|
||||||
|
Stale entries for files that have been deleted or moved are removed automatically.
|
||||||
Necessary for all tags related commands: |vimwiki-syntax-tags|.
|
Necessary for all tags related commands: |vimwiki-syntax-tags|.
|
||||||
|
|
||||||
:VimwikiRebuildTags! does the same for all files.
|
:VimwikiRebuildTags! does the same for all files.
|
||||||
@@ -1521,7 +1522,7 @@ In this case, <mathjax_folder> would be "../mathjax" (without quotes).
|
|||||||
2. Loading MathJax from a CDN-server (needs internet connection).
|
2. Loading MathJax from a CDN-server (needs internet connection).
|
||||||
Add to your HTML template the following lines:
|
Add to your HTML template the following lines:
|
||||||
|
|
||||||
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
<script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js?features=es6"></script>
|
||||||
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
||||||
|
|
||||||
|
|
||||||
@@ -3282,7 +3283,7 @@ cannot otherwise convert the link. A customized handler might look like this: >
|
|||||||
let str = a:value
|
let str = a:value
|
||||||
|
|
||||||
" complete URL
|
" complete URL
|
||||||
let url_0 = matchstr(str, g:vimwiki_rxWikiInclMatchUrl)
|
let url_0 = matchstr(str, g:vimwiki_global_vars.rxWikiInclMatchUrl)
|
||||||
" URL parts
|
" URL parts
|
||||||
let link_infos = vimwiki#base#resolve_link(url_0)
|
let link_infos = vimwiki#base#resolve_link(url_0)
|
||||||
let arg1 = matchstr(str, VimwikiWikiInclMatchArg(1))
|
let arg1 = matchstr(str, VimwikiWikiInclMatchArg(1))
|
||||||
@@ -4019,6 +4020,7 @@ Contributors and their Github usernames in roughly chronological order:
|
|||||||
- @jiamingc
|
- @jiamingc
|
||||||
- Alex Claman (@claman)
|
- Alex Claman (@claman)
|
||||||
- @qadzek
|
- @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.
|
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~
|
2024.01.24~
|
||||||
|
|
||||||
New:~
|
New:~
|
||||||
|
|||||||
+1
-1
@@ -257,7 +257,7 @@ Expect (Correctly formatted tags file):
|
|||||||
!_TAG_PROGRAM_AUTHOR Vimwiki
|
!_TAG_PROGRAM_AUTHOR Vimwiki
|
||||||
!_TAG_PROGRAM_NAME Vimwiki Tags
|
!_TAG_PROGRAM_NAME Vimwiki Tags
|
||||||
!_TAG_PROGRAM_URL https://github.com/vimwiki/vimwiki
|
!_TAG_PROGRAM_URL https://github.com/vimwiki/vimwiki
|
||||||
!_TAG_PROGRAM_VERSION 2023.05.12
|
!_TAG_PROGRAM_VERSION 2024.01.24
|
||||||
second-tag Test-Tag.md 13;" vimwiki:Test-Tag\tTest-Tag#second-tag\tTest-Tag#second-tag
|
second-tag Test-Tag.md 13;" vimwiki:Test-Tag\tTest-Tag#second-tag\tTest-Tag#second-tag
|
||||||
test-tag Test-Tag.md 5;" vimwiki:Test-Tag\tTest-Tag#a-header\tA header
|
test-tag Test-Tag.md 5;" vimwiki:Test-Tag\tTest-Tag#a-header\tA header
|
||||||
top-tag Test-Tag.md 1;" vimwiki:Test-Tag\tTest-Tag\tTest-Tag
|
top-tag Test-Tag.md 1;" vimwiki:Test-Tag\tTest-Tag\tTest-Tag
|
||||||
|
|||||||
Reference in New Issue
Block a user