Xcode的代碼編輯器是可以進(jìn)行主題設(shè)置的继找,如果是白色背景一般會(huì)比較傷眼喘帚,所以都會(huì)修改一些主題。
在Xcode菜單欄中進(jìn)行偏好設(shè)置恨狈,可以設(shè)置Fonts&Colors,它會(huì)提供一些現(xiàn)有的主題介返,可以對(duì)現(xiàn)有的主題進(jìn)行顏色拴事、字體大小的設(shè)置:
也可以自行進(jìn)行設(shè)置沃斤,或者下載其他人設(shè)置好的主題文件,導(dǎo)入到Xcode中去刃宵。比如我這個(gè)主題:
主題文件都是xml寫的衡瓶,內(nèi)容在文末可以直接復(fù)制,新建一個(gè)文件命名為Monokai.dvtcolortheme牲证,將文末的xml內(nèi)容復(fù)制進(jìn)去就可以了哮针。
然后將這個(gè)主題文件放到Xcode的主題文件夾中,這個(gè)文件夾通過終端來打開比較方便坦袍,路徑是:~/Library/Developer/Xcode/UserData/FontAndColorThemes/
放進(jìn)去后重啟一下Xcode十厢,就可以在偏好設(shè)置中看到他了,選中就可以了捂齐,我習(xí)慣將所有文字大小都調(diào)成18蛮放,比較大,看起來對(duì)眼睛好一些奠宜,也可以把背景調(diào)成護(hù)眼色(色調(diào):55包颁,飽和度:123,亮度:205压真,紅:199娩嚼,綠:237,藍(lán):204)滴肿。
主題內(nèi)容:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0.973 0.973 0.941 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Menlo-Regular - 12.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0.973 0.973 0.941 1</string>
<key>DVTConsoleDebuggerOutputTextFont</key>
<string>Menlo-Regular - 12.0</string>
<key>DVTConsoleDebuggerPromptTextColor</key>
<string>0.973 0.973 0.949 1</string>
<key>DVTConsoleDebuggerPromptTextFont</key>
<string>Menlo-Regular - 12.0</string>
<key>DVTConsoleExectuableInputTextColor</key>
<string>0.973 0.973 0.941 1</string>
<key>DVTConsoleExectuableInputTextFont</key>
<string>Menlo-Regular - 12.0</string>
<key>DVTConsoleExectuableOutputTextColor</key>
<string>0.973 0.973 0.949 1</string>
<key>DVTConsoleExectuableOutputTextFont</key>
<string>Menlo-Regular - 12.0</string>
<key>DVTConsoleTextBackgroundColor</key>
<string>0.153 0.157 0.133 1</string>
<key>DVTConsoleTextInsertionPointColor</key>
<string>0.973 0.973 0.941 1</string>
<key>DVTConsoleTextSelectionColor</key>
<string>0.219608 0.219608 0.188235 1</string>
<key>DVTDebuggerInstructionPointerColor</key>
<string>0.705792 0.8 0.544 1</string>
<key>DVTSourceTextBackground</key>
<string>0.153 0.157 0.133 1</string>
<key>DVTSourceTextBlockDimBackgroundColor</key>
<string>0.153 0.157 0.133 1</string>
<key>DVTSourceTextInsertionPointColor</key>
<string>0.973 0.973 0.941 1</string>
<key>DVTSourceTextInvisiblesColor</key>
<string>0.153 0.157 0.133 1</string>
<key>DVTSourceTextSelectionColor</key>
<string>0.219608 0.219608 0.188235 1</string>
<key>DVTSourceTextSyntaxColors</key>
<dict>
<key>xcode.syntax.attribute</key>
<string>0.4 0.851 0.937 1</string>
<key>xcode.syntax.character</key>
<string>0.682 0.506 1 1</string>
<key>xcode.syntax.comment</key>
<string>0.459 0.443 0.369 1</string>
<key>xcode.syntax.comment.doc</key>
<string>0.459 0.443 0.369 1</string>
<key>xcode.syntax.comment.doc.keyword</key>
<string>0.459 0.443 0.369 1</string>
<key>xcode.syntax.identifier.class</key>
<string>0.651 0.886 0.18 1</string>
<key>xcode.syntax.identifier.class.system</key>
<string>0.4 0.851 0.937 1</string>
<key>xcode.syntax.identifier.constant</key>
<string>0.651 0.886 0.18 1</string>
<key>xcode.syntax.identifier.constant.system</key>
<string>0.4 0.851 0.937 1</string>
<key>xcode.syntax.identifier.function</key>
<string>0.651 0.886 0.18 1</string>
<key>xcode.syntax.identifier.function.system</key>
<string>0.4 0.851 0.937 1</string>
<key>xcode.syntax.identifier.macro</key>
<string>0.992 0.592 0.122 1</string>
<key>xcode.syntax.identifier.macro.system</key>
<string>0.992 0.592 0.122 1</string>
<key>xcode.syntax.identifier.type</key>
<string>0.651 0.886 0.18 1</string>
<key>xcode.syntax.identifier.type.system</key>
<string>0.4 0.851 0.937 1</string>
<key>xcode.syntax.identifier.variable</key>
<string>0.651 0.886 0.18 1</string>
<key>xcode.syntax.identifier.variable.system</key>
<string>0.4 0.851 0.937 1</string>
<key>xcode.syntax.keyword</key>
<string>0.976 0.149 0.447 1</string>
<key>xcode.syntax.number</key>
<string>0.682 0.506 1 1</string>
<key>xcode.syntax.plain</key>
<string>0.973 0.973 0.949 1</string>
<key>xcode.syntax.preprocessor</key>
<string>0.976 0.149 0.447 1</string>
<key>xcode.syntax.string</key>
<string>0.902 0.859 0.455 1</string>
<key>xcode.syntax.url</key>
<string>0.459 0.443 0.369 1</string>
</dict>
<key>DVTSourceTextSyntaxFonts</key>
<dict>
<key>xcode.syntax.attribute</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.character</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.comment</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.comment.doc</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.comment.doc.keyword</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.identifier.class</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.identifier.class.system</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.identifier.constant</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.identifier.constant.system</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.identifier.function</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.identifier.function.system</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.identifier.macro</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.identifier.macro.system</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.identifier.type</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.identifier.type.system</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.identifier.variable</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.identifier.variable.system</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.keyword</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.number</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.plain</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.preprocessor</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.string</key>
<string>Menlo-Regular - 12.0</string>
<key>xcode.syntax.url</key>
<string>Menlo-Regular - 12.0</string>
</dict>
</dict>
</plist>