Menu

New UserDefinedLanguage module

Loreia2
2011-07-30
2015-04-30
<< < 1 .. 11 12 13 14 > >> (Page 13 of 14)
  • Loreia2

    Loreia2 - 2014-01-29

    Hi mzvarik,

    It doesn't allow to add a parsing to existing one, like HTML.

    no, UDL is a completely separate styler. It has no effect at all on existing built-in code parsers.

    BR,
    Loreia

     
  • AZJIO

    AZJIO - 2014-01-30

    I suggest to group that it was obvious

    Group
    Group

     
  • Loreia2

    Loreia2 - 2014-01-30

    Hi AZJIO,

    thanks for your interesting proposal.

    BR,
    Loreia

     
  • AZJIO

    AZJIO - 2014-03-09

    _open(20, 40, 50)
    Numbers aren't highlighted here. It is necessary as in the "Operator 1"

     
  • Loreia2

    Loreia2 - 2014-03-09

    Hi AZJIO,

    just deine , ( ) as Operator1 style, and numbers wil be highlighted.

    BR,
    Loreia

     
  • AZJIO

    AZJIO - 2014-03-10

    Thanks

    You can do regular expression? Using group or special operator (( ))
    For Example:
    (?x)\ [/?\w+?\ ]
    To capture the BBCode

     

    Last edit: AZJIO 2014-03-10
  • Loreia2

    Loreia2 - 2014-03-10

    Hi AZJIO ,

    regex is not supported. I'd like to add that functionallity in next major revision (UDL 3.0). Up to then you will have to list all possible keywords manually.

    BR,
    Loreia

     

    Last edit: Loreia2 2014-03-10
  • xsxs

    xsxs - 2014-03-13

    First I really would appreciate that changes of a userdefined language are save immediately and not at close of npp - I lost all the changes at backup or if win7 crashes (~ 1 or 2 times a month)

    Second I would appreciate if the autocompletion as of the start of the (new) file would 'know' all the keywords of the actual language file (userdefined or standard) and not only after a keyword has been used the first time.

     
  • Loreia2

    Loreia2 - 2014-03-13

    Hi xsxs,

    First I really would appreciate that changes of a userdefined language are save immediately and not at close of npp - I lost all the changes at backup or if win7 crashes (~ 1 or 2 times a month)

    Generally Win7 is quite stable if you have stable drivers installed. Such often crushes indicate a serious problem. You should look it up.
    It is hard to trigger saving to file automatically directly from the UDL because it would mean to save the file each time you type something. I guess I could add a save button, or to trigger saving when UDL dialog GUI is closed. I will think about it.

    Second I would appreciate if the autocompletion as of the start of the (new) file would 'know' all the keywords of the actual language file (userdefined or standard) and not only after a keyword has been used the first time.

    That is an excellent proposal. It definitely goes to TODO list!

    BR
    Loreia

     
    • xsxs

      xsxs - 2014-03-13

      1) A save button would be a very good solution!!
      2) Thank you! Now I am waiting for it ;)

       
  • Jan Schreiber

    Jan Schreiber - 2014-03-14

    Second I would appreciate if the autocompletion as of the start of the (new) file would 'know' all the keywords of the actual language file (userdefined or standard)

    This functionality exists already, see http://sourceforge.net/apps/mediawiki/notepad-plus/?title=Auto_Completion

     
  • AZJIO

    AZJIO - 2014-03-15

    xsxs
    You can restart Notepad++ and it will save all settings. This applies not only to userDefineLang.xml, but also to shortcuts.xml.

    Loreia2

    I could add a save button

    it is better to close the window let saves.

    Button "Create New ..." and "Save As ..." a little confusing. The button "Save As ..." allows greater functionality, including the functionality of the button "Create New".

     

    Last edit: AZJIO 2014-03-15
  • Loreia2

    Loreia2 - 2014-03-16

    Hi AZJIO,

    I agree, I was thinking to rename it to "Copy as", there will also be a "Save" button that will do actual saving to XML file.

    Hi Jan,

    you are right, the only thing needed was to save lang_name.XML to APIs folder.

    Hi xsxs,

    both features are now implemented, they will be part of UDL 3.0

    BR,
    Loreia

     
  • AZJIO

    AZJIO - 2014-03-31

    If I use a black theme, it is necessary to set by default it in settings.

     
  • Loreia2

    Loreia2 - 2014-03-31

    Hi AZJIO,

    If I use a black theme, it is necessary to set by default it in settings.

    What do you mean by this?

    Default style should follow theme colors. So, the best thing to do is to create one UDL for light, and one for dark background.

    BR,
    Loreia

     
  • AZJIO

    AZJIO - 2014-03-31

    I need to specify manually a background for each keyword
    To reduce sufferings, I open the XML file and I insert color of a background.
    It is heavy to set color approximately.

    Black

     
  • Loreia2

    Loreia2 - 2014-04-01

    Hi AZJIO,

    that is painful, and it is only going to get worse in UDL 3.0 with 32 Keyword and Delimiter sets. I guess I could make other keyword types follow background setting of Default type.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    after user changes default style, run for loop on all other styles

    for keywordX in allKeywords:
    if keywordX.bgColor == black: # black is the default
    keywordX.bgColor = default.bgClack
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Would that be better?

    BR,
    Loreia

     
  • AZJIO

    AZJIO - 2014-04-01

    if keywordX.bgColor == black:

    Why to check?
    At once to take as a basis color by default.
    Not only color of a background, but also color of a font.
    All of the buttons (Styler) that cause the color selection dialog should initially use the color of the chosen theme.
    Settings->Style Configurator->"Global Styles : Default Style" - These values of color have to be used

     
  • Loreia2

    Loreia2 - 2014-04-01

    Hi AZJIO,

    Why to check?
    At once to take as a basis color by default.

    That would reset any changes user might have done on keyword stylers. I don't want that. If user has set Keyword1 to have fg:blue and bg: yellow, then dialog shouldn't mess with Keyword1 on its own.

    But it makes sense to use current global default style as basis for new UDL language. I will implement that.

    BR,
    Loreia

     
  • miro

    miro - 2014-04-01

    Hi Loreia2,

    I'm want to use your UDL2.0 for "Cadence SKILL", I have the language file from the library
    how ever I would like to improve it to have similar behavior as the build in LISP (as SKILL is based on LISP) language. Problem is that I struggling with folding. I can not figure out how to set the folding to end at the right "end" bracket ).

    I hope you will help me or at least give me some link to study from.

    Regards,
    Miro

    EDIT:

    Here some code example

    procedure( SetMetalsVisible()
    leSetAllLayerValid( t )
    leSetEntryLayer( '("metal1" "drawing") )
    leSetAllLayerVisible( nil )
    foreach( laylsw list(
    ("metal1" "drawing")("metal2" "drawing")
    `("via1" "drawing")
    )
    leSetLayerVisible( laylsw t )
    leSetLayerSelectable( laylsw t )
    ) ;
    ); end procedure

    Is it possible to set the folding open as "procedure"? and make it stop on the right )?

     

    Last edit: miro 2014-04-01
  • Loreia2

    Loreia2 - 2014-04-02

    Hi miro,

    UDL documentation is here: http://udl20.weebly.com/

    In this example you can define folding as Folding in code 2 style:
    Open: procedure
    Close: "end procedure" (don't forget quotes)

    Also define braces and semicolon as Operator1 type, and that should do the trick.

    BR,
    Loreia

     
  • miro

    miro - 2014-04-02

    Hi Loreia,

    Thanks for quick reply.

    I tried this (or similar) before, but I have problem that semicolon is Comment line Open. If I set the semicolon also for the Comment it doesn't work correctly (folding), if I remove semicolon from Comment then folding works. Any ideas?

    Regards,
    Miro

     
  • Loreia2

    Loreia2 - 2014-04-02

    Hi miro,

    but I have problem that semicolon is Comment line Open.

    in that case define "end procedure" as Close keyword for Folding in comment type.

    This will work, but the downside is that you need to have a comment at the end of every procedure. In case you forget to add a comment, folding will break.

    BR,
    Loreia

     
  • miro

    miro - 2014-04-02

    Thanks a lot,

    Now it works.

     
  • miro

    miro - 2014-04-03

    Hi Loreia,

    Just for info - Do you plan for your UDL 3.0 support for such type of languages as LISP which use brackets for enclosing commands?

    Regards,
    Miro

     
  • Loreia2

    Loreia2 - 2014-04-03

    Hi miro,

    I never work for specific languages, UDL features are generic.
    In this case, UDL 3.0 will work because I plan to make foldable delimiters, which would allow folding of any block of code in braces.

    You may try to experiment with that feature in UDL2 by defining Comments as
    Open: (
    Close: )
    And ticking Allow folding of comments. Similar feature will be available in UDL3 for every delimiter.

    BR,
    Loreia

     
  • Charles Rheault

    Charles Rheault - 2014-04-03

    The UDL2 help needs more example on the delimiters section of the Operators & Delimiters tab.
    I have a specific formatted text file that a CAD program outputs that helps determine what settings are enabled and even the order of their assignments.
    I need a delimiter pair that only is recognized at the beginning of a line and starts with on open parenthesis ( and closes with ): And, there is always a space following the ):, so if I could get it to see the ):[space] as the close delimiter, that would probably meet my needs.
    One reason I need this to work, is that in this files syntax are a lot of shell like syntax $(some_variable) as well as many variable names not in any delimiters. There are also liberal scaterings of { } and [ ] within the file. To make matters worse, some of the text in the file are filenames, with and without paths, and a number of the paths have ( ) in some of the folder names.
    Are these special notations for things like beginning of line, end of line, spaces, the ability to specify special characters using ASCII numbers or can some type of RegExpr be used in UDL2?
    Exactly how does the escape entries work.
    Thanks

     
    • jasper.p.jenkins

      Hi Charles, Mind if I ask what program you are using?

       
  • Loreia2

    Loreia2 - 2014-04-03

    Hi Charles,

    Are these special notations for things like beginning of line, end of line, spaces, the ability to specify special characters using ASCII numbers or can some type of RegExpr be used in UDL2?

    None of these options is available in UDL2.
    Only Line comments can be restricted to Beginning of line.

    UDL3 will have positional formatting for every keyword type, including Delimiters. Only then will you be able to define Delimiter1 ( delim1 ): and Delimiter2 $( delim2 ), and have Delimiter1 restricted to Beginning of line.

    BR,
    Loreia

     
  • Charles Rheault

    Charles Rheault - 2014-04-03

    I also finally figured out how to open the help page on delimiters - you have to hover over the Home button and then move your cursor down and the Delimiters menu appears.
    Although it does not do all that I hoped, the help showed me some things to try which should be useful.
    The dialog box is too tall. On my 22" monitors, it does not fit vertically and docking it covers a lot of editor space.

     
  • Loreia2

    Loreia2 - 2014-04-03

    Hi Charles,

    new GUI is being worked on, UDL3 will have a completely new GUI that will fit on any screen.

    BR,
    Loreia

     
  • miro

    miro - 2014-04-08

    If you plan some localizations (transtaltions) for the new help, I can help with translation to Slovak.

     
  • Marcopolo Ramos

    Marcopolo Ramos - 2015-01-08

    Hi Loreia

    Sorry to ask this in here, but couldnt find the answer elsewhere.

    Can I have a 2 word delimiter?

    For example

    Open: "Initiate Test"
    Escape:
    End: "Terminate Test"

    I have no problems with one word delimiter, but how can I have a 2 word one?

    is it possible?

    thanks and BR.

     
  • Loreia2

    Loreia2 - 2015-01-10

    Hi Marcopolo,

    no, this is not supported. The best thing you could do is to define outer delimiter:
    Start: Initaite
    End: Terminate

    And inner delimiter:
    Start:Test
    End: Test

    And have Inner nested within Outer Delimiter.

    Best regards,
    Loreia

     
  • Anonymous

    Anonymous - 2015-01-10
     

    Last edit: Anonymous 2015-01-10
  • Marcopolo Ramos

    Marcopolo Ramos - 2015-01-12

    Thanks for the answer Loreia

    Its kinda working as I want now.

    I have problems with words that start with "Initiate" like "initiated" or "initiateRun030" etc. its taking those words as the open delimiter.

    I need a way to diferentiate "initiate" from "initiateRun###", "initiate<other words="">".

    But playing as you suggested is giving some good results, and others not as good, but something may work :)

    BR
    Marcopolo

     

    Last edit: Marcopolo Ramos 2015-01-12
  • Loreia2

    Loreia2 - 2015-01-14

    Hi Marcopolo,

    try to define longer words (like "initiated" and "initiateRun030") as Operator1 type. That should prevent them from triggering Delimiter start sequence.

    BR,
    Loreia

     
  • Lexxter

    Lexxter - 2015-01-14

    Hello. I have some questions...

    1. Why is there only one delimiter keyword? Is it possible to use separate lines like delimiters1/2/3? Or even user-named, by editing the file?

    2. I'd like to define colors by name, can UDL files work with variables?

    3. Where is npp saving UDLs?

     
  • Loreia2

    Loreia2 - 2015-01-15

    Hi Lexxter, I didn't quite understand your questions.

    1. There are 8 delimiters, not just one. Can you clarify this question?

    2. What do you mean by "work with variables"? UDL allows defining colors for each keyword type.

    3. In file userDefineLang.xml, this is found in "C:\Program Files\Notepad++" on XP and "%APDATA%\Notepad++" (C:\Users\<login>\AppData\Roaming\Notepad++) on Vista and newer.

    BR,
    Loreia

     
  • Lexxter

    Lexxter - 2015-01-17

    Thanks for the quick response :)

    1. Delimiters are delimited by 00 .. 23 in one string, while all other sections of the UDL use xml as a delimiter. I wanted to name them something other than delimiter1/delimiter2 but with the 00 01 02 03 = delimiter1, this would not work, so I think the answer is no.

    2. I meant variables like Red = FF0000. Using styles with UDL would be ideal.

    3. My userDefinedLang.xml was in an alternate location. I probably installed the portable version at some point... The location is good, but I did not see any settings within the npp to specify the location of settings files, maybe it's only done during install.

    4. I'm using delimiters to find keywords using brackets: aka [DEL] and [DEL→]. Using delimiter1 open: [DEL→ close: ], delimiter2 open: [DEL close: ] works great for all the keywords in brackets, except the ones with a directional like →. I only need the 4 directional chars, 2190-2193. I tried quotes and variations of "[DEL→" and such. Is this a known issue? Is there some way to do this? I've removed all extra stuff, no comment / numbers / keywords... just 2 delimiters, to troubleshoot...

     
  • Loreia2

    Loreia2 - 2015-01-17

    Hi Lexxter,

    1. This is simply a format Don used to save values in xml file. New version will get rid of this trick and use normal xml file. Anyway, userDefineLang.xml file should be of little or no concern to users, because users should interact with UDL though UDL GUI (Languages/Define your language...)
      Also, Delimiters (or any other keyword type) do not support custom naming, if you change XML tags, UDL will stop working.

    2. I presume you are talking about userDefineLan.xml file? Do not change that file directly, because UDL does not support custom modifications. UDL expects very strict format of that file, anything out of the ordinary and UDL will not be able to parse the file. So no, variables are not supported.

    3. There are no settings to specify custom location of userDefineLang.xmf file. This is not supported. Notepad++ stores its configuration files to preset locations: either installation dir (XP) or %APPDATA% dir (Vista and newer).

    4. At first I thought those arrows were a way to represent TAB character, only after the second read I realized you are talking about this: http://unicode-table.com/en/2192/ . UDL has been tested only with characters that use one byte in UTF-8 encoding. Unfortunately this is not supported.

    Best regards,
    Loreia

     
  • Loreia2

    Loreia2 - 2015-01-17

    P.S.

    I just tested it in my local beta, and it seems to work fine:

    So, you might be able to achieve what you want in UDL3 when it gets published.

    Best regards,
    Loreia

     
    • Kamyar

      Kamyar - 2015-01-28

      Wow! looks Great!
      I hopes this comings Soon.
      Thanks Loreia.

       
  • AZJIO

    AZJIO - 2015-01-17

    You can lay out for beta test?

     
  • Loreia2

    Loreia2 - 2015-01-18

    Hi AZJIO,

    beta will be publicly available for testing once UDL3 enters beta phase. Unfortunately things are moving slowly. So far, new UDL algorithm is almost done, I just need to finish folding functionality (smaller task) and decide if I am going to implement or skip last missing piece if functionality which I call "conditional keywords" (bigger task).

    After that I need to rewrite GUI part (current version works but is hardly an exemplary code), rewrite unit-test (luckily that one is written in Python so it won't take long), and write the documentation (oh the joy!!).

    All in all it is few more months down the line before UDL enters beta phase. I am too frustrated by slow development, but that is the best I can do at the moment.

    Best regards,
    Loreia

     
  • patz

    patz - 2015-04-06

    Hello, I was wondering if it is possible to fold lines based on indentation? something like python?

     
  • Loreia2

    Loreia2 - 2015-04-07

    Hi patz,

    python-like folding is not supported.

    Best regards,
    Loreia

     
  • Loreia2

    Loreia2 - 2015-04-11

    Hi hleV,

    fixing indentation is outside of scope of UDL (which just a syntax highlighter).

    Best regards,
    Loreia

     
  • NotEnoughData

    NotEnoughData - 2015-04-30

    Hello

    I have found that it isn't possible to allow code folding to be nested inside delimeters.
    Is there a workaround to this? If not, is it a worthwhile thing to add to UDL3?

    Here is an example piece of made up code:
    - Round brackets are in the folding in code style 1 field.
    - Square brackets are in the folding in comment style field.
    - OPEN and CLOSE are in the folding in code style 2 field.
    - Curly brackets are in the delimeter 1 style field with all nesting allowed (this doesn't affect it)

     
<< < 1 .. 11 12 13 14 > >> (Page 13 of 14)