Perhaps the laziest / easiest way:
:%s/'/__/g | %s/"/'/g | %s/__/"/g
Three main steps combined in one line:
- convert
' to __ (or something random) - convert
" to ' - convert
__ to "
Then combine them with | .
I'm sure some vim masters will have a better solution, but it worked for me.
source share