I use :%s/'/"/g to replace all single quotes ' with double quotes " in a plain-text file
but when I want to put this command in a vim macro in .vimrc
let @r=':%s/'/"/g'
opening vim will give me this error
E114: Missing quote: "/g'
E15: Invalid expression: ':%s/'/"/g'
Press ENTER or type command to continue
I've tried not including the surrounding single-quotes let @r=:%s/'/"/g
it still gives me a similar error.
how do I include commands with single-quotes in a vim macro?