Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display ANSI colours in text file in PyCharm

I have a .txt file with some escape codes to show colour like this:

[0m[32mWord[0m

Is there a way I can view these files with colour in PyCharm? I tried the ANSI Highlighter Plugin but it seems to be defunct.

Just converting to a *.log or *.md file didn't help either.

like image 770
Pan Dango Avatar asked Aug 31 '25 01:08

Pan Dango


1 Answers

The ANSI Highlighter Premium plugin works (but it is not free). You may need to enable it for the file types you want to display with ANSI colours.

I didn't bother to change the configuration for .txt files, so I copied a .txt file containing ANSI colour codes to a file with the extension .log. Then PyCharm notified me that the file type was recognised by the plugin and asked whether I wanted to enable it. After enabling, colours are displayed just fine.

like image 123
Dag Høidahl Avatar answered Sep 03 '25 17:09

Dag Høidahl