UDL suggestion - switch to general regular expressions
-
Hello,
I have recently experienced a sizable dose of frustration when I tried to implement a few very simple UDL rules for Forth (see here: https://notepad-plus-plus.org/community/topic/12820/how-to-fix-bugs-in-custom-language-highlighting )
Why don’t we just dump the whole UDL setup, which is quite complicated and yet very inefficient, as it appears, and why don’t we just replace it by a collection of regular expressions linked to the respective styling? There could still be some simple tool to generate rules from lists of keywords or operators (building RE from a list is quite trivial), but for any other elements there would be much more flexibility.
I think maintaining the complex set of forms for UDL is not very useful if it cannot highlight even common situations in many common languages.
-
I’m guessing the UDL was developed by someone who wanted something to highlight unsupported file types in a manner that the average person can make use of. Without it, you would have to write a lexer for Scintilla, and not many NPP users are going to do that.
I wish the UDL was more powerful (supporting regex in some ways, for example), but it offers a decent set of options for highlighting many types of “non-standard” files. I have certainly put it to good use–I have 13 UDL file types. :-)
I’m afraid that your desire can only be met by someone who shares that desire to a great degree and who has the ability to write an NPP plugin that will fulfill that desire.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login