-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Add more granularity to _pyrepl syntax theming for "keywords" #134953
Copy link
Copy link
Closed
Labels
3.14bugs and security fixesbugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shellRelated to the interactive shelltriagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.type-featureA feature request or enhancementA feature request or enhancement
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shellRelated to the interactive shelltriagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.type-featureA feature request or enhancementA feature request or enhancement
Feature or enhancement
Proposal:
I made a custom
_colorizetheme to try making my REPL syntax highlighting look similar to my text editor's.This is the theme I used:
I then used this example code to check the highlighting between the two:
Pasting that code in my text editor (vim), looks like this:
Pasting the same code in the REPL, looks like this:
The granularity with syntax highlighting needs to stop somewhere, but I feel it would be nice to add a bit more granularity than is currently supported by
_colorize.In particular, it would be nice to distinguish between:
if,is,def,for,with, etc.)True,False,None)from,import)I feel that distinguishing between 1 and 2 is more important than between 1 and 3. While
Noneis a keyword, seeing it appear in the same color asisand other keywords feels odd.Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
True/False/None#135000True/False/None(GH-135000) #138928