Search code examples
javascriptvisual-studio-codequotesquoting

Remove surrounded quotes in vscode or toggle between quote and no quote


Is there any shortcut or extension for vscode which can help to remove surrounded quotes (single ' or double " ) around a selected text?
See example below

'hello' ==> hello

In other words, is it possible to have a feature which will toggle current selection between quotes and no quotes?

I have tried es quotes for vscode which is very nice while switching the quotes between single and double quotes.


Solution

  • There is this extension that lets you do some tricks with selections between quotes. You can toggle between simple and double quotes, and you can select whatever is inside some quotes.

    The most approximate solution which I found is to select all with the shortcut (Ctrl+k, `), then cut, erase the quotes and then paste the text.

    That's the best I found