In my vimrc, I have a shortcut to copy the filename with its path to the clipboard.
:nmap cp :let @* = expand("%")
This works fine. Now, I want to replace the contents of this yanked text to
1) replace \ with /
2) remove certain words from the yanked text.
I am familiar with search and replace on regular text but I don't know how to change my vimrc entry to do this every time on the yanked text when I use my shortcut.
So, something like this?
:nmap cp :let @* = expand("%") || %s/\\/\/ || %s/<word>//
I am using gvim on windows.