populate_extra_markdown_vars() contained uses of the file-extension via vimwiki#vars#get_wikilocal. Since the first is syntax-wide and the second is wikilocal and no wiki is specified or open at the moment of the call, the file extension of the first markdown wiki will be used for all markdown wikis. Further problems will occur when adding new wikilocal options, that depend on the syntax.
This commit is working towards separating wiki and syntax, which is needed for several feature requests.
The following commands have been renamed to better describe their
function and avoid confusion.
:VimwikiDeleteLink → :VimwikiDeletePage
:VimwikiRenameLink → :VimwikiRenamePage
:VimwikiGenerateTags → :VimwikiGenerateTagLinks (was already renamed in 3b5537f)
Calling the old commands still works but displays a warning message.
The MathJax.js file doesn't exist anymore in the MathJax repository and
the script that should be loaded is tex-chtml.js.
This update the helpfile to reflect this change.
This change reverts the original regex and simply adds a second regex
which is called on the result. '/\./' is one literal forward slash, one
literal fullstop (escaped with a leading backslash), and one literal
forward slash. In plain text, `/./` will be replaced with `/`.
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