I put together this:
set statusline+=" files copied: %{extcached('yanked',
\ expand('%r'),
\ expand('bash mYank.sh %r'))} "
My objective is to show the number of yanked files in statusbar. So, I wrote a script to count the number of inputs (%r
). I am also using %r
to invalidated the cache when the yanked files are changed. It shows the full path to all yanked files on statusbar. It also executes the script ever time cursor moves.
Can it be changed so that it does not print yanked items on statusbar, and also only triggers the script when the yanked items are changed?