<?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[add comment to text files]]></title><description><![CDATA[<p dir="auto">Hello</p>
<p dir="auto">I would like to add comment (#) to be used also for txt files. I have changed next with no success:</p>
<p dir="auto">langs.xml :<br />
&lt;Language name=“normal” ext=“txt”  commentLine=“#” commentStart=“/<em>" commentEnd="</em>/”&gt;<br />
&lt;/Language&gt;</p>
<p dir="auto">and stylers.xml :<br />
&lt;LexerType name=“normal” desc=“normalA” ext=“”&gt;<br />
&lt;WordsStyle name=“COMMENT” styleID=“1” fgColor=“00FF80” bgColor=“000000” fontName=“” fontStyle=“1” fontSize=“” /&gt;<br />
&lt;WordsStyle name=“COMMENT LINE” styleID=“2” fgColor=“008000” bgColor=“FFFFFF” fontName=“Kartika” fontStyle=“0” fontSize=“” /&gt;<br />
&lt;/LexerType&gt;</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/16783/add-comment-to-text-files</link><generator>RSS for Node</generator><lastBuildDate>Tue, 17 Nov 2026 08:47:44 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/16783.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 12 Dec 2018 07:35:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to add comment to text files on Fri, 14 Dec 2018 12:54:46 GMT]]></title><description><![CDATA[<p dir="auto">thank you all for all the help, but I must say, notepad++ can be a pain, compare to sublime text I also use, you see, different tool for different tasks. But this community here is great, thanks.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37570</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37570</guid><dc:creator><![CDATA[notepad347]]></dc:creator><pubDate>Fri, 14 Dec 2018 12:54:46 GMT</pubDate></item><item><title><![CDATA[Reply to add comment to text files on Fri, 14 Dec 2018 07:52:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/notepad347" aria-label="Profile: notepad347">@<bdi>notepad347</bdi></a></p>
<blockquote>
<p dir="auto">So there is no way I can have one line comment delimiter with a space, like hash and a space: &gt;# &lt; ?</p>
</blockquote>
<p dir="auto">yes, you are correct.</p>
<p dir="auto">side info: same applies to keywords in programming languages.<br />
so for example a command/function name that can be highlighted is <code>preg_replace</code> but if it would be called <code>preg replace</code> the lexer would see it as 2 separate commands to be highlighted and highlight any occurrences of <code>preg</code> as well as any occurrences of <code>replace</code>, regardless if they are written together or not.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37555</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37555</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Fri, 14 Dec 2018 07:52:34 GMT</pubDate></item><item><title><![CDATA[Reply to add comment to text files on Fri, 14 Dec 2018 07:05:30 GMT]]></title><description><![CDATA[<p dir="auto">So there is no way I can have <strong>one line comment delimiter with a space</strong>, like hash and a space:  &gt;# &lt; ?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37554</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37554</guid><dc:creator><![CDATA[notepad347]]></dc:creator><pubDate>Fri, 14 Dec 2018 07:05:30 GMT</pubDate></item><item><title><![CDATA[Reply to add comment to text files on Fri, 14 Dec 2018 05:52:52 GMT]]></title><description><![CDATA[<p dir="auto">So there is no way I can have a comment delimiter with a space, like hash and a space:  &gt;# &lt; ?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37553</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37553</guid><dc:creator><![CDATA[notepad347]]></dc:creator><pubDate>Fri, 14 Dec 2018 05:52:52 GMT</pubDate></item><item><title><![CDATA[Reply to add comment to text files on Thu, 13 Dec 2018 14:42:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a></p>
<blockquote>
<p dir="auto">but I don’t want you to have a misperception about Claudia</p>
</blockquote>
<p dir="auto">one more reason why i originally didn’t post it.<br />
just an expression how i would feel if i was her (or any other regular)</p>
<blockquote>
<p dir="auto">so (again, for the moment ) I’ll hang around. :-)</p>
</blockquote>
<p dir="auto">hopefully as long as possible, otherwise i’d have to think about something i could do to lure you back here just for the fun of it ;-)<br />
thank god that this is just a far and purely hypothetical future.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37493</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37493</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Thu, 13 Dec 2018 14:42:40 GMT</pubDate></item><item><title><![CDATA[Reply to add comment to text files on Thu, 13 Dec 2018 13:31:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/meta-chuh" aria-label="Profile: Meta-Chuh">@<bdi>Meta-Chuh</bdi></a> said:</p>
<blockquote>
<p dir="auto">i bet we lost a few very good people, like claudia, because they tend to take such encounters …</p>
</blockquote>
<p dir="auto">So we are pretty far OT now…but I don’t want you to have a misperception about Claudia.  She was much like Peter is here, very even keel emotionally and eager to keep helping even after being insulted; I observed that many times–not that she got insulted a lot, and certainly never called a “retard”–hehehe, still giggling…</p>
<p dir="auto">My understanding is she stopped using Notepad++ because she wanted to use a product that was continually being improved–not that Notepad++ isn’t being improved, but that improvement moves too slowly for some peoples’ taste.</p>
<p dir="auto">I tend to agree–my evidence is that I used 6.7.5 for the longest time, and currently my day-to-day use is 7.2.2, and I see no compelling feature additions (what version of Scintilla is Notepad++ using?–<em>REALLY??</em>) or bug fixes to make me move “forward”–in fact, I <em>would</em> move forward but bugs seem to be on the rise, not the opposite.  If I had to pick a version post-7.2.2 I don’t know what that would be–certainly not 7.6.* with the PluginAdmin debacle going on…  And…we still can’t “find-in-selection” or “replace-in-a-column-block” or…dang, I could go on all day with a list like this…</p>
<p dir="auto">But for the moment, I happen to <em>need</em> a text editor, so (again, <em>for the moment</em> ) I’ll hang around.  :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37486</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37486</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Thu, 13 Dec 2018 13:31:22 GMT</pubDate></item><item><title><![CDATA[Reply to add comment to text files on Thu, 13 Dec 2018 13:12:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a></p>
<blockquote>
<p dir="auto">even if i get called …</p>
</blockquote>
<p dir="auto">originally i had something about this and more in my post above, but i decided not to post it because it was too long and too much, even for myself.</p>
<p dir="auto">one part of it was: noone here minds if you lose your temper from time to time, because you have had to deal with such cases the most of all, and if you do you do it with grace, reason and the regular’s support.</p>
<p dir="auto">another part i removed was that i bet we lost a few very good people, like claudia, because they tend to take such encounters and even little things like a missing feedback emotionally with them, to the extent that they start thinking about it days after, even if they are not in front of any computer nor visiting this community … this makes me sad and i urge every visitor to treat everyone around here as they would treat a friend instead of a hotline kind of slave.<br />
(prerequisite is that they treat friends as normal people do ;-) )</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37482</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37482</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Thu, 13 Dec 2018 13:12:13 GMT</pubDate></item><item><title><![CDATA[Reply to add comment to text files on Thu, 13 Dec 2018 12:46:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/meta-chuh" aria-label="Profile: Meta-Chuh">@<bdi>Meta-Chuh</bdi></a> said:</p>
<blockquote>
<p dir="auto">PeterJones…i admire your sean connery style “never lose your temper”</p>
</blockquote>
<p dir="auto">Hey, for the record, <em><strong>I</strong></em> don’t lose my temper…even if I get called a “f—king retard”! [In fact I was so “delighted” by that posting of a few days ago (reference not worth looking up) that I screenshotted it and put it in my “Gems” folder.]</p>
<p dir="auto">But I do try to keep discussions here “on track” and I am rather “short” with posters that can’t ask a question clearly, or refuse to think things through, or just want to be demanding, or…the list goes on.  Free software, free support…show some gratitude and forethought, people!  :-)</p>
<p dir="auto">But yes, I agree, <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> has a style all his own! +1</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37478</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37478</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Thu, 13 Dec 2018 12:46:25 GMT</pubDate></item><item><title><![CDATA[Reply to add comment to text files on Thu, 13 Dec 2018 10:55:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/notepad347" aria-label="Profile: notepad347">@<bdi>notepad347</bdi></a></p>
<blockquote>
<p dir="auto">I also put on “operators &amp; delimiters” tab in delimiter 1 style " for open and " for close so strings will be in color. I hope I use the correct tab and input field, because there are so many.</p>
</blockquote>
<p dir="auto">yes, that is the correct location</p>
<blockquote>
<p dir="auto">But I notice when i put &gt;# &lt; in open for “comment line style” on “comment &amp; number” tab (there is a space after #), it removes a space when i open notepad++ again.</p>
</blockquote>
<p dir="auto">string delimiters can not contain nor end with spaces, spaces are only used to separate multiple string delimiters.<br />
eg: you can have multiple comment line syntaxes if you type <code># // ::</code> in your comment line style &gt; open field.<br />
this makes it more flexible if you get txt files from people who use other remark marker/delimiter strings</p>
<p dir="auto"><code>#this is a remark</code><br />
<code># this too</code><br />
<code>// this too</code><br />
<code>:: this too</code></p>
<p dir="auto">btw:<br />
if you want to deploy your udl easily to other machines, just copy the xml file:<br />
<code>%appdata%\Notepad++\userDefineLang.xml</code><br />
into the same location on the other machine.<br />
(in case deploying to other machines was the reason why you wanted to do it via the default xml files in the first place)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37473</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37473</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Thu, 13 Dec 2018 10:55:42 GMT</pubDate></item><item><title><![CDATA[Reply to add comment to text files on Thu, 13 Dec 2018 10:48:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/notepad347" aria-label="Profile: notepad347">@<bdi>notepad347</bdi></a><br />
You should create a user defined language who reach # as comment</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37471</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37471</guid><dc:creator><![CDATA[rinku singh]]></dc:creator><pubDate>Thu, 13 Dec 2018 10:48:27 GMT</pubDate></item><item><title><![CDATA[Reply to add comment to text files on Thu, 13 Dec 2018 10:21:27 GMT]]></title><description><![CDATA[<p dir="auto">it is frustrating it does not exactly work the way I want, but I have now tried UDL and it works fine too. I also put on “operators &amp; delimiters” tab in delimiter 1 style " for open and " for close so strings will be in color. I hope I use the correct tab and input field, because there are so many. But it works, so I guess yes.</p>
<p dir="auto">But I notice when i put &gt;# &lt; in open for “comment line style” on “comment &amp; number” tab (there is a space after #), it removes a space when i open notepad++ again.</p>
<p dir="auto">Thank you all for help</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37470</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37470</guid><dc:creator><![CDATA[notepad347]]></dc:creator><pubDate>Thu, 13 Dec 2018 10:21:27 GMT</pubDate></item><item><title><![CDATA[Reply to add comment to text files on Wed, 12 Dec 2018 22:26:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/scott-sumner" aria-label="Profile: Scott-Sumner">@<bdi>Scott-Sumner</bdi></a><br />
yes, yet still people like us keep helping out for same, similar, and different reasons ;-)</p>
<p dir="auto">i for example originally signed up here, after a year or so of being a guest reader, specifically for this reason:<br />
just to upvote helpful posts i read (yes, many of yours), regardless if needed the information myself or not<br />
(even trying out almost everything if it would or could work for the op before an upvote)<br />
to show some deserved and sometimes overdue 3rd party gratitude, especially because quite a few op’s didn’t (and still don’t) reply even with a simple “works” or “doesn’t work for me”.</p>
<p dir="auto">(so if anyone ever asked themselves why someone, without any own questions or posts back then, had upvoted them, this is the plain reason)</p>
<p dir="auto">you know i’m not completely selfless, nor a samaritan, but i know that gratitude is sometimes only shown if all people that could help, stop helping for a while, and i know how i’d feel if it happens to me as often.<br />
that was and is my main drive to continue to do so.</p>
<p dir="auto">on the other hand i also understand that a visitor (or long term absent like in this case) sometimes has a load of other things to do and simply either does not know that we aren’t paid employees of np++ (dim some) or someones who just want to channel their daily frustration somewhere they can simply log in via google (without having the obstacle of creating an explicit account)</p>
<p dir="auto">i know, i know, this is all quite off topic, but being able to do so from time to time is a thing i also like around here :D<br />
(i was a regular at galanter’s scifi bbs until it shut down and the writing styles, regulars, topics (including np++ from time to time) and unwritten rules were very similar to those of the np++ community as it is today.)</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a><br />
i’d tripple upvote your lexer explanation if i could … and i admire your sean connery style “never lose your temper” 👍</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37443</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37443</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Wed, 12 Dec 2018 22:26:23 GMT</pubDate></item><item><title><![CDATA[Reply to add comment to text files on Wed, 12 Dec 2018 14:45:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/notepad347" aria-label="Profile: notepad347">@<bdi>notepad347</bdi></a> said:</p>
<blockquote>
<p dir="auto">I do not want to create new language, I would like to change how txt are open by default.</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/meta-chuh" aria-label="Profile: Meta-Chuh">@<bdi>Meta-Chuh</bdi></a> said:</p>
<blockquote>
<p dir="auto">i’m sorry too if the udl suggestion offended you.</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/meta-chuh" aria-label="Profile: Meta-Chuh">@<bdi>Meta-Chuh</bdi></a>, sigh, people just want what they want, and too easily dismiss things that aren’t exactly that.  People take time here to ponder solutions and type it up (look at how much quantity <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> always puts into his posts), only to be summarily dismissed with a short sentence.</p>
<p dir="auto">So I say, “Fine, don’t take any of the suggestions, and then don’t have your desired functionality; nobody suffers but you.”</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37421</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37421</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Wed, 12 Dec 2018 14:45:53 GMT</pubDate></item><item><title><![CDATA[Reply to add comment to text files on Wed, 12 Dec 2018 14:40:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/notepad347" aria-label="Profile: notepad347">@<bdi>notepad347</bdi></a></p>
<p dir="auto">i’m sorry too if the udl suggestion offended you.<br />
it was just to get you going within seconds, letting you style # remark lines on every .txt file as you desired.</p>
<p dir="auto">one other thing i noticed in your test langs.xml:<br />
comment start and comment end have to be different strings for technical reasons.<br />
eg: /* for comment start and */ for comment end instead of / for both.<br />
this applies everywhere, including udl.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37419</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37419</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Wed, 12 Dec 2018 14:40:11 GMT</pubDate></item><item><title><![CDATA[Reply to add comment to text files on Wed, 12 Dec 2018 14:23:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/notepad347" aria-label="Profile: notepad347">@<bdi>notepad347</bdi></a> ,</p>
<p dir="auto">You can tell it to open .txt as a different language… but you cannot arbitrarily add new “styles” (like “comment”) to the Normal Text lexer.  The <strong>Preferences &gt; Style Configurator</strong> will show you all the available styles for any given language: the “Normal Text” language gets its styles from the Configurator’s <strong>Language</strong>: <strong>Global Styles</strong>.  You’ll notice that “comment” is not an available choice: that dialog lists <em>all</em> the styles that a given Language’s lexer understands.  The normal-text lexer does not know about comments, thus when you put in a line in the config files to try to define the “COMMENT” style, it never applies that style to anything, because the lexer doesn’t identify anything as “COMMENT”, so it never chooses that style.</p>
<p dir="auto">Your options at this point are:</p>
<ol>
<li>Use a UDL, as suggested,<br />
or</li>
<li>Assign the <code>.txt</code> extension to some other language which already uses <code>#</code> to prefix comments (bash, Perl, and Python are three that come to mind).<br />
The problem with this second method is that all those languages will also strangely highlight your other text, which looks like rather malformed syntax for the selected language.</li>
</ol>
<p dir="auto">But if you want to be able to define a syntax like “comment” for <code>.txt</code> files, you are going to have to associate it with something <em>other</em> than Normal Text. Sorry.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37418</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37418</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 12 Dec 2018 14:23:29 GMT</pubDate></item><item><title><![CDATA[Reply to add comment to text files on Wed, 12 Dec 2018 11:30:08 GMT]]></title><description><![CDATA[<p dir="auto">I do not want to create new language, I would like to change how txt are open by default.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37409</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37409</guid><dc:creator><![CDATA[notepad347]]></dc:creator><pubDate>Wed, 12 Dec 2018 11:30:08 GMT</pubDate></item><item><title><![CDATA[Reply to add comment to text files on Wed, 12 Dec 2018 08:04:22 GMT]]></title><description><![CDATA[<p dir="auto">one thing i forgot to mention:<br />
if you enter txt in the Ext.: field (location: see the screenshot above)<br />
all your txt files will be opened using your user defined language<br />
(this overrides the extension setting for “Normal Text”)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37406</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37406</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Wed, 12 Dec 2018 08:04:22 GMT</pubDate></item><item><title><![CDATA[Reply to add comment to text files on Wed, 12 Dec 2018 07:53:22 GMT]]></title><description><![CDATA[<p dir="auto">here’s a screenshot</p>
<p dir="auto"><img src="https://i.imgur.com/w8eTSP4.png" alt="alt" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/37405</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37405</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Wed, 12 Dec 2018 07:53:22 GMT</pubDate></item><item><title><![CDATA[Reply to add comment to text files on Wed, 12 Dec 2018 07:49:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/notepad347" aria-label="Profile: notepad347">@<bdi>notepad347</bdi></a><br />
easiest way is using the menu: language &gt; define your language</p>
<p dir="auto">first click on “save as” and give it a name like “Markup Text”<br />
then click on the section “comment &amp; number” and enter # in: comment line style &gt; open field<br />
then click on styler and select the color of your choice, eg. green</p>
<p dir="auto">then you can close the user defined language editor (changes will be saved automatically)<br />
then open one of your text files and select language &gt; “Markup Text” (the name you have given it)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/37404</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/37404</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Wed, 12 Dec 2018 07:49:10 GMT</pubDate></item></channel></rss>