Fix: use relative path when opening wiki files by jpmor · Pull Request #1450 · vimwiki/vimwiki

@brennen added need-more-info link

Related to link and path creation, modification, use [See #478]

labels

Nov 30, 2024

@jpmor

Use fnamemodify's ':.' modifier so vimwiki buffers display paths relative
to the current directory rather than absolute paths, matching standard Vim
behavior when opening files directly.

Apply fnamemodify to the raw a:filename before fnameescape, since
fnamemodify expects a literal path. Escaping first would cause incorrect
results for filenames with spaces or special characters.

@jpmor

@jpmor jpmor changed the title Use relative filename modifier. Fix: use relative path when opening wiki files

Mar 11, 2026