New enhancement for User Defined Language System



  • In the next version (v7.6.4) several UDL (User Defined Language) xml files can be loaded by Notepad++ - that allows to manage/share UDL more easily (for example, a UDL per file).

    • The old file userDefineLang.xml is kept in its old location and is still used.
    • The new folder userDefineLangs is added beside of the old UDL default file. Any UDL xml file can go into the folder userDefineLangs and will be loaded as UDL.
    • A UDL xml file must contain one (or several) user defined language(s).
    • The created UDL via UDL dialog and imported UDL are saved in userDefineLang.xml (default UDL file).


  • Wouldn’t it be more appropriate to name the new folder “userDefinedLanguages”?



  • @MAPJe71 said:

    Wouldn’t it be more appropriate to name the new folder “userDefinedLanguages”?

    It’s rather userDefineLang.xml file and userDefineLangs folder. It’s for aligning with the file and it’s abbreviation so it’s OK I think.



  • Where will this new folder be located?
    Alongside autoCompletion?



  • IMO “userDefinedLanguages” for the folder would be better for the long run, makes more sense language wise (English) and especially when the file “userDefineLang.xml” is fased-out.





  • After running the build from https://ci.appveyor.com/project/donho/notepad-plus-plus/build/job/n82i8ew6qjympvis/artifacts the userDefineLang.xml file is gone… Not tested with x64 build



  • Also can not exit NPP when create or import a new UDL via the UDL dialog



  • @rddim
    yes, i can confirm both.

    steps to reproduce:

    • take a new portable notepad++ 7.6.3 x86
    • open notepad++.exe (old 7.6.3 exe) and create a dummy udl
    • exit notepad++
    • download Notepad++.Win32.Unicode Release.exe (1.0.2578) copy it to the portable folder and open Notepad++.Win32.Unicode Release.exe
      (dummy udl is still present)
    • close notepad++
      now npp.7.6.3.bin\userDefineLang.xml will be deleted
    • reopen Notepad++.Win32.Unicode Release.exe
      (the dummy udl has disappeared)
    • create another dummy udl and try to exit notepad++
      now notepad++ will crash and the window can only be closed by killing the task


  • by the way @donho

    this is a really nice feature, once this little crash/delete bug is solved. 👍
    especially because it has not been mandatory split into one udl per xml.

    i can, for example, create my favourite multiple udl collections as one file packages, and name them e.g. BestOfMetaUDLCollection_Volume1.xml, WorstOfMetaUDLCollection_Volume13.xml 😉 and so on.
    they will not even get in conflict, if the same udl name is used in two installed udl volumes.

    (reader’s note: while testing, i also discovered, that i can have multiple old/new udl versions with the same name at the same time, as long as each of them is inside another custom_udl.xml. they will be listed twice … comes in very handy for comparing different versions of the same udl, without the need of renaming one, nor the need to open them in two separate notepad++ instances.)

    very much appreciated 👍👍👍



  • @rddim Thank you for the bug report. 2 bugs has been fixed here:
    https://github.com/notepad-plus-plus/notepad-plus-plus/commit/494b4bc0dba79511ca7673b7995a2205efdc8bfa

    @MAPJe71 said:

    Where will this new folder be located?
    Alongside autoCompletion?

    Yes.



  • @donho 👍

    splendid, i’ve tested your commit and can not reproduce any of the reported issues anymore.

    i’ve also tested what could happen, if we have multiple udl xml files with the same udl language name in each of them:

    all modifications to a multiple existing udl with the same given name, will be correctly written to the corresponding
    userDefineLangs\udlCollectionName.xml file (or userDefineLang.xml, if they were originally there) 👍

    much appreciated, cool feature



  • @Meta-Chuh

    I like your enthusiasm…for everything Notepad++ related, including the topic of this thread. How about compiling all of the information on UDL, including all the tricks and tips, and publishing it somewhere?



  • @Alan-Kilborn

    i agree with you, but i think it is not necessary to put topics like the new udl features in the faqs, as it is not a feature that will be used by the majority of notepad++ users.

    publishing too much information will clutter the faqs and i assume that people, who are capable of creating an udl, will use the search option of the notepad++ community forum 😉.

    if we get too many questions about the new udl features in the future, we all can re-evaluate together, if it makes sense to add this to the faqs.


    btw and off topic: alan, i guess i will try not disagree with you in the near future again … my experience has taught me, that you have good reasons and a very good sense of prediction. 👍



  • Yes, this is a great feature to have separated UDLs. I really hope that can be used to have an option to install UDLs via Plugins Admin (for example). My idea is to have a new tab for this and UDLs that are stored in a repository with option for the users to add and commit a new ones.



  • @Alan-Kilborn

    I didn’t mean in the FAQ here

    i’m in no position to publish anywhere else, except here at the community, and in this case you’ve addressed me directly, which also means not addressing members that have the needed authority to do so.

    knowledge provided in individual postings…and pull it together all in one place.

    i might be of service to answer single and simple questions in an understandable way, but i don’t think i am capable of writing a whole manual of this extent.

    would you have the time to do so ?
    if yes, i suppose it will also be one of the best guides around, as you are not yet very familiar with udl and therefore you are able to write a guide that can easily been understood by inexperienced users, due to writing it while learning to use it.

    reason: in my experience, many guides written by pro’s or by me, are difficult to understand, if a reader wants to start off from zero knowledge.
    and on the other hand, i’ve seen manuals, written by (former) beginners, which are perfect for both beginners and pros, as they are written in a way the author himself would have understood as a beginner, if he had such a guide when he started out himself.

    I don’t know about that!!!

    i suppose it’s sarcastic, but if not, you will understand if you re-read the only one post where i ever disagreed with you, and all of it’s surroundings.



  • Hi @donho ,

    Sorry for the off-topic question but when will this PR be merged:
    https://github.com/notepad-plus-plus/notepad-plus-plus/pull/5190 ?

    Are you also planning to merge PR https://github.com/notepad-plus-plus/notepad-plus-plus/pull/5225 ?



  • A few concerns on the proposed UDL enhancement…

    a) What will be the file naming convention of the individual UDL’s?
    b) UDL’s are user settings. Are user settings located in the AppData area and not in Program Files?
    c) Should the Auto Complete files, which are considered user settings, (also) be located in the AppData section?
    d) I wish to package together the UDL file(s) and Auto Complete file(s) as one zip file. Will there be file name conflicts?

    Scot-65



  • @scot-65

    a) What will be the file naming convention of the individual UDL’s?

    the file name can be literarily anything.xml.
    the included udl or multiple udls in this “collection” do not have to match the .xml file name.

    b) UDL’s are user settings. Are user settings located in the AppData area and not in Program Files?

    yes, they will be created at %AppData%\Notepad++\userDefineLang.xml, and can be moved/copied/renamed to %AppData%\Notepad++\userDefineLangs\.
    this folder will probably be the preferred location for a future deployment of a descriptive yourUdlCollection.xml, instead of overwriting an existing userDefineLang.xml.

    c) Should the Auto Complete files, which are considered user settings, (also) be located in the AppData section?

    this is a tricky question, because on one hand they are currently located at %ProgramFiles[(x86)]%\Notepad++\autoCompletion, but on the other hand it would make sense to allow a user specific version at %AppData%\Notepad++\autoCompletion\ which is, afaik, currently not implemented.

    d) I wish to package together the UDL file(s) and Auto Complete file(s) as one zip file. Will there be file name conflicts?

    with the new udl collections: no, as they can have any names, and don’t reside at the same location as a default userDefineLang.xml.
    with the autocompletion.xml files themselves yes, as a same name xml, like html.xml, would replace the existing file at %ProgramFiles[(x86)]%\Notepad++\autoCompletion.

    note: this information is based on the current pre-release builds, with the newest udl features already implemented.
    anything currently known, might (or might not) still be subject to change.



  • Could you please search for these .xml files in %ProgramFiles%\Notepad++\userDefineLangs folder as well?
    We would like to preinstall extra UDL files for all our users.


Log in to reply