11

When I open a log file in VS Code, it automatically colors words like "INFO" and "WARN". However, if there are ANSI colors inserted into the file, it can't parse it correctly and shows the following:

ANSI colors

Is there a way to correctly show the ANSI colors or atleast hide those characters so they don't get in the way?

Ryu S.
  • 1,538
  • 2
  • 22
  • 41
  • 2
    Asked and answered here [Can I display a file with ANSI color escape sequences in Visual Studio Code?](https://stackoverflow.com/a/67651122/418950). **YES.** _Properly use_ the [ANSI Colors plugin](https://marketplace.visualstudio.com/items?itemName=iliazeus.vscode-ansi) – ScottWelker Jan 05 '22 at 19:39

1 Answers1

3

I'm afraid not, there is no ansi escape sequence support in the editors. See https://github.com/microsoft/vscode/issues/38834

It was added to the Backlog though so there is some hope. Upvote the issue!

As for hiding, the new Column Selection Mode in v1.43 might work for you to delete all that if it is as neatly formatted as your example text. See Column selection like Visual Studio

Mark
  • 143,421
  • 24
  • 428
  • 436