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

Hello,
I'm using Vifm on Windows 11 + Neovim and it's a great tool!
q#1
I have problem because some of the commands from default .vifmrc are not working.
e.g.
command! zip zip -r %c.zip %f
Is it possible to use some of CMDLETS in the console line or .vifmrc file
e.g.
command! zip Compress-Archive %a
Is there any alternative solutions/command that can zip/unzip files on Windows

q#2
I installed Vifm with Chocolatey, the path is C:\Users\Username\Roaming\Vifm) and I have a problem with setting syntax highlighting in the new windows terminal.
fileviewer *.html,*.go,*.css,*.ps1,*.md highlight -O xterm256 -s dante %c
I found a similar question on GitHub, and tried something like this $MYVIFMRC = "C:\Users\UserName\Roaming\Vifm\vifmrc"
but without success. Any tip on how to solve this?

1 Answer

0 votes
by

Hi,

Is there any alternative solutions/command that can zip/unzip files on Windows

Chocolatey probably has zip/unzip commands in some of its packages. You can also try:

command! zip powershell Compress-Archive %a

or do set shell=powershell shellcmdflag=-c, which might work, but I'm not sure how well.

q#2

Do echo $MYVIFMRC in Vifm to see which file you need to edit.

Then run fileviewer test.html to see what associations were actually defined and whether command was recognized (will be marked [present]).

by

Thanks a lot, Xaizek, all works great!!!

I need one more thing to set. I read your instructions and installed sed via Choco. Command written bellow works great for finding files. I would like to have something similar for finding only directories so that I can easily jump to them.
Is there any easy way to accomplish that?

Powershell+FZF - wiki.vifm.info

command! Find :execute 'goto' fnameescape(term('fzf | sed.exe -b -e "s/\\/\//g"'))
nnoremap gtg :Find<space>
nnoremap gtl :Find<cr>
by

I didn't write most of that Wiki page and never used fzf, so might not help a lot. I'm not sure fzf can list only directories, usually output of find is piped to fzf to list them.

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.
...