How to use the "User Defined Language" tool?
-
The NPP User Defined Language tool should be very useful with my preferred language, but it’s limited (handicapped) in some of its options. Is there any way to understand its many cryptic selections? For example, what is “Prefix Mode”? Or what is “Code 1 Style”? Further, is there any way to permanently add my language choice to the choices listed?
-
@James-Burke-0
Well a good place to start would be reading the relevant section of the online manual here.There are also user created options available. By looking at those you may find a good starting point to build for yourself. That link is further down in the section I linked to.
Also search this forum as others have also been down the same path and had to learn. That’s the only way you will be able to generate and update a UDL, by reading copying, changing.
Terry
PS I updated you so you can insert a link if you need to, 0 upvotes prevents that.
-
@Terry-R Thanks for the reply! It’s taken me almost a year to find my way back here since the forum appears to block my login, so I keep trying. Not sure if this reply will appear. Anyway, FWIW, I did as you suggested and created a moderately useful UDL, but it was deleted by a subsequent NP++ update. Since then the UDL tool has changed and I need to start from zero again. What I’m looking to have is a UDL for a typical dBase program (“.prg”). There’s many prg variants (dBase, VP-Info, Clipper, Fox, etc) that one UDL would be useful for all versions. They’re still used widely because of the speedy new Windows/Linux emulators that have appeared.
-
@James-Burke-0 said in How to use the "User Defined Language" tool?:
taken me almost a year to find my way back here since the forum appears to block my login
The forum doesn’t “block” logins of non-banned accounts. Your account is not banned, so there wasn’t anything on our end actively trying to block you from logging in.
but it was deleted by a subsequent NP++ update
Notepad++ updates don’t delete UDL or other user-configuration options, unless you intentionally delete your
%AppData%\Notepad++
folder or something similar. Even uninstall and reinstall usually keeps the%AppData%\Notepad++
folder intact, so you keep your settings even after an uninstall/reinstall.Since then the UDL tool has changed and I need to start from zero again.
The UDL interface has not significantly changed in the last decade. Unless you were in a decade-old version of Notepad++ last year, and are in a modern Notepad++ now, there isn’t anything significant that has changed to the UDL interface or behavior. (In fact, the lack of fixes and improvements to UDL is one of the biggest complaints I have about Notepad++. UDL is virtually stagnant.)
There’s many prg variants
@Lycan-Thrope’s “dBasePlus” UDL (along with auto-completion and function-list definitions) have been recently added into the UDL Collection – you might want to download those files from there, and see if you can start from that known-working UDL (or if it’s sufficient for your needs).
-
@James-Burke-0 ,
Unfortunately, every one of thosevariants
has NON-Standard extensions, so it would be virtually impossible to do a oneUDL to rule them all
type of thing. The current xBASE, doesn’t work with plain dBASE, although much of it will, but it doesn’t come close to what was needed for dBASE Plus, an OOP version of dBASE, which is why I created that one with a lot of help from the folks around here.The language syntax differences would drive you mad, and unless you’re willing to create a lexer to handle them all, based on some criteria like file extensions, stock boilerplate code at the start of files, etc…you’ll be working your tail off to track down all the reference material needed plus writing, editing and fixing the variances that can occur between variants.
It took me a year to complete the dBASE Plus UDL that, thanks to @PeterJones , is now in the UDL languages repository as he mentions above. You can try and use that or the xBASE version as a start.
This won’t be a project for the faint of heart, so unless you’re ready to take on that task, I’d stick to only worrying about the variant that you need to work with.