camouflage
Camouflage hides the values in configuration files inside VS Code and leaves the keys where they are, so you can share your screen, record or take a screenshot without an .env file giving its secrets away. camouflage.nvim does the same for Neovim.
It reads .env files (and .env.*, *.env, .envrc), shell scripts, JSON, YAML, .properties, .ini, .conf and TOML. In JSON and YAML it follows nested keys like database.password, and in TOML the sections. Multi-line values are hidden too: YAML block scalars, TOML triple-quoted strings, .env line continuations and PEM keys.
Install
Open VS Code, press Cmd+P (Ctrl+P on Windows and Linux) and run:
ext install zeybek.camouflageIt needs VS Code 1.96 or newer, and it's on the Marketplace.
Using it
Values are hidden as soon as you open a supported file. The status bar says whether Camouflage is on, off or selective, and clicking it turns hiding on and off. Right-click in the editor for the Camouflage menu: reveal one value, exclude a key, switch to selective mode, where only the keys matching your patterns are hidden, or stop hiding in the current file.
The hidden text is ************************ by default. It can also be dots, stars, a shuffle of the real characters, or a pattern of your own like ###, and hovering can preview a value if you turn that on. It's written in TypeScript, under the MIT licence.