<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[SWAPPING OUT THEMES]]></title><description><![CDATA[<p dir="auto">Hello.</p>
<p dir="auto">Notepad++ has been my go-to text editor for text (.txt) files for many years. I have used Notepad++ for coding less regularly. The default (colour) theme for plain text files are okay, but for coding languages another theme is preferred. I know where to change the global theme but find it cumbersome to jump from one theme to another.</p>
<p dir="auto"><em>Is it possible (as an example) to use “Bespin” theme for Python (.py) scripts but for anything else use the default theme? How does one do it?</em></p>
<p dir="auto">Else workarounds that I would find helpful (and ask guidance for):</p>
<ol>
<li>
<p dir="auto">Install two Notepad++ versions. One for text processing with minimum add-on support and default theme. The another for codes … for the moment tuned for Python usage.</p>
</li>
<li>
<p dir="auto">An add-on that can switch be linked to a shortcut key to swap between themes.</p>
</li>
<li>
<p dir="auto">Customizing a theme that will become active when working with plain text (.txt or unspecified).</p>
</li>
<li>
<p dir="auto">A dark theme that works for both plain text and code (for now: Python).</p>
</li>
</ol>
<p dir="auto">Thank you for your consideration.</p>
<p dir="auto">Regards.<br />
Dan</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/14079/swapping-out-themes</link><generator>RSS for Node</generator><lastBuildDate>Sun, 17 May 2026 08:51:28 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/14079.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 03 Jul 2017 15:53:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to SWAPPING OUT THEMES on Wed, 05 Jul 2017 01:51:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dan-padric" aria-label="Profile: Dan-Padric">@<bdi>Dan-Padric</bdi></a></p>
<p dir="auto">I assume the easiest would be to use a zipped notepad++ package and install in<br />
two different places but if I’m right you are also aware of python script plugin and<br />
another solution would be to do something like this</p>
<pre><code>def change_styles():
    # editor.styleResetDefault()
    editor.styleSetBack(0, (30, 30, 30));  editor.styleSetFore(0,  (200, 200, 200));
    editor.styleSetBack(1, (30, 30, 30));  editor.styleSetFore(1,  (87, 166, 74));
    editor.styleSetBack(2, (30, 30, 30));  editor.styleSetFore(2,  (255, 128, 128));
    editor.styleSetBack(3, (30, 30, 30));  editor.styleSetFore(3,  (214, 157, 133));
    editor.styleSetBack(4, (30, 30, 30));  editor.styleSetFore(4,  (214, 157, 133));
    editor.styleSetBack(5, (30, 30, 30));  editor.styleSetFore(5,  (54, 125, 198));
    editor.styleSetBack(6, (30, 30, 30));  editor.styleSetFore(6,  (200, 200, 200));
    editor.styleSetBack(7, (30, 30, 30));  editor.styleSetFore(7,  (200, 200, 200));
    editor.styleSetBack(8, (30, 30, 30));  editor.styleSetFore(8,  (138, 138, 255));
    editor.styleSetBack(9, (30, 30, 30));  editor.styleSetFore(9,  (250, 205, 34));
    editor.styleSetBack(10,(30, 30, 30));  editor.styleSetFore(10, (255, 128, 0));
    editor.styleSetBack(11,(30, 30, 30));  editor.styleSetFore(11, (141, 166, 206));
    editor.styleSetBack(12,(30, 30, 30));  editor.styleSetFore(12, (87, 166, 74));
    editor.styleSetBack(13,(30, 30, 30));  editor.styleSetFore(13, (214, 157, 133));
    editor.styleSetBack(14,(30, 30, 30));  editor.styleSetFore(14, (0, 97, 194));
    editor.styleSetBack(15,(30, 30, 30));  editor.styleSetFore(15, (200, 200, 200));
    editor.styleSetBack(16,(30, 30, 30));  editor.styleSetFore(16, (200, 200, 200));
    editor.styleSetBack(17,(30, 30, 30));  editor.styleSetFore(17, (200, 200, 200));
    editor.styleSetBack(18,(30, 30, 30));  editor.styleSetFore(18, (200, 200, 200));
    editor.styleSetBack(19,(30, 30, 30));  editor.styleSetFore(19, (200, 200, 200));
    editor.styleSetBack(20,(30, 30, 30));  editor.styleSetFore(20, (200, 200, 200));
    editor.styleSetBack(21,(30, 30, 30));  editor.styleSetFore(21, (200, 200, 200));
    editor.styleSetBack(22,(30, 30, 30));  editor.styleSetFore(22, (200, 200, 200));
    editor.styleSetBack(23,(30, 30, 30));  editor.styleSetFore(23, (200, 200, 200));
    editor.styleSetBack(24,(30, 30, 30));  editor.styleSetFore(24, (200, 200, 200));
    editor.styleSetBack(25,(30, 30, 30));  editor.styleSetFore(25, (200, 200, 200));
    editor.styleSetBack(26,(30, 30, 30));  editor.styleSetFore(26, (200, 200, 200));
    editor.styleSetBack(27,(30, 30, 30));  editor.styleSetFore(27, (200, 200, 200));
    editor.styleSetBack(28,(30, 30, 30));  editor.styleSetFore(28, (200, 200, 200));
    editor.styleSetBack(29,(30, 30, 30));  editor.styleSetFore(29, (200, 200, 200));
    editor.styleSetBack(30,(30, 30, 30));  editor.styleSetFore(30, (200, 200, 200));
    editor.styleSetBack(31,(30, 30, 30));  editor.styleSetFore(31, (200, 200, 200));
    editor.styleSetBack(32,(30, 30, 30));  editor.styleSetFore(32, (200, 200, 200));
    editor.styleSetBack(33,(30, 30, 30));  editor.styleSetFore(33, (43, 145, 175));
    editor.styleSetBack(34,(38, 79, 120)); editor.styleSetFore(34, (220, 220, 220));
    editor.styleSetBack(35,(30, 30, 30));  editor.styleSetFore(35, (147, 0, 0));
    editor.styleSetBack(36,(30, 30, 30));  editor.styleSetFore(36, (200, 200, 200));
    editor.styleSetBack(37,(30, 30, 30));  editor.styleSetFore(37, (136, 138, 133));
    editor.styleSetBack(38,(0, 0, 0));     editor.styleSetFore(38, (128, 128, 128));
    
    editor.setCaretFore((128, 128, 128))
    editor.setCaretLineBack((0, 0, 0))
    
    for i in range(15):
        editor.styleSetFont(i, 'Courier New')
        editor.styleSetSize(i,12)
    
    editor.setFoldMarginColour(True, (30, 30, 30))
    editor.setFoldMarginHiColour(True, (30, 30, 30))

def callback_BUFFERACTIVATED(args):
    if editor.getLexer() in [1,2]:
        change_styles()
    else:
        editor.setFoldMarginColour(False, (30, 30, 30))
        editor.setFoldMarginHiColour(False, (30, 30, 30))
        

notepad.clearCallbacks([NOTIFICATION.BUFFERACTIVATED])
notepad.callback(callback_BUFFERACTIVATED, [NOTIFICATION.BUFFERACTIVATED])
</code></pre>
<p dir="auto">Put this into the user <a href="http://startup.py" rel="nofollow ugc">startup.py</a>.<br />
Basically, every time you switch/open a document it checks if it is either a normal text<br />
or python document and in such a case changes the styles.<br />
The meaning of the styles can be seen in stylers.xml but be aware that not<br />
every style id from global styles can be set but needs to be callled with a different<br />
function like setFoldMarginColour etc…</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/25390</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/25390</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Wed, 05 Jul 2017 01:51:17 GMT</pubDate></item></channel></rss>