I'm working with a programming language without a proper IDE and I'm using notepad++ as my editor. I've set up a user-defined language and it's working pretty well, but I have a problem in that if you enter a keyword it must match perfectly. I'll explain what I mean.

If I add 'string' as a keyword and I enter 'string' into the text area that it becomes highlighted.

However if I enter 'string(variableName)' then it doesn't highlight.

If I turn on prefix mode it highlights the whole 'string(variableName)' when I only want it to highlight 'string'.

It may be that I just can't do this in notepad++ but I wondered if anyone had come across (and solved) a similar issue.

Thanks in advance.


even though it has been a while...

If you want the keyword 'string' to be highlighted when typing 'string(variableName)' you need to define '(' as an operator or type 'string (variableName)' [note the blank space!], so that npp recognizes the word boundaries correctly.

Hope this helps somebody.


Consider SynWrite editor, also free, which has fully-customizable lexer editor, with more settings than NP++ UDL.

  • Unfortunately I'm not allowed to add software to my work computer, so I need to make do with what I have. – Paul Brindley Sep 14 '14 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.