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:
This matches any of the two quotes (in a simpler way with [...]), and then uses the ternary operator to turn each quote into its opposite. (For more complex cases, you could use Dictionary lookups.)