標籤:python 文法高亮 配置
使用python idle的人恐怕都無法忍受預設的白色背景,及其文法高亮主題。
大家更傾向於使用黑色背景。
下面介紹Obsidian, Desert, 和Tango三種主題配置
在 使用者目錄 的.idlerc 目錄下建立名為 config-highlight.cfg 檔案,並加入如下內容
[tango]definition-foreground = #fce94ferror-foreground = #fa8072string-background = #2e3436keyword-foreground = #8cc4ffnormal-foreground = #ffffffcomment-background = #2e3436hit-foreground = #ffffffbreak-foreground = #000000builtin-background = #2e3436stdout-foreground = #eeeeeccursor-foreground = #fce94fhit-background = #2e3436comment-foreground = #73d216hilite-background = #edd400definition-background = #2e3436stderr-background = #2e3436break-background = #2e3436console-foreground = #87ceebnormal-background = #2e3436builtin-foreground = #ad7fa8stdout-background = #2e3436console-background = #2e3436stderr-foreground = #ff3e40keyword-background = #2e3436string-foreground = #e9b96ehilite-foreground = #2e3436error-background = #2e3436[desert]definition-foreground = #98fb98error-foreground = #ff0000string-background = #333333keyword-foreground = #cc6600normal-foreground = #f0e68ccomment-background = #333333hit-foreground = #ffffffbreak-foreground = blackbuiltin-background = #333333stdout-foreground = #eeeeeecursor-foreground = #ffcc00hit-background = #333333comment-foreground = #87ceebhilite-background = graydefinition-background = #333333stderr-background = #333333break-background = #ffff55console-foreground = #87ceebnormal-background = #333333builtin-foreground = #519e51stdout-background = #333333console-background = #333333stderr-foreground = #ff3e40keyword-background = #333333string-foreground = #ffa0a0hilite-foreground = #000000error-background = #000000[Obsidian]definition-foreground = #678CB1error-foreground = #FF0000string-background = #293134keyword-foreground = #93C763normal-foreground = #E0E2E4comment-background = #293134hit-foreground = #E0E2E4builtin-background = #293134stdout-foreground = #678CB1cursor-foreground = #E0E2E4break-background = #293134comment-foreground = #66747Bhilite-background = #2F393Chilite-foreground = #E0E2E4definition-background = #293134stderr-background = #293134hit-background = #000000console-foreground = #E0E2E4normal-background = #293134builtin-foreground = #E0E2E4stdout-background = #293134console-background = #293134stderr-foreground = #FB0000keyword-background = #293134string-foreground = #EC7600break-foreground = #E0E2E4error-background = #293134
- 重啟IDLE,依次選 Options -> Configure IDLE -> Highlighting
- 如
著作權聲明:本文為博主原創文章,未經博主允許不得轉載。
Python 背景色與文法高亮主題配置