When generating links, we first check that the file is not a diary file
as we don't want to include those in the list. That work is delegated to
the `is_diary_file` function. Prior to this change, the function always
returned true if the file was in the diary directory.
This approach gives false positives for a wiki which has a flat structure
and the wiki files and diary files share a directory. eg:
let wiki.diary_rel_path = './'
This change reuses existing diary functions from the diary.vim module to
get an exact list of diary files to check against.
Fixes#90
__Problem__: VimwikiRenameLink does not rename dir1/toto url in dir2/tata
because the dirs (dir2 and .) were well crossed but badly inspected.
__Solution__: `blob(.ext*)` -> `glob(**/*.ext)` + find the relative URL
* Fasten: VimwikiRenameLink goes faster with cache
More: To compute old_url regex, use a cache dict because it is the same
for files in the same directories
* Util DeleteHiddenBuffer -> do not delete Vader buffer
* Test: Prettify: Util: teardown delete defined function
* Remove unnecessary trailing spaces
Note: list_VimwikiReturn.vader has some necessary trailing spaces
Two non-stylistic errors were also fixed:
1. Removed duplicate function with invalid argument usage
2. Added missing quotes to a function call argument
Problem: Could not complete when the user argument was not the begining
of the filepath
Solution: use custom smartcase filter and customlist instead of custom
PR #634, PR #635, and PR #636 introduced new features that broke
compatibility with older version of Vim. This modifies those changes to
ensure compatibility. Closes#781.
Removes usage of funcref(), closure. Fixes filter() call.
Made globpath calls not use the list argument.
Unlet a variable that is reused (sticky type checking)
v7.4.1989 modified filter() to accept a Funcref
v7.4.2120 Added function "closure" argument
v7.4.2137 add funcref()
- Create function wrapper around lvimgrep for input checking, pattern
quoting, and error handling.
- Add Vader tests for VimwikiSearch.
- Change syntax loading from try/catch to explicit file check (to
prevent Vader test bug).
- Update doc/vimwiki.txt for changes.
- Change test script to run Vader tests separately
For markdown syntax the extension was added to the url multiple times if
the option g:vimwiki_markdown_link_ext was set which is now fixed.
Normalizing links no longer adds the extension to the description field.
Names can be used for interwiki links in the format wn.name:link.
Additionally, :VimwikiUISelect and the menu created in GVim utilize the
wiki name. Fixes#612, closes#477.
* Temporary fix for omnicomplete of vimwiki links - #456.
This fixes the omnicomplete of wiki links under Windows which were
not working since paths on Windows use '\' instead of '/'. This is
a temporary fix until path refactoring is done.
* Update changelog with description of fix for #456
This options allow third party plugins to register and enable additonal
functionality by setting the filetype to vimwiki.other_ft.other_ft2 etc.
This option should be used with care since vimwiki functionality can be
overwritten by other plugins. See Issue #461 for an example use case.
The wikilocal option links_space_char will be used to replace any spaces
when creating a new wiki link and page. This only affects link creation
with a visual selection.
Commands such as :VimwikiIndex and :VimwikiDiaryIndex did not previously
take a count and the doucmentation was inconsistent/incorrect for the
behavior of these commands. Fixes#543.
Add an option for setting the format of the links in the Table of Contents:
- Extended (the current and default)
- Brief (new format for the Vimwiki markup)
Adds a new global option named create_link, which allows the user to
control :VimwikiFollowLink behavior when attempting to follow a
non-existent link. The original behavior of creating a new link is
preserved. However, by setting this option to 0, new links will not be
created when pressing return over regular text. Closes#528.
Instead of forcing the TOC to always be at header level 1, allow the
user to specify via the option g:vimwiki_toc_header_level what level
they want.
This defaults to 1, so if the user does nothing then the old behavior
will remain the same.
This reverts commit 599a0e9083.
Sorry, we can't simply change the syntax of something as basic as a
link, even if the old syntax is wrong. We need to keep Vimwiki
reasonably backwards compatible.
Two reasons whey the links in markdown wikis are not updated:
1. The markdown link pattern is wrong, should be []() rather than [][];
2. The logic of getting wiki local var cannot get correct wiki index as:
a. the renamed file's buffer is removed and %:p would return empty
b. the function that gets the wiki local var depends on buffer's %:p
value to find the wiki it belongs to and it would always return -1
and result in the default option values instead the user's option
The fix is
1. fix the markdown link pattern regex;
2. keep the renamed file's buffer open during the period of updating the link