<?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[I want change style token individually]]></title><description><![CDATA[<p dir="auto">Hello all</p>
<p dir="auto">I select anything here with shortcut. When I do something wrong and want to remove it, it deletes everything. I just want what I marked to be deleted. is there a way to do this? Or is there a similar higlight tactic I can use?</p>
<p dir="auto"><img src="/assets/uploads/files/1729170935184-54b92f53-d132-4644-936c-dbf273b3254c-image.png" alt="54b92f53-d132-4644-936c-dbf273b3254c-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/topic/26208/i-want-change-style-token-individually</link><generator>RSS for Node</generator><lastBuildDate>Mon, 18 May 2026 06:19:43 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/26208.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 17 Oct 2024 13:18:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to I want change style token individually on Thu, 17 Oct 2024 18:29:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gonyaliselim" aria-label="Profile: gonyaliselim">@<bdi>gonyaliselim</bdi></a> said in <a href="/post/97153">I want change style token individually</a>:</p>
<blockquote>
<p dir="auto">If i add highlights when someone open that txt on his computer would can he see my highlights as it</p>
</blockquote>
<p dir="auto">Sorry, no.  Text files have no way to store things like highlighting – they are literally saved as just the text characters in the file.  Notepad++ is not going to add any new binary commands or metadata to the file to be able to store such information (if it did, it would cease to be a text editor and instead would be a rather primitive, 80s-style word processor).  [see, for reference, <a href="/topic/24852">FAQ: Notepad++ is a Text Editor, not a Word Processor</a>]</p>
<p dir="auto">If you really needed to share the highlights, you could either print to PDF (if you don’t already have a print-to-PDF printer, you can search the internet to find a print-to-PDF driver that works for your needs), or you could use the <strong>Plugins &gt; NppExport</strong> commands to export with the highlights to RTF or HTML (or put all formats into the clipboard, then paste into the Word Processor of your choice).  But once you export to RTF or HTML or paste into a Word Processor, the file you are sending ceases to be a text file.  We cannot decide for you whether or not that meets your needs.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97154</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97154</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 17 Oct 2024 18:29:09 GMT</pubDate></item><item><title><![CDATA[Reply to I want change style token individually on Thu, 17 Oct 2024 17:21:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a></p>
<p dir="auto">YOU ARE KING !  👑</p>
<p dir="auto">This Video link<br />
streamable com/eq1psw</p>
<p dir="auto">other question. If i add highlights when someone open that txt on his computer would can he see my highlights as it ?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97153</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97153</guid><dc:creator><![CDATA[gonyaliselim]]></dc:creator><pubDate>Thu, 17 Oct 2024 17:21:03 GMT</pubDate></item><item><title><![CDATA[Reply to I want change style token individually on Thu, 17 Oct 2024 16:06:55 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> ,</p>
<p dir="auto">You are right</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gonyaliselim" aria-label="Profile: gonyaliselim">@<bdi>gonyaliselim</bdi></a> ,</p>
<p dir="auto">The <a href="https://community.notepad-plus-plus.org/post/41672">post here</a> by <a class="plugin-mentions-user plugin-mentions-a" href="/user/ekopalypse" aria-label="Profile: Ekopalypse">@<bdi>Ekopalypse</bdi></a> contains almost the script you would want.  I would recommend modifying it to</p>
<pre><code class="language-py">from Npp import editor
INDICATORS = [21, 22, 23, 24, 25, 31]
for i in range(editor.getSelections()):
    start = editor.getSelectionNStart(i)
    end = editor.getSelectionNEnd(i)
    if end-start == 0:
        start = editor.wordStartPosition(start, True)
        end = editor.wordEndPosition(start, True)
    for indicator in INDICATORS:
        editor.setIndicatorCurrent(indicator)
        editor.indicatorClearRange(start, end-start)
</code></pre>
<p dir="auto">The changes I made to the script compared to the version from the old post:</p>
<ul>
<li>the original post’s script would only go to the end of the first word in each selection; mine will go from start to end of the selection (or of each selection, for multi-select mode)</li>
<li>mine adds the feature that if you just click inside a single word (or do <code>ctrl+click</code> to do multiple zero-width selections), it will assume you want to clear the Style on the whole word that you clicked inside</li>
<li>mine adds the boilerplate at the top, because some people’s PythonScript <code>startup.py</code> don’t import all the used objects</li>
</ul>
<p dir="auto">To use that script, you would follow the instructions in our <a href="/topic/23039">PythonScript FAQ</a> to install the PythonScript plugin.  Once it’s installed (and i recommend giving it a keyboard shortcut), you can select one or more words, and run the script using the menu or shortcut, and the script will remove the style indicator(s) for any of the selected text, while leaving anything else that has that style alone – effectively implementing the <strong>Clear Styles (One Token)</strong> that I suggested.  This will give you what you asked for, without asking for and waiting for a new feature to be implemented in Notepad++.</p>
<p dir="auto"><em>update: assuming you name the script <code>ClearStylesOneToken.py</code>, and if you use PythonScript Configuration to move it into the main PythonScript menu (like you would have done if you wanted a keyboard shortcut), then you could use <code>&lt;Item FolderName="Clear style"  PluginEntryName="Python Script" PluginCommandItemName="ClearStylesOneToken" ItemNameAs="Clear Styles (One Token)" /&gt;</code> in your <code>contextMenu.xml</code> (using <strong>Settings &gt; Edit Popup ContextMenu</strong>) in order to put it into your right-click context menu; if you put it right after the other <code>FolderName="Clear style"</code> entries in that XML, it will show up in the same submenu as the other <strong>Clear styles</strong> actions – but only in the context menu, not in the Search menu.  To get it to show up, you will have to save <code>contextMenu.xml</code> and exit/restart Notepad++</em></p>
<p dir="auto">But, as I said in my first reply, you really should put in the feature request, because it’s something that should be native in Notepad++.  But if no one asks, it will never be implemented.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97152</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97152</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 17 Oct 2024 16:06:55 GMT</pubDate></item><item><title><![CDATA[Reply to I want change style token individually on Thu, 17 Oct 2024 15:27:20 GMT]]></title><description><![CDATA[<p dir="auto">It’s been discussed before, <a href="https://community.notepad-plus-plus.org/topic/17362">HERE</a>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97150</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97150</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 17 Oct 2024 15:27:20 GMT</pubDate></item><item><title><![CDATA[Reply to I want change style token individually on Thu, 17 Oct 2024 15:23:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> sad. thank you for information</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97149</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97149</guid><dc:creator><![CDATA[gonyaliselim]]></dc:creator><pubDate>Thu, 17 Oct 2024 15:23:04 GMT</pubDate></item><item><title><![CDATA[Reply to I want change style token individually on Thu, 17 Oct 2024 15:20:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gonyaliselim" aria-label="Profile: gonyaliselim">@<bdi>gonyaliselim</bdi></a> said in <a href="/post/97147">I want change style token individually</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> said in <a href="/post/97144">I want change style token individually</a>:</p>
<blockquote>
<p dir="auto">Clear Styles (One Token)</p>
</blockquote>
<p dir="auto">cant see this</p>
</blockquote>
<p dir="auto">You misunderstood me.  I was saying “it would be nice if it gave those two new options”.  You will have to put in a feature request to ask for them, because they don’t exist.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97148</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97148</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 17 Oct 2024 15:20:42 GMT</pubDate></item><item><title><![CDATA[Reply to I want change style token individually on Thu, 17 Oct 2024 15:19:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> said in <a href="/post/97144">I want change style token individually</a>:</p>
<blockquote>
<p dir="auto">Clear Styles (One Token)</p>
</blockquote>
<p dir="auto">cant see this</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97147</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97147</guid><dc:creator><![CDATA[gonyaliselim]]></dc:creator><pubDate>Thu, 17 Oct 2024 15:19:30 GMT</pubDate></item><item><title><![CDATA[Reply to I want change style token individually on Thu, 17 Oct 2024 15:16:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> yes I want remove individually on as you posted different pics and it doesnt work it just removing all highlights</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97146</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97146</guid><dc:creator><![CDATA[gonyaliselim]]></dc:creator><pubDate>Thu, 17 Oct 2024 15:16:52 GMT</pubDate></item><item><title><![CDATA[Reply to I want change style token individually on Thu, 17 Oct 2024 14:10:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> said in <a href="/post/97144">I want change style token individually</a>:</p>
<blockquote>
<p dir="auto">but I’m forgetting right now which scintilla feature Notepad++ uses for doing the background color for the Style tokens</p>
</blockquote>
<p dir="auto"><a href="https://www.scintilla.org/ScintillaDoc.html#Indicators" rel="nofollow ugc">Indicators</a>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97145</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97145</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 17 Oct 2024 14:10:01 GMT</pubDate></item><item><title><![CDATA[Reply to I want change style token individually on Thu, 17 Oct 2024 13:47:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gonyaliselim" aria-label="Profile: gonyaliselim">@<bdi>gonyaliselim</bdi></a> ,</p>
<p dir="auto">Hmm, if I am correctly understanding what you are asking for, then the answer is “no”: there is not currently a way to clear the Style#N on just one token, rather than all of Style#N.  That surprises me.</p>
<p dir="auto">Given text like<br />
<img src="/assets/uploads/files/1729172146715-5bfc5a2a-07dd-4363-9009-7b0299485847-image.png" alt="5bfc5a2a-07dd-4363-9009-7b0299485847-image.png" class=" img-fluid img-markdown" /><br />
… I can see that you might want to be able to select the second <code>three</code> and choose something like <strong>Search &gt; Clear Style &gt; Clear Styles (One Token)</strong> to result in only one <code>three</code> having the Style cleared, but allowing the <code>two</code>s and the other <code>three</code> to stay highlighted, like:<br />
<img src="/assets/uploads/files/1729172285006-bcda0ae0-5709-42d8-9ce0-ba58a0ce8df5-image.png" alt="bcda0ae0-5709-42d8-9ce0-ba58a0ce8df5-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">… And, to also be able to select one of the <code>two</code>s and pick something like <strong>Search &gt; Clear Style &gt; Clear Styles (All Occurrences of Token)</strong> , so that it can clear the Style on all instances of <code>two</code> without having to clear the same Style on other tokens.</p>
<p dir="auto">Great idea.</p>
<p dir="auto">If that’s a feature you would like, I would recommend reading our <a href="/topic/15741">FAQ on making a feature request</a>, which tells you where to go to make an official feature request.  (Feel free to borrow my phrasing or images when you make the feature request.)</p>
<p dir="auto">If you do make an official request, please come back here and paste a link, so that people who read about your idea here can see what progress, if any, there is on the official feature request.  Good luck.</p>
<blockquote>
<p dir="auto">Or is there a similar higlight tactic I can use?</p>
</blockquote>
<p dir="auto">As far as a workaround: I think it might be possible to remove the style from a single token using PythonScript or other scripting plugin, but I’m forgetting right now which scintilla feature Notepad++ uses for doing the background color for the Style tokens, so I cannot remember which scintilla command I would point you to.  Maybe someone else will remember.  (Or maybe I’ll have time later to do more research.)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/97144</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/97144</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 17 Oct 2024 13:47:21 GMT</pubDate></item></channel></rss>