I'm trying to yank current selected filenames:
vnoremap yf :!echo -n %f | xclip -selection clipboard %i<cr>:echo "filenames yanked to clipboard"<cr>
But when the expansion of %f macro happens, it uses a single space as a separator. I want to change that separator. I tried using --delimiter option but it didn't work.
I know I could replace the space with a \n using sed, but what if the filenames themselves have a space?
I couldnt find anything about this on the manual.
That separator is not configurable, but you can use printf for formatting (tail is to avoid extra empty line):
vnoremap yf :!printf "\n%%s" %f:p | tail -c+2 | xclip -selection clipboard %i<cr>:echo "filenames yanked to clipboard"<cr>