Skip to content

just4t/vscode-secretlens

 
 

Repository files navigation

SecretLens

Installs Rating


WARNING

Version 2.0.0 breaks compatibility with current encrypted messages unless you follow what is the steps described in Keep the previous behavior


A CodeLens/Hover provider that automatically decrypts identified text and show as a CodeLens/Hover.

What does this extension do?

Encrypt/decrypt text within the file.

How?

Encrypting accepts your selection, or hole line if no selection, encrypts it and replaces with the fenced block ${token}<your text>${endToken} (token/endToken are configurable)

Decrypting search for the fenced block and then replaces by the plain text.

The fenced block is the default behavior because of this limitation.

Keep the previous behavior

  1. Set Token to secretlens:
  2. Set End token to empty string or null
  3. Set Exclude end option to true

Extension Commands

Command Description
Encrypt Encrypt the text and replaces with ${token}<encrypted text>${endToken}
Decrypt Decrypt the fenced block and replaces with <decrypted text>
Set password Set a new password
Forget password Clears the current password
Copy secret Copy the selected secrets decrypted to clipboard separated by Copy separator

Extension Settings

Setting Description Default Value
Token Token for identifying the begining of encrypted text <sl:
End token Token for identifying the end of encrypted text :sl>
Exclude end Should include the end fence when encrypting texts false
Copy separator Separator for when copying multiple secrets \n
Languages Languages in which SecretLens will run ALL
Remember period How many seconds the password will be remembered before being erased from cache -1 (forever)

If you like this extension, please consider donate and/or take a moment to write a review and share on Facebook or Twitter