vscode-string-manipulation
vscode-string-manipulation copied to clipboard
Feature request: convert single quotes to double quotes and vice-versa
The ability to convert '
characters to "
and vice versa would be very nice!
Oh good call. This can get tricky when single quotes are inside double and vv.
Two options for actions:
- A single action that swap all quotes with their counter part so
"foo is 'bar'"
would be updated to'foo is "bar"'
- Two actions where only single get swapped or double get swapped.
- BONUS: Do 1 and 2 :)
What do you think @minalike?
For my needs, I only need option 1! 😄
My use case scenario is: I'll have a long list of strings (think of an output of df.columns
from pandas) that I'll copy/paste into my editor. Pandas uses single quotes, but I prefer double quotes.
One thing you'll have to think of is the desired behavior when you're starting from "my name's minalike"
- in this scenario I would want the output to be 'my name\'s minalike'
since in that context '
is an apostrophe, not a paired quote.
Got it. Alright let me sit on this one a bit and see if there's more interest in this too.
Hey @minalike I'll get to this this week.
Awesome!