Skip to content

Instantly share code, notes, and snippets.

@ofurkusi
Created October 14, 2016 14:27
Show Gist options
  • Save ofurkusi/721774887f542e99cb7c500da500a785 to your computer and use it in GitHub Desktop.
Save ofurkusi/721774887f542e99cb7c500da500a785 to your computer and use it in GitHub Desktop.
Todo.txt syntax highlighting for Notepad++
<NotepadPlus>
<UserLang name="Todo.txt" ext="Todo.txt" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="2" decimalSeparator="0" />
<Prefix Keywords1="yes" Keywords2="yes" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00x 01 02((EOL)) 03 04</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
<Keywords name="Numbers, extras1"></Keywords>
<Keywords name="Numbers, extras2"></Keywords>
<Keywords name="Numbers, suffix1">-</Keywords>
<Keywords name="Numbers, suffix2"></Keywords>
<Keywords name="Numbers, range">-</Keywords>
<Keywords name="Operators1">(E) (F) (G) (H) (I) (J) (K) (L) (M) (N) (O) (P) (Q) (R) (S) (T) (U) (V) (W) (X) (Y) (Z)</Keywords>
<Keywords name="Operators2"></Keywords>
<Keywords name="Folders in code1, open"></Keywords>
<Keywords name="Folders in code1, middle"></Keywords>
<Keywords name="Folders in code1, close"></Keywords>
<Keywords name="Folders in code2, open"></Keywords>
<Keywords name="Folders in code2, middle"></Keywords>
<Keywords name="Folders in code2, close"></Keywords>
<Keywords name="Folders in comment, open"></Keywords>
<Keywords name="Folders in comment, middle"></Keywords>
<Keywords name="Folders in comment, close"></Keywords>
<Keywords name="Keywords1">+</Keywords>
<Keywords name="Keywords2">@</Keywords>
<Keywords name="Keywords3">WAIT</Keywords>
<Keywords name="Keywords4"></Keywords>
<Keywords name="Keywords5"></Keywords>
<Keywords name="Keywords6"></Keywords>
<Keywords name="Keywords7"></Keywords>
<Keywords name="Keywords8"></Keywords>
<Keywords name="Delimiters">00(A 01 02) 03(B 04 05) 06(C 07 08) 09(D 10 11) 12DUE 13 14: 15 16 17 18 19 20 21 22 23</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" fgColor="657B83" bgColor="FDF6E3" colorStyle="0" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="268BD2" bgColor="FDF6E3" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="93A1A1" bgColor="FDF6E3" colorStyle="1" fontName="" fontStyle="2" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="6C71C4" bgColor="FDF6E3" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="B58900" bgColor="FDF6E3" colorStyle="1" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="268BD2" bgColor="FDF6E3" colorStyle="1" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="D33682" bgColor="FDF6E3" colorStyle="1" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="000000" bgColor="FDF6E3" colorStyle="1" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FDF6E3" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FDF6E3" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FDF6E3" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FDF6E3" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="8000FF" bgColor="FDF6E3" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FDF6E3" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FDF6E3" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FDF6E3" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="DC322F" bgColor="FDF6E3" colorStyle="1" fontName="" fontStyle="0" nesting="67116048" />
<WordsStyle name="DELIMITERS2" fgColor="CB4B16" bgColor="FDF6E3" colorStyle="1" fontName="" fontStyle="0" nesting="67116048" />
<WordsStyle name="DELIMITERS3" fgColor="B58900" bgColor="FDF6E3" colorStyle="1" fontName="" fontStyle="0" nesting="67116048" />
<WordsStyle name="DELIMITERS4" fgColor="859900" bgColor="FDF6E3" colorStyle="1" fontName="" fontStyle="0" nesting="67116048" />
<WordsStyle name="DELIMITERS5" fgColor="D33682" bgColor="FDF6E3" colorStyle="1" fontName="" fontStyle="1" nesting="0" />
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FDF6E3" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FDF6E3" fontName="" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS8" fgColor="008000" bgColor="FDF6E3" fontName="" fontStyle="0" nesting="0" />
</Styles>
</UserLang>
</NotepadPlus>
@ofurkusi
Copy link
Author

Based on http://notepad-plus.sourceforge.net/commun/userDefinedLang/UDL_TodoTxt.xml , with some minor improvements. Notably:

  • Compatible with Solarized palettes and uses global styles to some extent
  • Slightly different handling of priorities items
  • Support for WAIT and DUE keywords

@page200
Copy link

page200 commented Jun 9, 2023

This looks nice, thank you!

I'm making a few improvements:

  • The close string for comments should be empty rather than ((EOL)), otherwise several consecutive lines starting with x have inconsistent colors.
  • I'm using Keywords rather than Delimiters for priorities such as (A), otherwise text like (Another thing: ...) gets highlighted due to starting with (A. Using Delimiters is probably a relic from the original version, where the entire line was highlighted rather than only the text (A).

@vurguuz
Copy link

vurguuz commented Mar 28, 2024

@page200 can you share the file with your improvements, please?

@page200
Copy link

page200 commented May 10, 2024

@vurguuz Here's todo.txt.xml:

<NotepadPlus>
    <UserLang name="todo.txt" ext="Todo.txt" udlVersion="2.1">
        <Settings>
            <Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="2" decimalSeparator="0" />
            <Prefix Keywords1="yes" Keywords2="yes" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
        </Settings>
        <KeywordLists>
            <Keywords name="Comments">00x 01 02 03 04</Keywords>
            <Keywords name="Numbers, prefix1"></Keywords>
            <Keywords name="Numbers, prefix2"></Keywords>
            <Keywords name="Numbers, extras1"></Keywords>
            <Keywords name="Numbers, extras2"></Keywords>
            <Keywords name="Numbers, suffix1">-</Keywords>
            <Keywords name="Numbers, suffix2"></Keywords>
            <Keywords name="Numbers, range">-</Keywords>
            <Keywords name="Operators1">(G) (H) (I) (J) (K) (L) (M) (N) (O) (P) (Q) (R) (S) (T) (U) (V) (W) (X) (Y) (Z)</Keywords>
            <Keywords name="Operators2"></Keywords>
            <Keywords name="Folders in code1, open"></Keywords>
            <Keywords name="Folders in code1, middle"></Keywords>
            <Keywords name="Folders in code1, close"></Keywords>
            <Keywords name="Folders in code2, open"></Keywords>
            <Keywords name="Folders in code2, middle"></Keywords>
            <Keywords name="Folders in code2, close"></Keywords>
            <Keywords name="Folders in comment, open"></Keywords>
            <Keywords name="Folders in comment, middle"></Keywords>
            <Keywords name="Folders in comment, close"></Keywords>
            <Keywords name="Keywords1">+</Keywords>
            <Keywords name="Keywords2">@</Keywords>
            <Keywords name="Keywords3">(A)</Keywords>
            <Keywords name="Keywords4">(F)</Keywords>
            <Keywords name="Keywords5">(B)</Keywords>
            <Keywords name="Keywords6">(C)</Keywords>
            <Keywords name="Keywords7">(D)</Keywords>
            <Keywords name="Keywords8">(E)</Keywords>
            <Keywords name="Delimiters">00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
        </KeywordLists>
        <Styles>
            <WordsStyle name="DEFAULT" fgColor="657B83" bgColor="FDF6E3" colorStyle="0" fontStyle="0" nesting="0" />
            <WordsStyle name="COMMENTS" fgColor="268BD2" bgColor="FDF6E3" colorStyle="1" fontStyle="0" nesting="0" />
            <WordsStyle name="LINE COMMENTS" fgColor="93A2A2" bgColor="FDF6E3" colorStyle="1" fontStyle="2" nesting="0" />
            <WordsStyle name="NUMBERS" fgColor="000000" bgColor="FDF6E3" colorStyle="1" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS1" fgColor="E449E4" bgColor="FDF6E3" colorStyle="1" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS2" fgColor="268BD2" bgColor="FDF6E3" colorStyle="1" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS3" fgColor="DD629C" bgColor="FDF6E3" colorStyle="1" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS4" fgColor="0000FF" bgColor="FF3860" colorStyle="1" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS5" fgColor="FF7E0B" bgColor="FF9933" colorStyle="1" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS6" fgColor="C8B900" bgColor="FFDD57" colorStyle="1" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS7" fgColor="00FF80" bgColor="FDF6E3" colorStyle="1" fontStyle="1" nesting="0" />
            <WordsStyle name="KEYWORDS8" fgColor="58ABAB" bgColor="FDF6E3" colorStyle="1" fontStyle="1" nesting="0" />
            <WordsStyle name="OPERATORS" fgColor="B900FF" bgColor="FDF6E3" colorStyle="1" fontStyle="1" nesting="0" />
            <WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="00FF00" fontStyle="0" nesting="0" />
            <WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FDF6E3" fontStyle="0" nesting="0" />
            <WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FDF6E3" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS1" fgColor="DC322F" bgColor="FDF6E3" colorStyle="1" fontStyle="0" nesting="67116048" />
            <WordsStyle name="DELIMITERS2" fgColor="CB4B16" bgColor="FDF6E3" colorStyle="1" fontStyle="0" nesting="67116048" />
            <WordsStyle name="DELIMITERS3" fgColor="B58900" bgColor="FDF6E3" colorStyle="1" fontStyle="0" nesting="67116048" />
            <WordsStyle name="DELIMITERS4" fgColor="859900" bgColor="FDF6E3" colorStyle="1" fontStyle="0" nesting="67116048" />
            <WordsStyle name="DELIMITERS5" fgColor="D33682" bgColor="FDF6E3" colorStyle="1" fontStyle="1" nesting="0" />
            <WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FDF6E3" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FDF6E3" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS8" fgColor="008000" bgColor="FDF6E3" fontStyle="0" nesting="0" />
        </Styles>
    </UserLang>
</NotepadPlus>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment