coussej
coussej

Reputation: 810

Custom code highlight Notepad++

I am creating a custom code highlight for notepad++. What I want to do is the following:

some fieldnames are writen in the code with a ' in front of their name, for exampe

if 'variable = "test" then ...

I would like to highlight these words, but notepad++ does not seem to allow a delimiter starting with ' and ending with a space, not does it allow space as an escape character. Also, using ' as a keyword and enabling prefix mode has no effect. Anyone has a suggestion? Should I use another expression to let notepad recognise the space/' ?

Thanks in advance!

Upvotes: 2

Views: 1470

Answers (2)

StreakS
StreakS

Reputation: 21

If you only need to highlight a single word, you can use a keyword in prefix mode. However when using single or double quotes in a keyword, they need to be escaped with a backslash. So your keyword would be:

\'

Upvotes: 2

Nate Allen
Nate Allen

Reputation: 3239

This may not be possible in notepad++. I can get the behavior you want using a character other than a single quote, like a back-tic, but it doesn't seem to work with single or double quotes. I suspect those characters are treated special within the syntax highlighter.

Upvotes: 1

Related Questions