Issue
Problem definition
I use IPython on Windows Powershell. For some reason the color of string literals is unreadably dark red:
For comparison, here is how it looks on VSCode, using powershell "shell" and Ipython:
Question
IPython certainly uses some commands to tell the shell the color to be used. How can I modify the string literal color to be lighter red? I would like this to be computer-wide (or at least user-wide) setting.
Solution
I have found a way to set individual colors. In ipython_config.py
(see other answer if you don't know how to get there), you will find a commented entry c.TerminalInteractiveShell.highlighting_style_overrides
.
Uncomment that entry and set a color for the String token to your liking:
## Override highlighting format for specific tokens
from pygments.token import Token
c.TerminalInteractiveShell.highlighting_style_overrides = {Token.String: '#009999'}
This makes strings readable again!
Answered By - Christoph
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.