Skip to content

Instantly share code, notes, and snippets.

@MisaghM
Created March 7, 2022 15:41
Show Gist options
  • Save MisaghM/5848abc474477538bfb2467822ada12b to your computer and use it in GitHub Desktop.
Save MisaghM/5848abc474477538bfb2467822ada12b to your computer and use it in GitHub Desktop.
Snippet to swap single and double quotes.

Add to global snippets. (command palette > configure user snippets)
Select the text you want, write QuoteSwap and enter/tab to apply.

"QuoteSwap": {
    "prefix": "QuoteSwap",
    "body": "${TM_SELECTED_TEXT/(')|(\")/${1:+\"}${2:+'}/g}",
    "description": "Swap single and double quotes."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment