Welcome to Vifm Q&A, where you can ask questions about using Vifm. Registration is optional, anonymous posts are moderated. E-mail and GitHub logins are enabled.
0 votes
in vifm by

When I use this key binding

nnoremap <silent> \yf :!echo %f:p | tr ' ' '\n' | head -c -1 | xclip -in -selection clipboard<cr>

vifm kind of jumps, it briefly shows the terminal and come back.

Is there an explanation for this n any potential solution to fix this?
Thank you

1 Answer

0 votes
by
selected by
 
Best answer

Vifm doesn't know beforehand what kind of command you're running and temporarily turns of UI so it doesn't get garbled or affects the command. Use %i macro in cases where you don't care about command's output.

By the way, there is a better way of adding newlines which isn't sensitive to file names with spaces:

nnoremap <silent> \yf :!head -c -1 %Pl | xclip -in -selection clipboard %i<cr>
by

Great, thank you!

...