Provides an elegant and secure way to read library code.
The goal of this extension is to bring the feature of IntelliJ reader mode into Visual Studio Code as much as possible.
- Mark files as read-only, so you can't accidentally edit them.
- Highlight comments in a soft color, this makes it easier to distinguish between comments and code.
- Automatically open files in reader mode, out of workspace or by glob matching.
Toggle reader mode for current file:
Toggle reader mode for current workspace:
- Open the command palette and run
Reader Mode: Toggle Reader Mode for Current Workspace.
Automatically open files in reader mode:
Enable reader mode automatically for files out of the current workspace:
Enable reader mode automatically for files matching glob:
Change the comment style in reader mode, you should use the string form of valid CSS values here:
// "reader-mode.commentStyle.fontFamily": "Consolas, 'Courier New', monospace",
"reader-mode.commentStyle.backgroundColor": "rgba(255, 255, 255, 0.03)"
How It Works
This extension registers a
reader-mode file scheme, and redirects file content and most of the language features to this scheme. Hijacking files open from explorer or toggling read-only mode is just closing the original editor and opening a
- Flickering when toggling files, which is because the extension API doesn't provide a way to hijack files open.
- Evaluatable Expression in debug session doesn't work, which is because the extension API doesn't provide a way to request expression values.
If you have any ideas or suggestions, please feel free to open an issue or pull request.