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

3
  • 3
    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. Commented Feb 3, 2023 at 17:23
  • @D.BenKnoble you saved my day! Commented Aug 16, 2024 at 3:58
  • 1
    Personal wiki code, for reference: github.com/benknoble/wiki-md (@EricSun) Commented Aug 16, 2024 at 18:03

1 Answer 1

1

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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.