Create a User Defined Language from existing

  • Hey All,

    I wish to make my own Assembly language for my project.
    Is there a way to use the existing Assembly in Notepad++ by creating my own version based on what’s already in?


  • @Bence-Gyula-Bujtor

    there is no direct export/import way to do this.
    What you need to do is
    Open langs.xml file which is either under %APPDATA%\notepad++ or within
    installation directory, depends on your configuration, copy the keywords and put it into
    the new UDL keywords box(es).
    Instead of the file you can use the GUI -> Settings->StyleConfigurator->YOUR_LANGUAGE
    and click through the names under Style to get the listed keywords.


  • will there be a way to do this in the future? directly. because I also want to modify a few aspects of the Language I use.

  • @Bence-Gyula-Bujtor
    Just to make sure that you mean UDL1 based on UDL2.
    This should be easy enough since every UDL is based on textual definition.
    You will never be able to create a UDL that is based on Scintilla Lexer since these are implemented in C.

  • @Claudia-Frank This solution is good to recreate styling based on keywords, but is there a way to find out the configurations about operators and delimiters from standard languages?

    I would like to have a new UDL combining the standard styling for html, xml and sql and add some specific user language keywords.


  • @Yoan-Soucy ,

    Sorry. The UDL and the Lexers are two separate bits of code, so you cannot just “inherit” or “export” the original lexer to a UDL.

    However, you can add extra highlighting to any builtin lexer (like the HTML or XML or SQL lexer) or to a User Defined Language (UDL) using regexes via the script that @Ekopalypse shares in his github repo … this might allow you to provide the extra syntax that either the lexer alone or the UDL alone won’t give you.

Log in to reply