Notepad++ syntax highlighting

Jskid

Member
Feb 12, 2011
145
0
0
I'm doing ARM programing and tried to setup syntax highlighting with Notepad++. I created a user defined language but it doesn't work properly, for example it simply misses the highlighintg on some keywords. Maybe it's a problem to do with not recognizing the end of a line.
 

Jskid

Member
Feb 12, 2011
145
0
0
Cool story bro...

What exactly is your question? There are lots and lots of forum threads, web pages, blogs, and tutorials on user defined languages in notepad++ available via google:
www.google.com/search?q=notepad%2B%2B+user+defined+language
Ok I figured out what's going wrong. The commas are messing things up because notepad++ treets it as part of the expression.
For example if I have
Code:
mov r0, r1
I would need to define a style for "r0," not just "r0". Is there any easy way to fix this?
EDIT: can rules be made case insensitive?
 

veri745

Golden Member
Oct 11, 2007
1,163
4
81
I think you need to add ',' as an operator.

I also see an checkbox option for "Ignore case" in the User-defined dialog; not sure exactly how it works, but you could try it out. Another option is to add any of the valid options that you want to accept as keywords.

e.g. "word, WORD, Word" in your keyword lists.
 
Last edited:

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Instead of Notepad++, try this superior, excellent app for your syntax highlighting:

Arachnophilia

It's better.

Except that it's also Java and ugly as hell. And the webpage doesn't even say if it does ARM ASM syntax highlighting out of the box so if he's going to have to write a highlighting "theme" for it why not stick with Notepad++ or something that really is better like gvim?
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Except that it's also Java and ugly as hell. And the webpage doesn't even say if it does ARM ASM syntax highlighting out of the box so if he's going to have to write a highlighting "theme" for it why not stick with Notepad++ or something that really is better like gvim?

I'm glad I'm not the only one who thought that interface looked horrible.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net


I don't undertand what you mean by that. Please explain.

Do you think a Java layer between the OS and the app is a bad thing?
If so, why?

My experience with Java applications is that they perform sluggishly and have ugly UIs that don't adhere to the conventions of any of the OSes the programs run on.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
My experience with Java applications is that they perform sluggishly and have ugly UIs that don't adhere to the conventions of any of the OSes the programs run on.

This. I will avoid Java apps on Windows at almost any cost because of how poorly they look, integrate and perform.
 

ringtail

Golden Member
Mar 10, 2012
1,030
34
91
My experience with Java applications is that they <cut> don't adhere to the conventions of any of the OSes the programs run on.

But what you're complaining about is the very point and strength of Java, independence from the idiosyncrasies of some particular os, so the app that sits atop Java is freely portable across various os's.

That's its strength, not a weakness.
 

veri745

Golden Member
Oct 11, 2007
1,163
4
81
But what you're complaining about is the very point and strength of Java, independence from the idiosyncrasies of some particular os, so the app that sits atop Java is freely portable across various os's.

That's its strength, not a weakness.

Sometimes they are one in the same, strengths and weaknesses.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
But what you're complaining about is the very point and strength of Java, independence from the idiosyncrasies of some particular os, so the app that sits atop Java is freely portable across various os's.

That's its strength, not a weakness.

But when it doesn't integrate with the system well and looks and runs like shit, I'm going to only ever even consider the app as a last resort. If I can find a native app that does the bare minimum of what I need I'm going to choose it over the Java one every time.
 

Evadman

Administrator Emeritus<br>Elite Member
Feb 18, 2001
30,990
5
81
I use jedit as I prefer the interface over notepad++. It does assembly ARM syntax highlighting, but I usually use it for SQL, ASP, javascript and html coding. I love it because I can write a sql proc and with a few mouse gestures I can install the proc on a test server, grant execute, test it, then install it on production, all without leaving jedit.

Plus, it has a soduku plugin that comes in useful when code is compiling.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
I use jedit as I prefer the interface over notepad++. It does assembly ARM syntax highlighting, but I usually use it for SQL, ASP, javascript and html coding. I love it because I can write a sql proc and with a few mouse gestures I can install the proc on a test server, grant execute, test it, then install it on production, all without leaving jedit.

Plus, it has a soduku plugin that comes in useful when code is compiling.

I used jedit for awhile. Definitely one of the better Java editors, but even so it still has a strange UI, or did at the time. I also found it fairly pokey, but again this was a few years ago.
 

Evadman

Administrator Emeritus<br>Elite Member
Feb 18, 2001
30,990
5
81
I used jedit for awhile. Definitely one of the better Java editors, but even so it still has a strange UI, or did at the time. I also found it fairly pokey, but again this was a few years ago.

I don't like the default UI, I use a bunch of plugins to improve it; such as buffer tabs.
 

Cogman

Lifer
Sep 19, 2000
10,284
138
106
But what you're complaining about is the very point and strength of Java, independence from the idiosyncrasies of some particular os, so the app that sits atop Java is freely portable across various os's.

That's its strength, not a weakness.

Not really when you consider there are a thousand different ways to get the same benefits while not feeling slow or looking like crap. Want to escape OS idiosyncrasies? There are TONS of cross-platform libraries for languages like C and C++.

Java isn't a bad language, and I'm sure that it can be used to make tools that don't look/feel like crap (freemind comes to mind when I think of a well written java app) the problem is that java has a lot of crappy developers who use it as their language of choice. These crap developers would write crap in whatever language they got their hands on.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Not really when you consider there are a thousand different ways to get the same benefits while not feeling slow or looking like crap. Want to escape OS idiosyncrasies? There are TONS of cross-platform libraries for languages like C and C++.

Java isn't a bad language, and I'm sure that it can be used to make tools that don't look/feel like crap (freemind comes to mind when I think of a well written java app) the problem is that java has a lot of crappy developers who use it as their language of choice. These crap developers would write crap in whatever language they got their hands on.

I can't think of a single reason to use Java over Python or Ruby if you're working on Linux or want cross platform, or C# if you don't care about that and are working on Windows. It's probably got a better GUI toolkit than Python or Ruby at this point, but GUIs are exactly where cross-platform languages collapse.