vifm / vifm.vim

Vim plugin that allows use of vifm as a file picker
335 stars 19 forks source link

On Windows, "Got non-zero code from vifm: 255" #29

Closed Melandel closed 5 years ago

Melandel commented 5 years ago

Hello!

I work on Windows with vim8.1 (including patch 1-2197) inside a Powershell terminal (through Windows Terminal) run as Administrator.

I get the error "Got non-zero code from vifm: 255" whenever I try any vifm.vim command from within vim.

I noticed some messages appearing for a split second, indicating "Specified file was not found".

I have put the folder containing vifm.exe in the global Path.

My vimrc does not have any line related to vifm.

It has the same problem if I run vim from a simple cmd.

If I run vifm from the command line, it works. Same for :!vifm from vim.

How can I call :Vifm %:h from within vim without an error ?

Melandel commented 5 years ago

I found the issue.

I had a line in my vimrc: set shell=pwsh.exe\ --NoLogo

I think it messed with the calls to tempname() (a story of forwarded slashes).

Commenting out that line in my vimrc solves the problem. I think adding the right 'shellslash', or having the 'shellcmdflag' start with a '-' might also work.