<?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[Setting a file tab&#x27;s Language to &quot;Internal Search&quot;]]></title><description><![CDATA[<p dir="auto">Just a bit curious about setting the language type for a file to “Internal Search”…</p>
<p dir="auto">One can’t do this by selecting something from the <em>Language</em> menu (doesn’t appear there), but I can do it with PythonScript via:</p>
<p dir="auto"><code>notepad.setLangType(LANGTYPE.SEARCHRESULT)</code></p>
<p dir="auto">and indeed when I do that I see this on the left part of the status bar:</p>
<p dir="auto"><img src="/assets/uploads/files/1655319276751-3f2e9b24-485d-4c09-ab89-d97955c7d384-image.png" alt="3f2e9b24-485d-4c09-ab89-d97955c7d384-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">But if I then copy some text from the <em>Search results</em> window into the file tab, I don’t see it get lexed like it is in the <em>Search results</em>; it looks rather plain and without fold points, like this:</p>
<p dir="auto"><img src="/assets/uploads/files/1655319427751-cf492f08-5997-4796-a18d-fe49e2e681ed-image.png" alt="cf492f08-5997-4796-a18d-fe49e2e681ed-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">For reference, here’s a sampling from the <em>Search results</em> window:</p>
<p dir="auto"><img src="/assets/uploads/files/1655319682893-a94acfb7-3f5d-4320-92d8-7a89989dbf15-image.png" alt="a94acfb7-3f5d-4320-92d8-7a89989dbf15-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Curious if anyone knows why this is, leading to a workaround?  Or a pointing out to me what I am doing wrong…</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/23124/setting-a-file-tab-s-language-to-internal-search</link><generator>RSS for Node</generator><lastBuildDate>Thu, 14 May 2026 04:13:03 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/23124.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 15 Jun 2022 19:01:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Setting a file tab&#x27;s Language to &quot;Internal Search&quot; on Thu, 23 Nov 2023 11:55:55 GMT]]></title><description><![CDATA[<p dir="auto">There is further discussion about this topic in this thread: <a href="https://community.notepad-plus-plus.org/topic/25145/find-and-display-all-duplicate-lines/">https://community.notepad-plus-plus.org/topic/25145/find-and-display-all-duplicate-lines/</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/90726</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90726</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 23 Nov 2023 11:55:55 GMT</pubDate></item><item><title><![CDATA[Reply to Setting a file tab&#x27;s Language to &quot;Internal Search&quot; on Thu, 16 Jun 2022 11:55:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ekopalypse" aria-label="Profile: ekopalypse">@<bdi>ekopalypse</bdi></a></p>
<p dir="auto">Hmm, sounds complicated…probably more effort than I want to go to, as the text I’d want to lex may not end up being exactly like “search result” text anyway.<br />
Thanks for your thoughts on the matter.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77597</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77597</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 16 Jun 2022 11:55:38 GMT</pubDate></item><item><title><![CDATA[Reply to Setting a file tab&#x27;s Language to &quot;Internal Search&quot; on Thu, 16 Jun 2022 07:34:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> said in <a href="/post/77573">Setting a file tab's Language to "Internal Search"</a>:</p>
<p dir="auto">In order for a lexer to work it needs to know its</p>
<ul>
<li>keywords</li>
<li>styles</li>
<li>and properties</li>
</ul>
<p dir="auto">The searchResult lexer has no keywords, but one important property.<br />
The <code>@MarkingsStruct</code> contains the stringified version of the struct pointer,<br />
which contains the needed information from<br />
where to where to color the searched words.<br />
You must call getProperty to get this value and always set it for the tab’s buffer.</p>
<blockquote>
<p dir="auto">copy some text from</p>
</blockquote>
<p dir="auto">This can become a problem if you don’t make sure<br />
that the buffer in the tab is either an exact copy of the<br />
search result content or at least always the top result.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/77594</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/77594</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Thu, 16 Jun 2022 07:34:42 GMT</pubDate></item></channel></rss>