0

Using Vim 9.1 32-bit on Windows 11, with Vimwiki 2.5.

I'm not sure what I might have done to cause this, but Vimwiki links to files and URLs no longer work. Examples:

Clicking on either of those, I get this message:

Error detected while processing function vimwiki#base#follow_link[75] ..
vimwiki#base#open_link[37] .. vimwiki#base#system_open_link[48] .. function
vimwiki#base#follow_link[75] .. vimwiki#base#open_link[37] ..
vimwiki#base#system_open_link[39] .. < SNR>37_win32_handler: 
line  13: 
E371: Command not found

After searching through the code, I found in ...\vimfiles\autoload\vimwiki\base.vim, line 279:

execute 'silent ! start "Title" /B ' . url

If I execute

:silent ! start "Title" /B https://usbank.com

I get "E371: Command not found", so I figured I'm on the right track. Then I tried

:silent ! cmd /c start "Title" /B https://usbank.com

and that successfully opened the link in my browser.

That's as far as I've gotten. Am I missing a file? Have I found a bug? Any help appreciated. FWIW, this problem is on my work PC, but I am pretty sure I'm using the same version of Vim and Vimwiki on my home laptop, and have no issues there.

6
  • GVim or in a terminal? Commented Jun 27, 2024 at 1:19
  • I can reproduce the problem on Windows 10. I believe it is related to the way the system() call create the process. silent !start https://usbank.com seems to work fine for me. Commented Jun 27, 2024 at 4:48
  • Use the plugin's issue tracker. Commented Jun 27, 2024 at 6:40
  • ... and then create a pull request with the solution you found. Commented Jun 27, 2024 at 7:25
  • 4
    Don't add "Answered" in the title : use the checkmark beside the correct answer. Commented Jun 27, 2024 at 14:50

1 Answer 1

0

I suppose it is indeed a bug in vimwiki.

I would propose to replace:

execute 'silent ! start "Title" /B ' . url

By

execute 'silent' '! cmd /c start "Title" /B ' . url

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.