Ever wanted to paste some text into an AI program, share a code snippet, or post on a forum, but it contained keywords or sensitive information you'd rather keep private? With the Obfuscator Extension for Visual Studio Code, you can quickly and easily replace words in your text right within your favorite editor.
Features
Case Sensitivity: Choose whether your search is case sensitive or not.
Bulk Replacement: Replace multiple words at once using a simple, intuitive format.
Installation
Open your Visual Studio Code.
Go to the Extensions view by clicking on the square icon on the sidebar.
Search for "obfuscator".
Click "Install".
Usage
Open the command palette (Ctrl+Shift+P) and type "Obfuscate: Configure" and hit Enter.
This will open the obfuscator.json file located in the .vscode directory.
Edit the file to define your obfuscation rules. The structure of the file is as follows:
{
"caseSensitive": false, // Set to true if replacements should be case-sensitive
"rules": {
"realOrgName": "organization", // Replace "realOrgName" with "organization"
"projectName": "project" // Replace "projectName" with "project"
}
}
Save the file and highlight the text you wish to obfuscate in your active editor.
Open the command palette (Ctrl+Shift+P) and type "Obfuscate" and hit Enter.
Error Handling
If no text is highlighted, the command will fail with an error message prompting you to select text.
If the obfuscator.json file does not exist, it will be created with default dummy content and opened for editing.