<?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[Fixed Format FORTRAN Highlighting]]></title><description><![CDATA[<p dir="auto">Is there a way to turn off column-based highlighting in F77 files? Or have N++ interpret an initial ‘tab’ the same way Visual Studio / Intel Fortran does? (i.e., an initial tab puts you in “column 7” regardless of your tab settings - for the purpose of highlighting anyway).</p>
<p dir="auto">Most of my .for files are actually fixed format and tab-spaced. In N++ this means I can use free-format to properly highlight keywords, but not comments, or I can use fixed-format to properly highlight comments, but not keywords after an initial tab.</p>
<p dir="auto">Any way to fix either (or both) modes?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/24476/fixed-format-fortran-highlighting</link><generator>RSS for Node</generator><lastBuildDate>Sun, 06 Sep 2026 00:50:41 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/24476.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 18 May 2023 02:00:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fixed Format FORTRAN Highlighting on Sun, 21 May 2023 22:23:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/daniel-crosby" aria-label="Profile: Daniel-Crosby">@<bdi>Daniel-Crosby</bdi></a> ,</p>
<p dir="auto">EnhanceAnyLexer does not change bold/italic/underline, so it cannot do the job.  If you change the Style Configurator for the keywords to turn off bold, then the EnhanceAnyLexer color-change should be sufficient for you – though of course, that means that keywords in non-comment lines would just be colorful without any bolding.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/86494</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/86494</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Sun, 21 May 2023 22:23:02 GMT</pubDate></item><item><title><![CDATA[Reply to Fixed Format FORTRAN Highlighting on Sun, 21 May 2023 21:48:09 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> Thanks, it looks like EnhanceAnyLexer with free-form is pretty close to what I want. Is there a way to remove styles from comments? I mean, I’ve added ‘bold’ for keywords, now keywords in comments are the correct colour, but emboldened? (I could just remove the bold for the keywords, but its helpful on a hires monitor!)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/86493</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/86493</guid><dc:creator><![CDATA[Daniel Crosby]]></dc:creator><pubDate>Sun, 21 May 2023 21:48:09 GMT</pubDate></item><item><title><![CDATA[Reply to Fixed Format FORTRAN Highlighting on Fri, 19 May 2023 13:30:00 GMT]]></title><description><![CDATA[<p dir="auto">I was thinking that maybe one or both of the FORTRAN lexers might have some options (“properties”) to allow changing how they interpret things… but using the <a href="https://github.com/pryrt/nppStuff/blob/main/pythonScripts/nppCommunity/19xxx/19486-propertiesForEachLexer.py" rel="nofollow ugc">current version</a> of the script I originally published <a href="https://community.notepad-plus-plus.org/post/54508">a couple years ago</a> that lists all the advertised properties for a given lexer, I see that neither the FORTRAN (free form) nor the FORTRAN_77 (fixed form) have any properties.</p>
<p dir="auto">In that case, my recommendation to <a class="plugin-mentions-user plugin-mentions-a" href="/user/daniel-crosby" aria-label="Profile: Daniel-Crosby">@<bdi>Daniel-Crosby</bdi></a> , since freeform seems to match the desires <em>except</em> regarding comments, would be to use freeform for the lexer, and then EnhanceAnyLexer¹ to add a color for <code>^C.*</code> (for the C-at-beginning comments)</p>
<pre><code class="language-ini">[fortran free form]
; color each word, 0xBBGGRR  (blue, green, and red: windows is backwards from RGB normal order)
0x33FF00 = ^C.*
; check in the respective styler xml if the following IDs are valid
excluded_styles = 1,2,3,4,5,8,9,10,11,12,13,14,15,16,20,21,22,23
; we need C---- to be an operator, but 
;   the C is lexed as an IDENTIFIER (7)
;   and - as an OPERATOR (6), 
;   so need to _not_ have 6 and 7 in excluded_styles
</code></pre>
<p dir="auto">If we had been given text to copy/paste in a code block, we could have tested for the “you also find that any keywords in the comments are highlighted as keywords” statement, but without it, all I can say is that maybe styles INSTRUCTION WORD (8), FUNCTION1 (9), and/or FUNCTION2 (10) need to be removed from <code>excluded_styles</code> as well.</p>
<p dir="auto">-–<br />
¹: Caveat: though I am not the author, I am “just” a satisfied user of that plugin, so take my recommendation for what you think it’s worth. ;-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/86457</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/86457</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 19 May 2023 13:30:00 GMT</pubDate></item><item><title><![CDATA[Reply to Fixed Format FORTRAN Highlighting on Fri, 19 May 2023 06:47:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/daniel-crosby" aria-label="Profile: Daniel-Crosby">@<bdi>Daniel-Crosby</bdi></a></p>
<p dir="auto">That’s strange, yes, ! is recognized as a comment start in Freeform, but C is not. As for line 8, does Fortran have block comments? My recollection is that this is not the case.<br />
And yes, these are topics for the lexer and this is provided by Scintilla and only if it would be updated there, Npp makes these changes.<br />
One way to make the C comments more colorful today would be to use the EnhanceAnyLexer plugin, which you can install via PluginAdmin. Caveat: I am the author.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/86453</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/86453</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Fri, 19 May 2023 06:47:07 GMT</pubDate></item><item><title><![CDATA[Reply to Fixed Format FORTRAN Highlighting on Thu, 18 May 2023 21:30:53 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> I guess the real problem is VisualStudio allows for a number of ‘non-standard’ things when it comes to F77, but that is the format I have become accustomed to and am trying to replicate.  To do this involves (ideally):</p>
<ul>
<li>not replacing my tabs with spaces</li>
<li>recognising comment lines by the ‘C’ in column one</li>
<li>recognising inline comments as everything after ‘!’</li>
<li>allowing the first tab character to move the highlighting along past column 6</li>
<li>an option to switch between 80 and 132 character line lengths</li>
</ul>
<p dir="auto">In N++ at present with fixed format you get this:<br />
<img src="/assets/uploads/files/1684445142477-for_fixed.png" alt="For_Fixed.png" class=" img-fluid img-markdown" /><br />
You see the comments are correctly coloured, but you get the continuation column (column 6) highlighting and the initial keywords aren’t recognised / coloured.</p>
<p dir="auto">In free format you get this:<br />
<img src="/assets/uploads/files/1684445255095-for_free.png" alt="For_Free.png" class=" img-fluid img-markdown" /><br />
Now the keywords are highlighted, but the ‘C’ comments aren’t. It’s not shown here, but you also find that any keywords in the comments are highlighted as keywords which makes visual parsing much trickier.</p>
<p dir="auto">I think this would require some pretty specific tweaks to the syntax parser, so I wouldn’t be surprised if it’s not possible, but you never know…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/86450</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/86450</guid><dc:creator><![CDATA[Daniel Crosby]]></dc:creator><pubDate>Thu, 18 May 2023 21:30:53 GMT</pubDate></item><item><title><![CDATA[Reply to Fixed Format FORTRAN Highlighting on Thu, 18 May 2023 05:46:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/daniel-crosby" aria-label="Profile: Daniel-Crosby">@<bdi>Daniel-Crosby</bdi></a></p>
<p dir="auto">I’m not familiar with Fortran, so I may have missed something obvious.<br />
But the copied example from <a href="https://ourcodingclub.github.io/tutorials/fortran-intro/" rel="nofollow ugc">https://ourcodingclub.github.io/tutorials/fortran-intro/</a> seems to work for me.</p>
<p dir="auto">The left side is the fixed version and the right side is the free formatted version.</p>
<p dir="auto"><img src="/assets/uploads/files/1684388015992-2be86894-5048-49dc-b56c-acf35fb131c7-image.png" alt="2be86894-5048-49dc-b56c-acf35fb131c7-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Regarding the tab and column 7, do you mean that a tab should be replaced by 6 spaces to insert the next input in column 7? If so, you can override the default behavior in the settings.</p>
<p dir="auto"><img src="/assets/uploads/files/1684388694387-8018417f-0e30-45cc-b1d3-6da3ff9993be-image.png" alt="8018417f-0e30-45cc-b1d3-6da3ff9993be-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/86423</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/86423</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Thu, 18 May 2023 05:46:16 GMT</pubDate></item></channel></rss>