<?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[Default Langauage for Files with No Extension]]></title><description><![CDATA[<p dir="auto">How can I set the default Language (XML, or JSON) for files with no extension?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/21573/default-langauage-for-files-with-no-extension</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 22:54:42 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/21573.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Jul 2021 23:32:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Default Langauage for Files with No Extension on Thu, 29 Jul 2021 00:32:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/22693">@waynecnr</a> said in <a href="/post/68420">Default Langauage for Files with No Extension</a>:</p>
<blockquote>
<p dir="auto">How can I set the default Language (XML, or JSON) for files with no extension?</p>
</blockquote>
<p dir="auto">I don’t think you can, at least not with the configuration options available to you. In the case of XML or JSON, when you go to <em><strong>settings</strong></em>, <em><strong>style configurator</strong></em>, then select <em><strong>xml</strong></em> or <em><strong>json</strong></em> in the language box, you can <strong>ONLY</strong> add additional file extensions. There isn’t an option to remove the default ones, which is essentially what you want.</p>
<p dir="auto">I ran a small test and got these results:<br />
You can run Notepad++ from the commandline with additional arguments. So<br />
<em><strong>notepad++ -lxml d:\temp\this-is-an-xml-file-with-no-ext</strong></em><br />
would load the named XML file (which has no extension) and then command Notepad++ to colourise it using the XML lexer.</p>
<p dir="auto">If the XML file had (on it’s first line) some code such as<br />
<code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;</code> (taken from the config.xml file, part of Notepad++ installation)<br />
then Notepad++ would automatically use the XML lexer as it does attempt to interpret the language to use by the content of the file. I presume a JSON file would also need to have some unique (to JSON) coding at/near the start so it could also be automatically recognised.</p>
<p dir="auto">Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/68421</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/68421</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Thu, 29 Jul 2021 00:32:18 GMT</pubDate></item></channel></rss>