<?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[scripting NotePad++ configurations?]]></title><description><![CDATA[<p dir="auto">Is there a way to script NotePad++ configurations? For example to add “.config” to the XML parser, add “.log” to text parser, etc?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/15347/scripting-notepad-configurations</link><generator>RSS for Node</generator><lastBuildDate>Tue, 06 Oct 2026 14:44:39 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/15347.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Feb 2018 20:28:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to scripting NotePad++ configurations? on Thu, 01 Mar 2018 20:15:31 GMT]]></title><description><![CDATA[<p dir="auto">Thanks. I will explore this option.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/30684</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30684</guid><dc:creator><![CDATA[Charles Kelsoe]]></dc:creator><pubDate>Thu, 01 Mar 2018 20:15:31 GMT</pubDate></item><item><title><![CDATA[Reply to scripting NotePad++ configurations? on Thu, 01 Mar 2018 19:51:38 GMT]]></title><description><![CDATA[<p dir="auto">Ah, that makes sense.</p>
<p dir="auto">The <code>Language</code> lexer associations are stored in <code>stylers.xml</code> – this is found in <code>%AppData%\Notepad++\</code> for normal installations, or in the same directory as <code>notepad++.exe</code> for portable or “local config” versions.</p>
<p dir="auto">For example, I have the <code>User Ext.:</code> for XML set to include <code>.officeUI</code> files:</p>
<pre><code>    &lt;LexerType name="xml" desc="XML" ext="officeUI"&gt;
        &lt;WordsStyle name="XMLSTART" styleID="12" fgColor="FF0000" bgColor="FFFF00" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="XMLEND" styleID="13" fgColor="FF0000" bgColor="FFFF00" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="DEFAULT" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" /&gt;
        &lt;WordsStyle name="COMMENT" styleID="9" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="NUMBER" styleID="5" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="DOUBLESTRING" styleID="6" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" /&gt;
        &lt;WordsStyle name="SINGLESTRING" styleID="7" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" /&gt;
        &lt;WordsStyle name="TAG" styleID="1" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="TAGEND" styleID="11" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="TAGUNKNOWN" styleID="2" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="ATTRIBUTE" styleID="3" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="ATTRIBUTEUNKNOWN" styleID="4" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="SGMLDEFAULT" styleID="21" fgColor="000000" bgColor="A6CAF0" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="CDATA" styleID="17" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="ENTITY" styleID="10" fgColor="000000" bgColor="FEFDE0" fontName="" fontStyle="2" fontSize="" /&gt;
    &lt;/LexerType&gt;
</code></pre>
<p dir="auto">The critical point is the <code>ext="officeUI"</code> attribute in the opening <code>&lt;LexerType ...&gt;</code> tag.<br />
In my <code>stylers.xml</code>, any language that doesn’t have user-defined extensions will show up with <code>ext=""</code>.</p>
<p dir="auto">You could either copy the whole <code>stylers.xml</code> from your known config, or you could set up some sort of batch/remote to manually edit the <code>ext</code> attribute in the appropriate <code>&lt;LexerType ...&gt;</code> tag(s).   (For example, by running sed or equivalent on the remote files.)</p>
<p dir="auto">I’m not a remote-controlling-other-computers-from-powershell person, but hopefully this will get you moving in the right direction.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/30682</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30682</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 01 Mar 2018 19:51:38 GMT</pubDate></item><item><title><![CDATA[Reply to scripting NotePad++ configurations? on Thu, 01 Mar 2018 18:46:23 GMT]]></title><description><![CDATA[<p dir="auto">I understand how to do it through the UI. I want to script that same result via a PowerShell, etc. as it needs set on many systems.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/30681</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30681</guid><dc:creator><![CDATA[Charles Kelsoe]]></dc:creator><pubDate>Thu, 01 Mar 2018 18:46:23 GMT</pubDate></item><item><title><![CDATA[Reply to scripting NotePad++ configurations? on Wed, 28 Feb 2018 21:05:11 GMT]]></title><description><![CDATA[<p dir="auto">I am not sure “scripting” is really the word you want.</p>
<p dir="auto">Based on your “for example”, you seem to want to <strong>associate</strong> the “.config” extension with the XML language parser, and associate the “.log” extension with the normaltext language parser.</p>
<p dir="auto"><code>Settings &gt; Style Configurator</code></p>
<ul>
<li>select XML in the left <code>Language:</code> column.</li>
<li>Under <code>User Ext.:</code>, add <code>config</code> (no dot)</li>
</ul>
<p dir="auto">I don’t think you need to do anything special to associate “.log” with normal text (because any extension that matches nothing will be interpreted as plain text) – unless you have a language parser that already handles “.log”: when you open a <code>filename.log</code>, what shows up in the lower left on the status bar; if it’s “Normal text file”, then it’s already using the non-parser of normal text. If it says “User Defined File – blah”, then look under <code>Language &gt; Define Your Language...</code>, and select the appropriate <code>User Language</code> and check the list of <code>Ext.:</code>.  If NPP’s status bar on the lower left says something else, look in the <code>Style Configurator</code> for a language type that matches that name, and see if it associates itself with “.log” in either the <code>Default ext.:</code> or <code>User ext.:</code></p>
]]></description><link>https://community.notepad-plus-plus.org/post/30653</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30653</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 28 Feb 2018 21:05:11 GMT</pubDate></item></channel></rss>