Search code examples
xmlerlangprogrammers-notepad

I can't see comments in dark scheme for Erlang in Programmers Notepad


I made a dark colour scheme for Erlang in Programmers Notepad (PN). The problem is that comments starting with "%%" are not showing up (presumably because they are black on black). Comments starting with "%" do show up with the colour specified. Here is the scheme file for PN:

<?xml version="1.0" encoding="UTF-8"?>
<Scheme>
    <keyword-classes>
        <keyword-class name="erlang">after begin case catch cond end fun if let of query receive when
define record export import include include_lib ifdef ifndef else endif undef
apply attribute call do in letrec module primop try
        </keyword-class>
    </keyword-classes>

    <!-- base scheme for C++ style languages -->
    <language name="erlang" title="Erlang">
        <lexer name="erlang" />
        <comments line="%" />
        <use-keywords>
            <keyword key="0" name="Keywords" class="erlang"/>
        </use-keywords>
        <use-styles>
            <style name="Default" key="32" back="000000" />
            <style name="Whitespace" key="0" back="000000" class="whitespace" />
            <style name="Comment" key="1" fore="C0C0FF" class="commentline" />
            <style name="Variable" key="2" fore="FFFFC0" class="variable"/>
            <style name="Number" key="3" fore="D0D0D0" class="number"/>
            <style name="Keyword" key="4" fore="C0FFC0" class="keyword"/>
            <style name="String" key="5" fore="D0D0D0" class="string"/>
            <style name="Operator" key="6" fore="C0FFFF" class="operator"/>
            <style name="Atom" key="7" fore="FFFFFF"/>
            <style name="Function Name" fore="FFC0FF" key="8" class="tag"/>
            <style name="Character" key="9" fore="FFFFFF" class="string"/>
            <style name="Macro" key="10" fore="FFFFFF" fore="FF0000"/>
            <style name="Record" key="11" fore="FFFFFF" fore="FF8080"/>
            <style name="Separator" key="12" fore="FFFFFF" class="error"/>
            <style name="Node name" key="13" fore="FFFFFF" fore="FF00FF"/>
            <style name="Parse error" key="31" back="FFFFFF" fore="FF0000" class="error"/>
        </use-styles>
    </language>
</Scheme>

Example Erlang comments:

% I can be seen
%% I'm invisible

Also the cursor is not visible in PN when using this scheme.


Solution

  • To make all other text visible I set the foreground colour for the default text:

    <style name="Default" key="32" back="000000" fore="FFFFFF" />
    

    To make the cursor show up I loaded the "Dark" preset via "Tools -> Options -> Fonts and Colours -> Styles".