<?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[Select text via syntax highlighting]]></title><description><![CDATA[<p dir="auto">In Notepad++ can I select text via syntax that has been highlighted? Example: Say I’m editing an html file. I hover my mouse over the"y" in a tag such as</p>
<p dir="auto">&lt;a href=“<a href="https://mylink.htm" rel="nofollow ugc">https://mylink.htm</a>”&gt;click here&lt;/a&gt;</p>
<p dir="auto">and the whole URL, that is the whole text of “https/mylink.htm” gets automatically syntax highlighted by Notepad++. Can I now press a hot-key or right-click or something to select that entire URL? Or must I drag the mouse over the URL to select it?</p>
<p dir="auto">I ask because very often I need to select an entire syntactical element, say to copy it to some other location.  Notepad++ is already aware of the element I’m after, yet I find myself tediously dragging the mouse from one endpoint of the element to the other and then right-clicking and clicking “copy” to select the element I’m after.  It seems it could be easier and faster than that.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/19861/select-text-via-syntax-highlighting</link><generator>RSS for Node</generator><lastBuildDate>Wed, 10 Jun 2026 18:08:20 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/19861.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 14 Aug 2020 16:52:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Select text via syntax highlighting on Sun, 16 Aug 2020 05:43:23 GMT]]></title><description><![CDATA[<p dir="auto">@Дмитрий-Трошин said in <a href="/post/56855">Select text via syntax highlighting</a>:</p>
<blockquote>
<p dir="auto">I am using jN plugin for such task.<br />
<a href="https://github.com/sieukrem/jn-npp-plugin" rel="nofollow ugc">https://github.com/sieukrem/jn-npp-plugin</a><br />
The “href” selection functionality is in the file:<br />
<a href="https://github.com/trdm/jn-npp-scripts/blob/master/includes/IntellHtml.js" rel="nofollow ugc">https://github.com/trdm/jn-npp-scripts/blob/master/includes/IntellHtml.js</a></p>
</blockquote>
<p dir="auto">How it works.<br />
![alt text](<img src="https://camo.nodebb.org/fca9f20b1f47cbfe4137302a8779e5b78858bd41?url=https%3A%2F%2Fraw.githubusercontent.com%2Ftrdm%2Fjn-npp-scripts%2Fmaster%2FDoc%2FIntellHtml_2020-08_16_1.gif" alt="image url" class=" img-fluid img-markdown" />)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/56857</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56857</guid><dc:creator><![CDATA[TroshinDV]]></dc:creator><pubDate>Sun, 16 Aug 2020 05:43:23 GMT</pubDate></item><item><title><![CDATA[Reply to Select text via syntax highlighting on Sun, 16 Aug 2020 05:27:33 GMT]]></title><description><![CDATA[<p dir="auto">@Дмитрий-Трошин said in <a href="/post/56855">Select text via syntax highlighting</a>:</p>
<blockquote>
<p dir="auto">I am using jN plugin for such task.<br />
<a href="https://github.com/sieukrem/jn-npp-plugin" rel="nofollow ugc">https://github.com/sieukrem/jn-npp-plugin</a><br />
The “href” selection functionality is in the file:<br />
<a href="https://github.com/trdm/jn-npp-scripts/blob/master/includes/IntellHtml.js" rel="nofollow ugc">https://github.com/trdm/jn-npp-scripts/blob/master/includes/IntellHtml.js</a></p>
</blockquote>
<pre><code>function htmlMakeSelections(psAnaliser) {
	var rv = '';
	if(0) {
		psAnaliser = new CHtmlTagAnalizer;
    }
	if(psAnaliser) {
		//debugger;
		var vPosStart = -1, vPosEnd = -1, vAnchor = 0, vPosOffset = -1;
		
		var vTag = null, vLP = psAnaliser.getLastPlasement();
		if(vLP &amp;&amp; htmlNeedSelections(vLP)) {		
	    	var vTag = vLP.tag;
			var vNames = ['img']
	    	if( vTag &amp;&amp; vTag.name == 'img' &amp;&amp; vLP.atribName == "src") {        
				// select 'img'  or "src
    	        var vAtrName = vTag.atribByPos(vLP.column);
		        if (vAtrName != '') {
		            vPosStart = vTag.atribPosStartVal(vAtrName)+1;
		            vPosEnd = vTag.atribPosEnd(vAtrName);
					/* bytePos/Pos и column связаны, */
					vPosOffset = view.pos - view.column;
					view.anchor = vPosStart + vPosOffset;
					view.pos = vPosEnd + vPosOffset;
		        }
		    }		
        }    
    }
	return rv;
}

</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/56856</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56856</guid><dc:creator><![CDATA[TroshinDV]]></dc:creator><pubDate>Sun, 16 Aug 2020 05:27:33 GMT</pubDate></item><item><title><![CDATA[Reply to Select text via syntax highlighting on Sun, 16 Aug 2020 05:15:05 GMT]]></title><description><![CDATA[<p dir="auto">I am using jN plugin for such task.<br />
<a href="https://github.com/sieukrem/jn-npp-plugin" rel="nofollow ugc">https://github.com/sieukrem/jn-npp-plugin</a><br />
The “href” selection functionality is in the file:<br />
<a href="https://github.com/trdm/jn-npp-scripts/blob/master/includes/IntellHtml.js" rel="nofollow ugc">https://github.com/trdm/jn-npp-scripts/blob/master/includes/IntellHtml.js</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/56855</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56855</guid><dc:creator><![CDATA[TroshinDV]]></dc:creator><pubDate>Sun, 16 Aug 2020 05:15:05 GMT</pubDate></item><item><title><![CDATA[Reply to Select text via syntax highlighting on Sat, 15 Aug 2020 19:04:23 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/dfdeboer" aria-label="Profile: dfdeboer">@<bdi>dfdeboer</bdi></a></p>
<p dir="auto">You’re welcome. Glad to be of help.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/56847</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56847</guid><dc:creator><![CDATA[astrosofista]]></dc:creator><pubDate>Sat, 15 Aug 2020 19:04:23 GMT</pubDate></item><item><title><![CDATA[Reply to Select text via syntax highlighting on Fri, 14 Aug 2020 19:22:19 GMT]]></title><description><![CDATA[<p dir="auto">Thanks astrosofista.  I’ll probably try setting that up some day soon.  (Must keep nose to grindstone and not get distracted by fun toys. . .)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/56832</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56832</guid><dc:creator><![CDATA[dfdeboer]]></dc:creator><pubDate>Fri, 14 Aug 2020 19:22:19 GMT</pubDate></item><item><title><![CDATA[Reply to Select text via syntax highlighting on Fri, 14 Aug 2020 17:31:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/astrosofista" aria-label="Profile: astrosofista">@<bdi>astrosofista</bdi></a> said in <a href="/post/56825">Select text via syntax highlighting</a>:</p>
<blockquote>
<p dir="auto">As long as URLs are quoted strings, there is already a Pythonscript available and a macro solution as well</p>
</blockquote>
<p dir="auto">Yea, makes sense.<br />
For the current thread I was thinking more of a hover-based solution.<br />
But clicking somewhere inside the text and then running the script/macro is pretty reasonable.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/56827</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56827</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 14 Aug 2020 17:31:12 GMT</pubDate></item><item><title><![CDATA[Reply to Select text via syntax highlighting on Fri, 14 Aug 2020 17:29:43 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/dfdeboer" aria-label="Profile: dfdeboer">@<bdi>dfdeboer</bdi></a></p>
<p dir="auto">As long as URLs are quoted strings, there is already a Pythonscript available and a macro solution as well. Take a look at</p>
<p dir="auto"><a href="https://community.notepad-plus-plus.org/post/52108">Copying quoted strings</a></p>
<p dir="auto">Have fun!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/56825</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56825</guid><dc:creator><![CDATA[astrosofista]]></dc:creator><pubDate>Fri, 14 Aug 2020 17:29:43 GMT</pubDate></item><item><title><![CDATA[Reply to Select text via syntax highlighting on Fri, 14 Aug 2020 17:19:39 GMT]]></title><description><![CDATA[<p dir="auto">Thanks Alan!  I thought it might be as you describe, but OTH if I was missing something it should would have been nice to figure it out.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/56823</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56823</guid><dc:creator><![CDATA[dfdeboer]]></dc:creator><pubDate>Fri, 14 Aug 2020 17:19:39 GMT</pubDate></item><item><title><![CDATA[Reply to Select text via syntax highlighting on Fri, 14 Aug 2020 17:11:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dfdeboer" aria-label="Profile: dfdeboer">@<bdi>dfdeboer</bdi></a> said in <a href="/post/56816">Select text via syntax highlighting</a>:</p>
<blockquote>
<p dir="auto">Can I now press a hot-key or right-click or something to select that entire URL?</p>
</blockquote>
<p dir="auto">No.</p>
<blockquote>
<p dir="auto">Or must I drag the mouse over the URL to select it?</p>
</blockquote>
<p dir="auto">Yes.</p>
<p dir="auto">Perhaps something could be done with scripting to ease this situation.<br />
URLs are done with indicator #8.<br />
Maybe a script with execution tied to a keycombo could be run when the URL is pointed at.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/56820</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/56820</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Fri, 14 Aug 2020 17:11:55 GMT</pubDate></item></channel></rss>