You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case where I mix Markdown and YAML files in the same wiki. This can be enabled by setting g:wiki_filetypes = ['md', 'yaml'] so that wiki.vim gets enabled in both types of files.
The problem with this is that the link completion function (which I guess is defined in complete.vim) provides only completion suggestions for files of the same type as the current file. That is, when triggering the completion in a Markdown files, only Markdown files are suggested and when triggering completion in a YAML file, only YAML files are suggested.
This stands in contrast to WikiPages which returns all files of the types defined in g:wiki_filetypes, that is, it returns all Markdown and YAML files in the wiki.
I would like the link completion to include all wiki files (as returned by WikiPages) and not only the files of the same type as the current file. Is there some way to achieve this?
Minimal working example
Consider the following wiki with g:wiki_filetypes = ['md', 'yaml']:
When triggering the link completion in markdown1.md, the suggestions include only markdown1.md and markdown2.md. When triggering link completion in yaml1.yaml, the suggestions include only yaml1 and yaml2. The WikiPages command in both cases includes markdown1, markdown2, yaml1, and yaml2.
The text was updated successfully, but these errors were encountered:
Fascinating. This is a use case I never thought of.
In my view, a yaml file should represent data, somehow - not text. And so, it should be a file: url, not a wiki url. That is, I would have expected a link like <file:yaml1.yaml> or [my yaml file](file:yaml1.yaml) in this particular case.
I do notice that e.g. GitHub will consider [foo](bar.yaml) as a link to the file bar.yaml in the same directory as the current file. I assume this is "general", i.e. [foo](file) will open file regardless of the extension.
For wiki.vim, it still makes sense to differ between the schemes here, as it makes it easier to handle things. But OK, given the g:wiki_filetypes setting, the links already work as expected already. And I think I can see how you would want completion to work similarly.
Description
I have a use case where I mix Markdown and YAML files in the same wiki. This can be enabled by setting
g:wiki_filetypes = ['md', 'yaml']
so that wiki.vim gets enabled in both types of files.The problem with this is that the link completion function (which I guess is defined in
complete.vim
) provides only completion suggestions for files of the same type as the current file. That is, when triggering the completion in a Markdown files, only Markdown files are suggested and when triggering completion in a YAML file, only YAML files are suggested.This stands in contrast to
WikiPages
which returns all files of the types defined ing:wiki_filetypes
, that is, it returns all Markdown and YAML files in the wiki.I would like the link completion to include all wiki files (as returned by
WikiPages
) and not only the files of the same type as the current file. Is there some way to achieve this?Minimal working example
Consider the following wiki with
g:wiki_filetypes = ['md', 'yaml']
:When triggering the link completion in
markdown1.md
, the suggestions include onlymarkdown1.md
andmarkdown2.md
. When triggering link completion inyaml1.yaml
, the suggestions include onlyyaml1
andyaml2
. TheWikiPages
command in both cases includesmarkdown1
,markdown2
,yaml1
, andyaml2
.The text was updated successfully, but these errors were encountered: