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 put these 4 lines of code in my vifmrc:

fileviewer {.csv,.docx,.odt,.rtf} pandoc -t markdown %c
fileviewer .doc catdoc %c
fileviewer .xls xls2csv %c | pandoc -f csv -t markdown
fileviewer .xlsx xlsx2csv %c | pandoc -f csv -t markdown

But when I have selected a file in vifm, the files are not properly previewed. What have I done wrong?

1 Answer

+1 vote
by
selected by
 
Best answer

You need to use an asterisk to match by extension, .doc will match only ".dot". This should work:

fileviewer *.csv,*.docx,*.odt,*.rtf pandoc -t markdown %c
fileviewer *.doc catdoc %c
fileviewer *.xls xls2csv %c | pandoc -f csv -t markdown
fileviewer *.xlsx xlsx2csv %c | pandoc -f csv -t markdown
If you would like to make a bug report or feature request consider using GitHub, SourceForge or e-mail. Posting such things here is acceptable, but this is not a perfect place for them.
...