Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Super Replace - Translate, text process and more, with infinite possibilitiesNew to Visual Studio Code? Get it now.
Super Replace - Translate, text process and more, with infinite possibilities

Super Replace - Translate, text process and more, with infinite possibilities

jebbs

|
6,838 installs
| (2) | Free
Do translations and any text transformations with regex replace!
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Super Replace

Do translations and any text transformations with regex replace!

Features

Super Replace is an advanced regex replace tool which allows you specify additional text processing function when replace.

Demo 1: Translate matched texts to Chinese.

gtrans

Demo 2: Extract option texts from HTML source code, and convert them to lower case.

extract

Quick Tutorial

Replace Tutorial

To open the Super Replace tool, find and exectue command Super Replace: Open Replace Window....

We know that, with regexp replace, we can use $<index> like $0, $1 in replace text, which means whole match ($0), or first sub match ($1).

Super Replace extends the capability by using $$<index> like $$0, $$1, which means processed whole match ($$0), or processed first sub match ($$1).

The foregoing processed matches are outputs of the function given here. It recieve sub matches as input, and could be either "(texts: string[])=>strings[]" or "(text: string)=>string".

For example, find \w+ replace $$0 function s=>s.toUpperCase() will transform words in the document to upper case.

Extract Tutorial

Extract action keeps only replaced texts in the document, it's useful for extracting content from mass texts.

Requirements

If you want to translate, you need a Google Cloud Translate API Key file and configurate the path to superReplace.googleApiKeyFile. See Google Could Translation Setup for more infomation.

Reference: Language Support by Google Translate

Extension Settings

superReplace.googleApiKeyFile: The Google API key needed by the gtranslate function.

Known Issues

Please post and view issues on GitHub


Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft