Welcome to Vifm Q&A, where you can ask questions about Vifm usage. Registration is optional, anonymous posts are moderated. GitHub or Google logins are enabled.
0 votes
in vifm by
edited by

I'm using windows10 and trying to open excel files when selected.

I changed vifmrc like below

" Office files
filetype *.xls,*.xlsx excel %f &

But file is opening via vim.

So, how can I open excel or office application via vifm?

1 Answer

0 votes
by

If you're using 0.10.1, you can do :file on an Excel file to see if vifm is going to run the command or skip it. Next to excel %f & there will be no [present] mark, which means that vifm didn't find excel in %PATH%.

To fix this, specify full path to the excel executable. Something like this (don't remember if .exe suffix is actually required, might be optional):

filetype *.xls,*.xlsx "c:\program file\ms office\excel.exe" %"f &

You probably need %"f instead of %f or spaces in file names might not be handled properly.

by

Thank you for your information.

I tried :file command on excel file and found that it wasn't associated to excel.It was associated to libreoffice.

I imagine that vifmrc configuration is not working and copied vifmrc from
D:\Program Files\vifm-w64-se-0.10.1-binary\data to D:\Program Files\vifm-w64-se-0.10.1-binary.

And it worked!

It was my elementary miss on understanding configuration.

Anyway your information helped me to solve the problem,thank you.

...