Notepad++ language formatting

267 views
Skip to first unread message

Schmitt, Michael

unread,
May 18, 2023, 11:50:39 AM5/18/23
to ASSEMBL...@listserv.uga.edu
Is there a language formatting file for Notepad++ for HLASM?

What I found in Google is that there is one but it had no link to download it.

Janko Kalinic

unread,
May 18, 2023, 1:33:14 PM5/18/23
to ASSEMBL...@listserv.uga.edu
https://www.mail-archive.com/assembl...@listserv.uga.edu/msg12525.html

On Thu, May 18, 2023 at 10:50 AM Schmitt, Michael <michael...@dxc.com>
wrote:

Lizette Koehler

unread,
May 18, 2023, 2:56:25 PM5/18/23
to ASSEMBL...@listserv.uga.edu
Did you check with Notepad++ Community



https://community.notepad-plus-plus.org/



Lizette

Abe Kornelis

unread,
Jun 3, 2023, 2:29:53 PM6/3/23
to ASSEMBL...@listserv.uga.edu
All,

based on the work by Charles Mills I created an updated/extended version
including all current instructions according PoP, more macros,
more register names, and more file types.

It is not perfect, but it does a reasonable job.

So I submitted it to the Notepad++ community.
They've taken it up in their library/repository at
https://github.com/notepad-plus-plus/userDefinedLanguages

If you want to give it a try, you can import
the definitions from that repository.

If there is sufficient 'demand' I'll consider working
with the Notepad++ community to improve their
formatting options so we get properly highlighted
assembler source.

Personally I find most annoying that I could not
define macro labels as a separate category.
Notepad++ is unable to distinguish between the
.labels and the .* comments.
Also. recognition of comments is inconsistent.

Kind regards,
Abe
===


Op 18/05/2023 om 19:33 schreef Janko Kalinic:

Jeremy Schwartz

unread,
Jun 3, 2023, 3:06:48 PM6/3/23
to ASSEMBL...@listserv.uga.edu
Good job on doing this. I found when I looked into this a while back that I ran into similar problems that you did as well. 
My 2 cents are that 1. NotePad++ is an excellent product without exception. 2. In my years of development experience I've never found one development environment that did it all and that you usually have to go with a combination of tools to get what you want. 3. Having said all that if you want HLASM highlighting go with VsCode and the Broadcom extensions for Hlasm. It does a great job with syntax highlighting, help, and definition support especially if you setup the macro definition support. 
Best regards, 
Jeremy 

Sent from Yahoo Mail on Android

On Sat, Jun 3, 2023 at 13:29, Abe Kornelis<a...@BIXOFT.NL> wrote: All,

Charles Mills

unread,
Jun 3, 2023, 4:18:52 PM6/3/23
to ASSEMBL...@listserv.uga.edu
Thank you Abe.

Frankly, Notepad++'s format recognition in general is about 80-90%. I was just working on a Rexx program and noticed it was off. Usually selecting the language type again -- just clicking Language Rexx or HLASM again -- reminds Notepad++ of what it is supposed to be doing.

Charles

Paul Gilmartin

unread,
Jun 3, 2023, 5:27:31 PM6/3/23
to ASSEMBL...@listserv.uga.edu
On 6/3/23 12:29:30, Abe Kornelis wrote:
>
> based on the work by Charles Mills I created an updated/extended version
> including all current instructions according PoP, more macros,
> more register names, and more file types.
>
> It is not perfect, but it does a reasonable job.
>
> So I submitted it to the Notepad++ community.
> They've taken it up in their library/repository at
> https://github.com/notepad-plus-plus/userDefinedLanguages
>
> If you want to give it a try, you can import
> the definitions from that repository.

Why Notepad++? I'd expect Kedit or The to be more familiar
to the HLASM community?

Better macro support? In what language are macros coded?

Portability? Is Notepad++ available on desktop platforms
other than one, or are the macros editor-agnostic? Of course,
there's WINE, VirtualBox, or VMWare. Which of those would
require a license fee?

--
gil

Ze'ev Atlas

unread,
Jun 3, 2023, 9:55:43 PM6/3/23
to ASSEMBL...@listserv.uga.edu
To GilFor the why question, there are a few answers that have to do woth reality
A. Most everybody is on WindowsB. Most everybody does not work with KeditC. Notepad++ became the de-facto industry standard, to the point that there are at least two Linux clonesZA
Sent from Yahoo Mail on Android

Paul Gilmartin

unread,
Jun 3, 2023, 10:17:52 PM6/3/23
to ASSEMBL...@listserv.uga.edu
--
gil
Моё судно на воздушной подушке полно угрей.
...+ ...| ...+ ...| ...+ ...| ...+ ...| ...+ ...| ...+ ...| ...+ ...| ...+ ...|

Paul Gilmartin

unread,
Jun 3, 2023, 10:31:30 PM6/3/23
to ASSEMBL...@listserv.uga.edu
(Forgive unintended previous reply.)
(Why do most plies here request personal, not list, eplies?)

On 6/3/23 19:55:15, Ze'ev Atlas wrote:
> T Most everybody is on Windows.

The operannt word is "Most".

... there are at least two Linux clonesZA

Cite, please. Do these accept Charles's and Abe's macros?

I find:
7 Best Notepad++ Alternatives For Linux
<https://itsfoss.com/notepad-alternatives-for-linux/>

The first is Wine -- guaranteed compatibility. Some of the others
are UI-compatible; unlikely to be macro-compatible.

--
gil

Charles Mills

unread,
Jun 3, 2023, 11:14:19 PM6/3/23
to ASSEMBL...@listserv.uga.edu
Geez, people. This was not a religious statement about platforms. This was a personal tool that I decided to share.

I don't have a product management department that decided which platforms to invest in based on extensive market research.

Why Windows? Because I have been using Windows since Windows 2. That's not a political statement, that's just a fact. Is it the best OS ever? No, the best OS ever is z/OS. <g> It's an OS that works much of the time and that I know and have. (Frankly, I also know MacOS pretty well because I am the IT department for a spouse, and to tell the truth I like Windows better. So shoot me.)

Why NP++? I dunno. I was unhappy with my previous text editor, whose name escapes me. I searched on Google, found NP++, downloaded it, and it worked. And the price was right. I have been using it ever since for HLASM, Rexx, and miscellaneous text-type files.

Why did I develop the file? I wanted highlighting for HLASM in the editor that I was already using.

I hereby grant all parties a free, unrestricted, perpetual license to not use it.

BTW @Gil, the macros in question are HLASM macros with .* comments, not some sort of NP++ XML macros.

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBL...@LISTSERV.UGA.EDU] On Behalf Of Paul Gilmartin
Sent: Saturday, June 3, 2023 7:31 PM
To: ASSEMBL...@LISTSERV.UGA.EDU
Subject: Re: Notepad++ language formatting

Ze'ev Atlas

unread,
Jun 3, 2023, 11:20:45 PM6/3/23
to ASSEMBL...@listserv.uga.edu
Perhaps,
As far as I can judge, Notepad++ is by far the most popular!
I did not check how much notepadqq is compatible with NPP language files, but even if not, it should have its own system. 
Regardless, notepadd++, as far as I can tell is more popular among young programmers, then VIM, Emacs and all other cryptic old style editors.
When I left ISPF behind, I promised myself not to learn any "yet another cryptic" editor, so I did not learn VI and neither Kedit.  I tried a few and NPP (and NQQ in Linux) are my (and many others ) happy choice
Ze'ev Atlas
| | Virus-free.www.avast.com |

Abe Kornelis

unread,
Jun 4, 2023, 5:45:21 AM6/4/23
to ASSEMBL...@listserv.uga.edu
Paul,

choice of editor (and platform) is another religious question.

To each his/her/their own - Notepad++ is my editor of choice
when working off the mainframe.

The highlighting was done to make my own life a bit easier.
And shared because others might benefit. That's all.

Kind regards & happy programming!
Abe
===


Op 03/06/2023 om 23:26 schreef Paul Gilmartin:

dave....@gmail.com

unread,
Jun 4, 2023, 6:25:13 AM6/4/23
to ASSEMBL...@listserv.uga.edu
> -----Original Message-----
> From: IBM Mainframe Assembler List <ASSEMBL...@LISTSERV.UGA.EDU>
> On Behalf Of Paul Gilmartin
> Sent: Saturday, June 3, 2023 10:27 PM
> To: ASSEMBL...@LISTSERV.UGA.EDU
> Subject: Re: Notepad++ language formatting
>
> On 6/3/23 12:29:30, Abe Kornelis wrote:
> >
> > based on the work by Charles Mills I created an updated/extended
> > version including all current instructions according PoP, more macros,
> > more register names, and more file types.
> >
> > It is not perfect, but it does a reasonable job.
> >
> > So I submitted it to the Notepad++ community.
> > They've taken it up in their library/repository at
> > https://github.com/notepad-plus-plus/userDefinedLanguages
> >
> > If you want to give it a try, you can import the definitions from that
> > repository.

Thank you Abe. I may give that a try...
.. not my original post but I will go ++1 for notepad++

>
> Why Notepad++? I'd expect Kedit or The to be more familiar to the HLASM
> community?
>

Possibly but I could really never get used to THE on windows. I always recommend it, and I sometimes use it for those who yearn for a Mainframe, but its not my go-to editor for windows/linux files.
.. it lacks many features I feel are indispensable on Windows, so THE has no tabbed windows, no support for different character sets or windows/linux line endings,

> Better macro support? In what language are macros coded?
> Portability? Is Notepad++ available on desktop platforms other than one, or are
> the macros editor-agnostic? Of course, there's WINE, VirtualBox, or VMWare.
> Which of those would require a license fee?

KEDIT needs a licence, is $39/machine. I have four machines. It also has only "legacy" support.
Notepad++ comes with parsers for many of the languages I write in. For me it’s a no-brainer. Its often updated for new formats. There is an active support forum.
So if you wish to stick with THE/KEDIT thats fine but for those of us who have changed, that should also be fine.

>
> --
> gil

Dave

Paul Gilmartin

unread,
Jun 4, 2023, 11:51:33 AM6/4/23
to ASSEMBL...@listserv.uga.edu
On 6/3/23 21:13:53, Charles Mills wrote:
> Geez, people. This was not a religious statement about platforms. This was a personal tool that I decided to share.

I was not advocating for THE or Kedit, merely observing that
they might be more familiar to HLASM programmers.

Given Windows, my favorite editor is Notepad++. Notepad displays
UNIX files as terraces. Wordpad displays UNIX files correctly,
but Saves them with Windows lineends. Notepad++ handles both
Windows and UNIX files correctly.

> Why did I develop the file? I wanted highlighting for HLASM in the editor that I was already using.
> ...
> BTW @Gil, the macros in question are HLASM macros with .* comments, not some sort of NP++ XML macros.

I'm puzzled. I had assumed the macros mentioned were to accomplish
highlighting for HLASM, and would have expected them to be written
in a desktop language such as VBA or .BAT or ... (Regina?), not
HLSAM, which I wouldn't expect the desktop to understand.

--
gil

Abe Kornelis

unread,
Jun 4, 2023, 2:50:51 PM6/4/23
to ASSEMBL...@listserv.uga.edu
Paul,

there's a difference in reference frame, causing confusion.

To highlight macros differently from opcodes,
Notepad++ needs a list of them.
That's the list of macros I referred to.
I extended the list to contain most macros from
SYS1.MACLIB and SYS1.MODGEN.

I'm sure every user will have their own set of
commonly-used macros. Those will have to be
added - which is pretty straightforward, actually.
No macros (pun intended) are needed to achieve that ;-)

Kind regards,
Abe
===


Op 04/06/2023 om 17:51 schreef Paul Gilmartin:

Charles Mills

unread,
Jun 5, 2023, 11:30:09 AM6/5/23
to ASSEMBL...@listserv.uga.edu
There are potentially three meanings for "macro" in this thread.

1. Part of what the formatting does is highlight z/OS macro names in the code. So if you code GETMAIN it knows that is a keyword, not some random token. There is a list of z/OS macro names in the file that makes that magic work.

2. Part of what the formatting does is highlight comments. If you code * Clear R2 then it knows to format that in green italics. HLASM has macro comments that begin with .* and unfortunately Notepad++ does not have any ability to recognize comments based on their first TWO characters. You just can't do that in a formatting file.

3. @Gil apparently assumed there were some sort of macros in the formatting process itself. A macro to recognize a comment or something like that. Nope, it does not work that way. There are no macros in the formatting file itself.

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBL...@LISTSERV.UGA.EDU] On Behalf Of Abe Kornelis
Sent: Sunday, June 4, 2023 11:50 AM
To: ASSEMBL...@LISTSERV.UGA.EDU
Subject: Re: Notepad++ language formatting

Paul Gilmartin

unread,
Jun 5, 2023, 12:54:34 PM6/5/23
to ASSEMBL...@listserv.uga.edu
On 6/5/23 09:30:05, Charles Mills wrote:
> There are potentially three meanings for "macro" in this thread.
>
> 1. Part of what the formatting does is highlight z/OS macro names in the code. So if you code GETMAIN it knows that is a keyword, not some random token. There is a list of z/OS macro names in the file that makes that magic work.
>
> 2. Part of what the formatting does is highlight comments. If you code * Clear R2 then it knows to format that in green italics. HLASM has macro comments that begin with .* and unfortunately Notepad++ does not have any ability to recognize comments based on their first TWO characters. You just can't do that in a formatting file.

I wouldn't regard those two as different -- just the same operation,
possibly using different colors.


> 3. @Gil apparently assumed there were some sort of macros in the formatting process itself. A macro to recognize a comment or something like that. Nope, it does not work that way. There are no macros in the formatting file itself.

I suppose that might be done by modifying the core code of Notepad++
itself, but I doubt that's what you did.

If I were doing such a repetitive operation in XEDIT or ISPF, I would
use external code in REXX, EXEC2, CLIST, ..., commonly called a
"macro". Has Notepad++ have such a facility for encapsulating
routine repetitive operations, apparently not called a "macro"
but something else. In what language might it be coded, even as
for XEDIT or ISPF I'd use REXX or CLIST?

--
gil

Charles Mills

unread,
Jun 5, 2023, 1:10:08 PM6/5/23
to ASSEMBL...@listserv.uga.edu
I suspect we are boring the cr@p out of everyone else but

> I wouldn't regard those two as different

Well, I suppose. I see a big difference between "if you see the string 'GETMAIN' or "FREEMAIN' or "ATTACH' highlight it" and "highlight any line that beings with .*" but yeah, diff'rent strokes ...

Abe used the term macro in the two different contexts: "I added more macros [to the list that includes GETMAIN]" and "I was disappointed that macro .* comments don't work." (Gross paraphrasing of Abe on my part.) Notepad++ refers to both capabilities as keywords, so that supports your view.

> I suppose that might be done by modifying the core code of Notepad++
> itself, but I doubt that's what you did.

Correct. IIIRC Notepad++ is gnu free but not open source. I could be wrong. In any event, that is not what I did. I used a supported customization-type facility.

It's done in XML. Here is what my actual formatting customization looks like:

<NotepadPlus>
<UserLang name="HLASM" ext="zasm" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="1" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00* 01 02 03 04</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
...
<Keywords name="Keywords1">A AD ADB ADBR ADR ADTR ADTRA AE AEB AEBR AER AFI AG AGF ...
...
<Keywords name="Keywords4">ABEND ALESERV ASASYMBM ATTACH ATTACHX ...

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBL...@LISTSERV.UGA.EDU] On Behalf Of Paul Gilmartin
Sent: Monday, June 5, 2023 9:54 AM
To: ASSEMBL...@LISTSERV.UGA.EDU
Subject: Re: Notepad++ language formatting

Paul Gilmartin

unread,
Jun 5, 2023, 3:11:32 PM6/5/23
to ASSEMBL...@listserv.uga.edu
On 6/5/23 11:10:03, Charles Mills wrote:
>
> ... XML ...

Ah! The language name I was looking for. Thanks. Now,
GIYF, the jargon seems to be "plugin" in place of "macro".

And, for self-reference, there appears to be a plugin, presumably
coded in XML, to format XML code.

--
Thanks again,
gil

Seymour J Metz

unread,
Jun 6, 2023, 7:13:18 AM6/6/23
to ASSEMBL...@listserv.uga.edu
What does "gnu free but not open source" mean? I thought that the official party line of the FSF was that "free" meant that the source was not only free but also under a "copyleft" license.

Why treat macros differently? Don't you want an HLASM editor to

* Recognize the statement structure, including
- comments
* column 1 * and .*
* after operand
- continuation
- label
* macro (.)
* normal
- opcode
- operand
* Recognize constants
- Immediate
- literal

Is there a reason to color some opcodes differently, with the possible exception of the structured programming macros?


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Assembler List [ASSEMBL...@LISTSERV.UGA.EDU] on behalf of Charles Mills [char...@MCN.ORG]
Sent: Monday, June 5, 2023 1:10 PM

Charles Mills

unread,
Jun 6, 2023, 8:34:01 AM6/6/23
to ASSEMBL...@listserv.uga.edu
Yes. I also want world peace and to be about two inches taller.

I don't know about licenses. They say this on their Web site:

Notepad++ is a free (as in "free speech" and also as in "free beer") source
code editor and Notepad replacement that supports several languages. Running
in the MS Windows environment, its use is governed by GNU General Public
License.

Yes, you are right about the source code:
https://github.com/notepad-plus-plus/notepad-plus-plus
Reply all
Reply to author
Forward
0 new messages