Hi,
My question is how to change the current format for yanking Folder-paths & Filenames without the trailing spaces and new line for vifm on Windows PC using the "clip" command?
You can remove spaces from the command, for example turn this
nnoremap yp :!echo %"d %i | clip<cr>
into
nnoremap yp :!echo %"d%i| clip<cr>
The stupid echo
on Windows preserves spaces.
I don't think it's possible to get rid of newline, there is no switch for echo
(like -n
). I think this requires some other program to do it (one-liner in any scripting language installed on your machine should do).
Also, as a side note with using vifm yank in Windows PC is copying to clipboard with forward slashes isn't working even when following this link.
Yeah, it either stopped working at some point or never worked with cmd.exe
and was something I used with bash
. If you double \
after :gs
, it will "work" by leaving two forward slashes. Escaping on Windows is hell... and must be the reason behind this.