Last Updated: February 25, 2016
·
7.767K
· carleeto

Notepad++ sublime text theme for C/C++

Get the original XML file from http://waher.net/archives/1013

Open it up and add in these two lexer sections. This is still a work in progress and the colors aren't perfect matches, but they're close enough for me :)

I also changed the background color from original xml file to bgColor="272822" because that matched sublime text 2 better.

Finally, I found using the Consolas font (http://www.microsoft.com/en-nz/download/details.aspx?id=17879) also helped a lot.

<LexerType name="c" desc="C" ext="">
    <WordsStyle name="PREPROCESSOR" styleID="9" fgColor="FBDE2D" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="DEFAULT" styleID="11" fgColor="F8F8F8" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="INSTRUCTION WORD" styleID="5" fgColor="FBDE2D" bgColor="272822" fontName="" fontStyle="0" fontSize="10" keywordClass="instre1" />
    <WordsStyle name="TYPEWORD" styleID="16" fgColor="FBDE2D" bgColor="272822" fontName="" fontStyle="0" fontSize="10" keywordClass="type1" />
    <WordsStyle name="NUMBER" styleID="4" fgColor="D8FA3C" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="STRING" styleID="6" fgColor="61CE3C" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="CHARACTER" styleID="7" fgColor="61CE3C" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="OPERATOR" styleID="10" fgColor="FBDE2D" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="VERBATIM" styleID="13" fgColor="D8FA3C" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="REGEX" styleID="14" fgColor="61CE3C" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="COMMENT" styleID="1" fgColor="AEAEAE" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="COMMENT LINE" styleID="2" fgColor="AEAEAE" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="COMMENT DOC" styleID="3" fgColor="AEAEAE" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="COMMENT LINE DOC" styleID="15" fgColor="AEAEAE" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="COMMENT DOC KEYWORD" styleID="17" fgColor="AEAEAE" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="COMMENT DOC KEYWORD ERROR" styleID="18" fgColor="AEAEAE" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
</LexerType>
<LexerType name="cpp" desc="C++" ext="">
    <WordsStyle name="PREPROCESSOR" styleID="9" fgColor="FB376D" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="DEFAULT" styleID="11" fgColor="F8F8F8" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="INSTRUCTION WORD" styleID="5" fgColor="FFFFFF" bgColor="272822" fontName="" fontStyle="0" fontSize="10" keywordClass="instre1" />
    <WordsStyle name="TYPE WORD" styleID="16" fgColor="80FFFF" bgColor="272822" fontName="" fontStyle="2" fontSize="10" keywordClass="type1" />
    <WordsStyle name="NUMBER" styleID="4" fgColor="AD84FB" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="STRING" styleID="6" fgColor="FFEA6F" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="CHARACTER" styleID="7" fgColor="61CE3C" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="OPERATOR" styleID="10" fgColor="FFFFFF" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="VERBATIM" styleID="13" fgColor="D8FA3C" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="REGEX" styleID="14" fgColor="61CE3C" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="COMMENT" styleID="1" fgColor="B4B467" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="COMMENT LINE" styleID="2" fgColor="847D5B" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="COMMENT DOC" styleID="3" fgColor="847D5B" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="COMMENT LINE DOC" styleID="15" fgColor="847D5B" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="COMMENT DOC KEYWORD" styleID="17" fgColor="847D5B" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
    <WordsStyle name="COMMENT DOC KEYWORD ERROR" styleID="18" fgColor="4D6600" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
</LexerType>

1 Response
Add your response

You can get the contents of the entire modified XML file here: http://pastebin.com/3FfkpECL

Save it in the themes folder in your Notepad++ install location.

over 1 year ago ·