<?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[Language not being saved with file]]></title><description><![CDATA[<p dir="auto">How do I get NPP to remember normal text for a file?</p>
<p dir="auto">I create a new NPP file.<br />
I change the file’s Language to Normal Text from  AutoHotKey below Define Your Language.<br />
The file’s text (on screen) changes to normal text.<br />
I save the file as Test.txt<br />
When I reopen it, the Language has reverted back to AutoHotKey and is NOT Normal Text.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/15988/language-not-being-saved-with-file</link><generator>RSS for Node</generator><lastBuildDate>Thu, 13 Aug 2026 20:42:36 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/15988.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 01 Jul 2018 16:19:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Language not being saved with file on Mon, 02 Jul 2018 14:01:32 GMT]]></title><description><![CDATA[<p dir="auto">NPP does not save a per-file language-lexer choice.  The lexer used is determined by the extension lists in the settings for each <code>Language &gt; Define your language...</code> &gt; <strong>Ext :</strong> (for a given User Defined Language, UDL), and in the <code>Settings &gt; Style Configurator</code> &gt; <strong>User ext.</strong> and <strong>Default ext.</strong> (for a given <code>Language</code> lexer).</p>
<p dir="auto">A <strong>User ext.</strong> in the Configurator or an <strong>Ext. :</strong> in the UDL settings will override a <strong>Default ext.</strong>.  If an extension isn’t found in the user extensions or UDL extensions, NPP will search the default extension lists, and hand the file off to the appropriate lexer, if found.  If an extension isn’t in any of the lists, then it will be handled as a <code>Normal text</code> file.</p>
<p dir="auto">So, if you’ve set <strong>Ext. :</strong> = <code>txt</code> in the User-Defined Language <code>AutoHotKey</code>, then NPP will use the <code>AutoHotKey</code> UDL for the highlighting whenever you open a .txt file, rather than going thru the list of priorities down to the <code>Normal text</code>.</p>
<p dir="auto">If you don’t want NPP to apply the AutoHotKey formatting to .txt files, you have to make sure that you remove <code>txt</code> from the User-Defined Language settings for the AutoHotKey (and any other user-defined language or style-configurator language).</p>
<p dir="auto">If you want NPP to apply AutoHotKey to some .txt files, but Normal Text to others, that’s more than NPP is programmed to do.  You will have to toggle some of the .txt files manually; or you might be able to figure out a way to program a PythonScript or LuaScript to recognize the specific content when a .txt file is opened, and to have the script tell NPP to either use the AutoHotKey highlighting or Normal Text…)  Notepad++'s expectation is that files that want different highlighting will have different extensions (so maybe choose .ahk for AutoHotKey files – though, since I don’t know how AHK works, I don’t know if it has a default file extension, or whether it doesn’t care, or whether it only accepts .txt files).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/33287</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/33287</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 02 Jul 2018 14:01:32 GMT</pubDate></item></channel></rss>