I\'d like do use vim search-and-replace to replace all \" with \' and vice-versa. Is there a way to achieve this in one step? I\'m thinking of something like this:
Another approach (that's more suited to scripting) is to use the built-in tr() function. To apply it on the buffer, getline() / setline() is used:
tr()
getline()
setline()
:call setline('.', tr(getline('.'), "'\"", "\"'"))