Notepad++ syntax highlighter problem, help!


#1

Hi guys, I’m just starting my first WIP and I have a bit of a problem with Notepad++ and choicescript syntax highlighter that I downloaded.

The problem is this: Notepad++ absolutely INSISTS on treating apostrophes ( ’ ) as single quotation marks instead as… apostrophes (duh). So what happens is that whenever I place an apostrophe in my text, and there’s plenty of those in english language, the damn thing decides that any text between it and the next apostrophe is actually a quotation/text and does not perform highlighting on it. It even greys it out ffs!
This problem is, of course, compounded by the fact that choicescript does not use double quotes or delineates game text in any way, quite unlike any other programming language.

So, how do I explain to Notepad++ that apostrophes are APOSTROPHES rather than single quotation marks (and who even uses those things anymore?)

Any help would be much appreciated because it really is driving me crazy.


#2

Hi, I don’t have a notepad++ machine to hand right now but there is a GUI under one of the toolbar menus (Languages? Or something) that will allow to edit the current style properties. You should be able to edit the delimiter list in there.


#3

Did you get the one from the wiki? I remember removing quotation marks (both single and double) from the list of delimiters. As CJW points out though, you can edit it yourself with the inbuilt tools (it’s fairly user friendly).


#4

Thanks for advice guys, but my problem is still not solved :(.

I did try checking for delimiters in the User Defined Language editor but I couldn’t find the LIST of delimiters - just “Delimiter & Style” options under “Operators & Delimiters” tab - and the fields are all empty. I guess that is not it?

So where could this list of delimiters be hiding? I feel damn silly for not finding it but I feel like I’ve checked absolutely everywhere. Could someone point me to exactly how to access this list?


#5

1: Define Language under the language menu
2: Select the language
3: Select Operators and Delimiters
4: That should be the list.


#6

@fishbait I also had this issue (I’m assuming you are using the same “package” I found in the foruns).
Edit: Thanks @RETowers for the picture
The ’ delimiter was in the Delimeter 2 section in the package i got here in the foruns


#7

Ok, that’s the screen I’ve been studying so far, but this still does not solve my original problem… And that is that highlighting simply “switches off” between two apostrophes. This obviously creates huge problems as roughly 50% of my code gets greyed out because notepad++ considers everything between two apostrophes as quote or plain text. In other words, it insists that apostrophes are “single quotation marks” which is what I’m trying to switch off.

To illustrate

Hello guys. What’s up!
*choice
#Wonderful, great!
*goto happydays
#None of your business.
*set rudeness +10
*finish
#It’s raining today.
*finish

So, basically the whole of text between apostrophe in “What’s” to apostrophe in “It’s” is greyed out as if it was a text string, with no syntax highlighting.
That’s the problem and I’m at my wits end trying to solve it. How to get Notepad++ to recognize apostrophes as apostrophes rather than as quotation marks?


#8

There is no difference between apostrophes as apostrophes and quotation marks (that is to say, there’s no way for Notepad++ to distinguish the two). Turning it off is the only option.


#9

Ok, but where? Where is this list of delimiters? The place where ’ and " are defined as delimiters?


#10

Ok this might be a keyboard-OS language thingy, but ’ and " are 2 completely different characters to my notepad so I have " as a delimiter but erased the ’ one

the delimiters are right bellow the Styler and operators boxes @fishbait


#11

It should be on the page I showed in the image. Follow the instructions above, and if you can’t find it, say what you do see (or better yet, take a screenshot).


#12

Ok, solved!

Thanx RETowers - the solution was on that page after all.

I’m still not sure how the problem came to be or really how I managed to solve it, but it’s fixed now.

I had several versions of highlighter loaded up (don’t ask) and the delimiters appeared in some, but didn’t appear in others (?). So, when I inspected the options of the language I’m using delimiters didn’t show but they were still applied on the text. Why? I haven’t the foggiest. The breakthrough came when I inspected all versions of the highlighter and noticed the difference on the define page. So, I removed all versions of the highlighter except the one which displays ’ and " as delimiters, restarted the thing, removed the delimiters and once more restarted notepad++ just to make sure. It’s working fine now.

Thanx for your help guys and sorry if I was too much of a bother!