0

I am new to VimWiki.

I am currently taking my class notes with VimWiki, and love the organization it provides.However I want to link my SQL & c code from class to one of my classes index's, but whenever I try to link it with

[[FileName.FileType]]

It just comes out as

[[FileName.FileType.wiki]]

I also tried

[[file:\FileName.FileType]]

and it did not work in the context of being unable to open with VIM, by HTML hyperlink path showed

file:::C\VimWiki_HTML\FileName.FileType

Is there a way I can make it link to the correct file type, and through vim be able to open that file

1
  • 2
    Well, I don’t know the answer, but I feel vindicated that my personal wiki code just uses gf and permits any kind of file.
    – D. Ben Knoble
    Feb 3, 2023 at 17:23

1 Answer 1

0

but whenever I try to link it with [[FileName.FileType]] It just comes out as [[FileName.FileType.wiki]]

Vimwiki use the wiki syntax [[name]] to handle wiki files (with extension .wiki) in your wiki space (by default ~/vimwiki, so this example will look for the file ~/vimwiki/name.wiki that's all.)

Maybe there's a way to derogate that rule, I dunno (I never had that need.) But Vimwiki also supports markdown syntax, and that's what I use for external (and non-wiki) files: [filename or description](path/to/FileName.FileExtension)

I also tried [[file:\FileName.FileType]]

Yes, you can also use wiki syntax for local resources/files with appropriate prefix. But still use forward slashes, even on Windows filesystem: [[file:path/to/FileName.FileExtension]] or [[local:path/to/FileName.FileExtension]] is perhaps what you were looking for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.