| .vscode | ||
| images | ||
| src | ||
| test | ||
| .eslintrc.json | ||
| .gitignore | ||
| .prettierrc | ||
| .vscodeignore | ||
| ansi.language-configuration.json | ||
| CHANGELOG.md | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| yarn.lock | ||
ANSI Colors
ANSI Color styling for your text editor.
Basic usage
Select the ANSI Text language mode to highlight text marked up with ANSI escapes. Files with the .ans and .ansi extensions will be highlighted by default.
Run the ANSI Text: Open Preview command for the prettified read-only preview.
Clicking the preview icon in the editor title will open the preview in a new tab. Alt-click to open in the current tab.
The extension fetches the colors from the current theme and aims to look as good as the built-in terminal.
FAQ
-
How do I enable this extension for files other than
.ansand.ansi?This can be done using the VS Code "language mode" feature. For example, to enable it for all
.logfilesd, open a.logfile, then doF1 - Change Language Mode - Configure File Association for '.log' - ANSI Text. -
Can the "preview mode" be opened automatically?
No, it can't, not with the way the extension is currently designed, at least.
vscode-ansiuses VSCode's built-in text editors in readonly mode (viaTextDocumentContentProvider) for preview display. The only custom editors allowed to open files "by default" (e.g. by double-click) are webview-based custom editors. But building such an editor means reimplementing all the default functionality from scratch - navigation, searching, line wrap, interaction with other extensions (e.g. spell check).
Supported ANSI escape codes
Basic colors and formatting:
8-bit colors:
24-bit colors:






