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

I have a folder ~/.scripts in which I put a lot of my scripts without the .sh extension. I wanted to preview them with syntax highlighting and so thought of putting the following in my vifmrc :

fileviewer ~/.scripts/* hightlight -S sh -O xterm256  -s dante %c 

But it doesn't seem to work. I also tried doing the same for my ~/.vim/vimrc file but without success. Syntax highlighting works fine with other file extensions, btw.

1 Answer

0 votes

You need to use different kind of patterns, by default :fileviewer matches file name only. See the docs:

 2. [!]{{comma-separated-path-globs}}

You need something like this (I think tildes aren't expanded inside patterns):

fileviewer {{/home/nik/.scripts/*}} hightlight -S sh -O xterm256 -s dante %c 
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.

Support Ukraine