New UserDefinedLanguage module

Loreia2
2011-07-30
2015-04-30
<< < 1 .. 7 8 9 10 11 .. 14 > >> (Page 9 of 14)
  • Loreia2
    Loreia2
    2012-10-16

    Hi fb16,

    can you send me download link for that nice video tutorial you made for me.
    I'd like to keep that one off line.

    udlv20 (_at_) googlemail  dot  com

    BR
    Loreia

     
  • Wetware Bot
    Wetware Bot
    2012-10-16

    I don't know, introducing non standard stuff is generally not a good way to go. Besides, I just want to pass some string to PCRE component, I don't want to deal with those strings in any way.

    OK I agree, any text pattern matching I was referring to can be specified using RE anyway so no need to define additional variables to specify specific text pattern matches.

    You forgot 4th element. "linkified part" might not be equal to "id" that is glued to URL link. So, I would suggest: (…)

    I didn't put "id" in that list cause I considered it as a "UDL links variable" like "trigger". To make the terminology clearer I suggest to have a category of terms called "UDL links variables".
    I've just created a wiki page to help us rationalize our brain dumps (and avoid them spreading out of control on this thread!) :
    https://sourceforge.net/u/wetwarebot/wiki/NPP_UDL_Links/
    I've added you in the ACL so you should be able to edit this wiki page as well (wait 1h before doing to give me the time to finish a first short draft)

    Off course, this will not happen before PCRE support is added to UDL2. And I have no idea when is that going to happen.

    No problem, this is just science fiction stuff for now ;)

    Links are almost done. New Beta should have links covered in any way possible. I expect you to give it a good test run once it is out.

    Fantastic :) When you says "Links are almost done" you mean the correction of the 2 bugs "underlined spaces" and "links not triggered on page down/up" ?

     
  • Loreia2
    Loreia2
    2012-10-16

    Hi WB,

    I've just created a wiki page to help us rationalize our brain dumps (and avoid them spreading out of control on this thread!) :
    https://sourceforge.net/u/wetwarebot/wiki/NPP_UDL_Links/

    Great stuff.

    Fantastic :) When you says "Links are almost done" you mean the correction of the 2 bugs "underlined spaces" and "links not triggered on page down/up" ?

    That is only minor part of it, but that too.

    BR
    Loreia

     
  • Wetware Bot
    Wetware Bot
    2012-10-16

    Great stuff

    Thank you but it's just a very very small contribution compared to the enormous work that you do :) The very first short draft has now been written so feel free to amend it as much as you want.

    That is only minor part of it, but that too.

    Fantastic, you'll have to tell me in a bit more in details what you did so that I know what to test exactly :)

     
  • usacad1
    usacad1
    2012-10-16

    Loreia2, thank you for the great UDL 2. I think NP++ greatly improves with it.

    I think I might have found a bug with UDL 2 and maybe someone else has already reported it. I'm using UDL 2 that came bundled with NP++ 6.2.0.

    The problem I'm having is that when I define something as a Delimiter I can't define the same character for folding code. Basically, I want to make part of the code highlighted in different style (almost as if they were comments) and I want to be able to fold that part, but I have to choose either one the options not both.

    Thank you again for the great job done.

     
  • Loreia2
    Loreia2
    2012-10-16

    Hi usacad1,

    can you give me an example of the code.
    Same string can't be both delimiter and folding keyword, but I still don't fully understand what you are trying to achieve. So, a minimal code sample would help.

    BR
    Loreia

     
  • Loreia2
    Loreia2
    2012-10-17

    Hi guys,

    Beta 24 is up on github, grab it while it is hot:
    https://github.com/Loreia/UDL2/downloads

    Code will be pushed when I get home after work.

    Links should work now, no matter how you trigger them. And they should never mix with UDL styles.
    I also completely rewrote numbers detection. New code is similar but better. It should have better detection of numbers, but beware of regressions :-))

    I would appreciate a good test run of numbers, especially when numbers are nested within comments and delimiters.

    If things go well, I could finally focus on documentation.

    BR
    Loreia

     
  • usacad1
    usacad1
    2012-10-17

    Hi Loreia2.

    The language I refer to is ST of IEC61131, used in industrial control. Programs can usually be manipulated as text files, and implementation of text is nowhere standard, however I have many occasions in which a section is as follows:

    {$CONNECT BLAH
    BLAH, BLAH, 12345
    BLAH, BLAH, 67890
    $SOMETHING
    $SOMETHING ELSE
    $C0(123,456)
    $V0(789,012)
    }

    I have used delimiters to change the color of the section in light gray (it's really not that relevant for what we need to do and it makes the program easier to read if the section is grayed out), but I also like to be able to fold the code from the beginning of the curly brace to the end. I can do that, using the curly braces as fold begin and end, but then I can't have the code between the curly braces in light gray. If I define a Delimiter for { and } to get the light gray, it works, but I loose the folding.

    Any suggestion?

    Thanks,

     
  • fb16
    fb16
    2012-10-17

    Hi Loreia,
    Thank you for the new beta and for the great work on links!

    So far, I've checked how it displays numbers with these settings:

    I think I've found a problem with letter "e" since it seems to fail with numbers like these (copy and paste to try). I'll investigate on this later…

    0xfee6de
    0xcd9e8c
    0x98ce5f
    0xe2cec5
    0xe8685c
    0xbe0f56
    0xe6555a
    0x8e761a
    0xe3f7ab
    0x5a9e1a
    0xe061a1
    0xe3ea6a
    0xe0f552
    0xde8de6
    0x3ace5a
    0xe59b7d
    0xee546d
    0xcce0fb
    0xe57e67
    0xe39cc7
    0xe3d5dc
    0x92e57b
    0xe8dddf
    0xe1225d
    0x14e4be
    0xe4992b
    0xe4b0f3
    0xde59b2
    0x53e87b
    0xe5ea82
    0x7e4aeb
    0xe6e901
    0x8e9a59
    0xce09fd
    0xe9821f
    0xe30bf4
    0x4e0aa3
    0x1e78c8
    0xa39e8b
    0x159e1a
    0x2e1f0e
    0xc7e45d
    0xd3e6c6
    0x6ce7ed
    0xe54dcc
    0xe9d5d8
    0xb82e4f
    0x8e981e
    0x6e58fd
    0xee6c08
    

    Best regards
    fb16

     
  • Loreia2
    Loreia2
    2012-10-17

    Hi usacad1 ,

    currently only comments support something similar.
    So, define {} as another comment pair, and tick "Allow folding of comments".

    Limitation is that those lines must be follow each other, if you have an empty line in there it will break the sequence.
    And obviously another limitation is that  {} blocks will look like comments.

    That's the best current UDL can do for you.
    In the future I plan to merge Comments and Delimiters, only than Delimiters will also support the same functionality. At the moment, you can use comments (if that works for you).

    BR
    Loreia

     
  • Loreia2
    Loreia2
    2012-10-17

    Hi fb,

    that was the problem with last version, new one specifically addresses precisely this problem.
    Can you share your screen shot?
    Here is mine:


    BR
    Loreia

     
  • Loreia2
    Loreia2
    2012-10-17

    Forgot to include number definitions:


    BR
    Loreia

     
  • fb16
    fb16
    2012-10-17

    Hi Loreia,
    here is my snapshot but with different numbers:


    Also, inside the ZIP (https://github.com/downloads/Loreia/UDL2/NPP_UDL2_beta_24.zip), this time I found these files: "notepad2++.exe" and "Scintilla2.dll". There wasn't the file named "SciLexer2.dll". Is it ok? Thank you.

    Best regards
    fb16

     
  • usacad1
    usacad1
    2012-10-17

    Loreia

    My problem with comments is that I already have block comments sequence defined  and if I use that, I'd have to make that section of the program look exactly like comments (not really good).

    Thank you anyway for your help. I'll keep an eye to see if the future implementation will have a workaround for this.

     
  • Loreia2
    Loreia2
    2012-10-17

    Hi fb16,

    that's the problem, I zipped wrong file.
    I'll fix it right away.

    BR
    Loreia

     
  • Loreia2
    Loreia2
    2012-10-17

    Hi usacad1 ,

    My problem with comments is that I already have block comments sequence defined  and if I use that, I'd have to make that section of the program look exactly like comments (not really good).

    Why don't you just define (* *) as delimiter :-)

    BR
    Loreia

     
  • Loreia2
    Loreia2
    2012-10-17

    Ok, please re-download NPP_UDL2_beta_24_second_try.zip and give it another go.

    Sorry for the inconvenience.

    BR
    Loreia

     
  • Wetware Bot
    Wetware Bot
    2012-10-18

    Hi Loreia,

    Just had a try and it looks like you've indeed solved "underlined space" and "link not triggered on page down" bugs :-))) Without these 2 bugs Npp now feels incredibly sleeeeeek :-))) You are the man :))) Thank you so much :-))) You are contributing so much at making Npp a killer app :-)))

    If you can please assign http://sourceforge.net/tracker/?func=detail&aid=3540144&group_id=95717&atid=612382 to yourself and change its state to resolved :-)))

    All the best,
    WB

     
  • usacad1
    usacad1
    2012-10-18

    Hi Loreia,

    Indeed. Since comments are in fact foldable and they are delimiters, by reversing the definition of comments and the {$CONNECT section, I got the result I was looking for.

    Thank you very much for your help. And, BTW, it is quite clear that merging comments and delimiters make perfect sense.

    Great work.

     
  • Loreia2
    Loreia2
    2012-10-18

    Hi WB,

    If you can please assign http://sourceforge.net/tracker/?func=detail&aid=3540144&group_id=95717&atid=612382 to yourself and change its state to resolved :-)))

    Not so fast, code is still being reviewed by Don. That can be closed only when new code finds its place in official release.

    Hi usacad1 ,

    And, BTW, it is quite clear that merging comments and delimiters make perfect sense.

    Especial since it removes duplicate code within UDL.
    I am glad UDL2 is working for you.

    Best regards,
    Loreia

     
  • fb16
    fb16
    2012-10-18

    Hello,

    Since these days I'm dealing with numbers and UDL2, I wanted to share with you the following thought.

    Currently, the field "Optional suffixes for numbers" ("Comment & Number" tab), is required in order to recognize those numbers that are glued together with other text entities (see i.e.: "57px").

    In my humble opinion, we should let users free to choose if they may need or not to enable this option. That is, indipendently by how UDL2 works under the hood.

    I am aware of the difficulties of dealing with numbers and I really think UDL2 covers very well numbers (BTW try it: NPP_UDL2_beta_24_second_try.zip), so I won't bother you further.

    I just wanted to share with you once again my vision. Be kind! :-)

    Best regards
    fb16

     
  • Loreia2
    Loreia2
    2012-10-18

    Hi fb16,

    In my humble opinion, we should let users free to choose if they may need or not to enable this option. That is, indipendently by how UDL2 works under the hood.

    I don't understand, users can choose already if they want to enable this option or not.
    Number suffix field gives the ability to do so.

    What else can I do?

    BR
    Loreia

     
  • fb16
    fb16
    2012-10-18

    Hi Loreia,

    Thank you for your reply.

    This is not an issue, let me explain better…

    In the string "57px", numbers are not recognized, unless you fill out the field named "Optional suffixes for numbers" with the "px" bit. Is it right?

    If so, I tend to think to this field as not "Optional" (intended here as the possibility for a user to freely choose this feature, for the sake of its own particular purposes).

    It's more a phylosophical question, if you prefer.

    Best regards
    fb16

     
  • fb16
    fb16
    2012-10-18

    What else can I do?

    Nothing. UDL2 is just amazing under all the relevant aspects with numbers, period.
    It's that thing named "forward detection" which I'm madly dreaming!!! for numbers 8-)… Arrgh!!! ;-)
    Best regards
    fb16

     
  • fb16
    fb16
    2012-10-18

    Hello,

    I'm having problems displaying numbers with some suffixes. These are my steps:

    1) Copy and paste these suffixes into the field: "Language" > "Define your language…" > "Comment & Number" > "Number Style" > "Optional suffixes for numbers :".

    ° °C µL µg µl µm µs Å Ω ′ ″ ℓ % A B Ba Bq C EL Eg El Em Es F GL Gg Gl Gm Gs Gy H Hz J K L ML Mg Ml Mm Ms N Np PL Pa Pg Pl Pm Ps S Sv T TL Tg Tl Tm Torr Ts V W Wb YL Yg Yl Ym Ys ZL Zg Zl Zm Zs a aL ag al am as atm b bar cL cd cg ch cl cm cs d dB dL daL dag dal dam das deg dg dl dm dpcm dpi dppx ds em ex fL fg fl fm fs g grad h hL ha hg hl hm hs in kHz kL kat kg kl km ks l lm lx m mL mbar mg min ml mm mmHg mol ms mt nL ng nl nm ns pL pc pg pl pm ps pt px rad rem s sr t turn vh vmin vw yL yg yl ym ys zL zg zl zm zs
    

    2) Copy and paste these "glued" numbers for testing purposes.

    57°, 57°C, 57µL, 57µg, 57µl, 57µm, 57µs, 57Å, 57Ω, 57′, 57″, 57ℓ, 57%, 57A, 57B, 57Ba, 57Bq, 57C, 57EL, 57Eg, 57El, 57Em, 57Es, 57F, 57GL, 57Gg, 57Gl, 57Gm, 57Gs, 57Gy, 57H, 57Hz, 57J, 57K, 57L, 57ML, 57Mg, 57Ml, 57Mm, 57Ms, 57N, 57Np, 57PL, 57Pa, 57Pg, 57Pl, 57Pm, 57Ps, 57S, 57Sv, 57T, 57TL, 57Tg, 57Tl, 57Tm, 57Torr, 57Ts, 57V, 57W, 57Wb, 57YL, 57Yg, 57Yl, 57Ym, 57Ys, 57ZL, 57Zg, 57Zl, 57Zm, 57Zs, 57a, 57aL, 57ag, 57al, 57am, 57as, 57atm, 57b, 57bar, 57cL, 57cd, 57cg, 57ch, 57cl, 57cm, 57cs, 57d, 57dB, 57dL, 57daL, 57dag, 57dal, 57dam, 57das, 57deg, 57dg, 57dl, 57dm, 57dpcm, 57dpi, 57dppx, 57ds, 57em, 57ex, 57fL, 57fg, 57fl, 57fm, 57fs, 57g, 57grad, 57h, 57hL, 57ha, 57hg, 57hl, 57hm, 57hs, 57in, 57kHz, 57kL, 57kat, 57kg, 57kl, 57km, 57ks, 57l, 57lm, 57lx, 57m, 57mL, 57mbar, 57mg, 57min, 57ml, 57mm, 57mmHg, 57mol, 57ms, 57mt, 57nL, 57ng, 57nl, 57nm, 57ns, 57pL, 57pc, 57pg, 57pl, 57pm, 57ps, 57pt, 57px, 57rad, 57rem, 57s, 57sr, 57t, 57turn, 57vh, 57vmin, 57vw, 57yL, 57yg, 57yl, 57ym, 57ys, 57zL, 57zg, 57zl, 57zm, 57zs
    

    Is it the same for you? Thank you

    Best regards
    fb16

     
  • Loreia2
    Loreia2
    2012-10-18

    Hi fb16,

    It's that thing named "forward detection" which I'm madly dreaming!!! for numbers

    Numbers ARE detected in forward direction, but only if they conform to definition of number.

    Text "57px" is not a number, it may be a variable name, a coordinate, or anything else.
    You need to tell UDL which digits you want to pick as "numbers". In this case you need to define "px" as number suffix, or as a Operator1.

    If UDL picked any digit as a "number", than 0xABCDEG would be a number, instead of typo (which it really is).
    Also, it would pick 0x0xABCD as a legitimate number, or variable11a, or anything that contains a digit. That would be very unpractical for most users.

    BR,
    Loreia

     
  • Loreia2
    Loreia2
    2012-10-18

    Hi fb16,

    I see the problem with number suffixes.
    Try to define the in reverse order. Remember that longer string should go first.

    So, don't put "N Np", use "Np N" and it will start to work

    BR
    Loreia

     
  • fb16
    fb16
    2012-10-18

    Hi Loreia,

    Try to define the in reverse order. Remember that longer string should go first.

    Oh yes! This solves the problem! Thank you

    Numbers ARE detected in forward direction, but only if they conform to definition of number.

    I think I'm misunderstanding you, I'm sorry for this. When I read "conform to definition of number" I understand you're referring to digits 0-9. Is it what you mean?

    Thank you

    Best regards
    fb16

     
  • CorruptedFile
    CorruptedFile
    2012-10-18

    A bit of a quirk that I have noticed with the released version of UDL 2.0:

    1) "File1" currently open uses "MyUDL1".
    2) Open "File2" that uses "MyUDL2".
    3) Switch back to "File1", then start typing.
    4) Everything from the current line to the end of the document now uses the comment "Open" and comment "Close" characters from "MyUDL2".

    In my scenerio "MyUDL1" uses left curly brace ( { ) for open and right curly brace ( } ) for close with the style set to green. "MyUDL2" uses left parentheses ( ( ) for open and right parentheses ( ) ) for close with the style set to blue (color of this one doesn't affect the outcome).

    Before:

    After:

     
  • Loreia2
    Loreia2
    2012-10-19

    Hi corruptedfile ,

    can you share your userDefineLang.xml file?

    BR
    Loreia

     
  • CorruptedFile
    CorruptedFile
    2012-10-19

    Hi Loria,

    Sure, where should I send/share it?

    Jeff

     
  • CorruptedFile
    CorruptedFile
    2012-10-19

    Oops, just realized I spelled your name wrong, sorry, Loreia.

     
  • Loreia2
    Loreia2
    2012-10-19

    Never mind the name, just send it to udlv20 __at_ googlemail __dot_com

    BR
    Loreia

     
  • Loreia2
    Loreia2
    2012-10-23

    Arrrrgggghhhh, damn Sourceforge is again "eating" my posts. They must think I **love** re-typing !!!

    Ok, second try.

    New beta 25 is up on github.
    https://github.com/Loreia/UDL2

    This version fixes a bug in files that use Unix EOL conversions.
    It is possible that this change might introduce regressions in folding functionality, so I would appreciate a test run with new beta to see if folding is still working OK in your files.

    Thank you and best regards,
    Loreia

     
  • fb16
    fb16
    2012-10-23

    Hi all,
    Testing https://github.com/downloads/Loreia/UDL2/NPP_UDL2_beta_25.zip I\'m experiencing the following, with comment folding enabled. Is the same for you? thank you.


    Best regards
    fb16

     
  • fb16
    fb16
    2012-10-23

    …Sorry, I provide you also with some lines for testing purposes. Thanks, fb16

    /*
     * tryjrj
     */
    /* =====================
       dfgdfgdf
       ===================== */
    html {
        color: #222;
    }
    /*
     * wasfasfas
     * sffasf
     * asfasf
     * asfasf
     */
    /*
     * asfasf
     */
    hr {
        display: block;
        height: 1px;
        border: 0;
    }
    
     
  • Loreia2
    Loreia2
    2012-10-24

    Hi fb16,

    thanks for reporting the issue. Please download beta 26 from
    https://github.com/Loreia/UDL2/downloads

    and let me know if this issue has been resolved.

    Thank you and best regards,
    Loreia

     
  • Loreia2
    Loreia2
    2012-10-26

    Hi all,

    New beta 27 is up on github.
    https://github.com/Loreia/UDL2/downloads

    This version fixes a bug when user defines more that one UDL.
    It also fixes performance issue when user tries to "fold all" on a large file.
    It includes some other small bug fixes too.

    Thank you and best regards,
    Loreia

     
  • CorruptedFile
    CorruptedFile
    2012-10-26

    Hi Loreia,

    It looks like NPP_UDL2_beta_27 fixes the multiple UDL issue that I was having. (I also tested it in NPP_UDL2_beta_28 with no issues).

    Thank you for your excellent work on making the UDL feature much better.  Keep up the good work.

    ~Jeff

     
  • GM
    GM
    2012-10-28

    Hello,

    I haven't read the 18 pages of posts … so I'm sorry if I ask a question already asked.

    With Asymptote language, there are functions that have the same name as a type of objects.

    point p=point(c,curabscissa(4*pi));
    

    In the previous example, how is it possible to have a different color for both "point" ?
    Note that I don't want to add a space between the function name and the parenthesis following it.

    Thanks

     
  • Loreia2
    Loreia2
    2012-10-29

    Hi gmarris ,

    UDL deals with text, not code. So, it will always treat "point" as the same keyword regardless of its position in the code.
    So, lets explore our options here:

    1. Define keyword1: point
      Define keyword2: point(

    In this way UDL can distinguish the two, but:
    - opening brace will be colored as part of keyword
    - point( would have to be surrounded with spaces:

    point p=point( c,curabscissa(4*pi));
    

    2. If "point" as function is a RHS value (right hand side means: always right of '='), than define Delimiter1 as:
    - open: =
    - close: ;
    Define keyword1: point
    Define keyword2: point
    Use different stylers for keyword1 and keyword2 !
    In delimiter1 include nesting of keyword2 only

    Now, whenever "point" is found within range:

     = delimiter1 range is here ;
    

    "point" will be highlighted as keyword2

    In all other instances, "point" will be highlighted as keyword1.

    I hope that helps.
    Thank you and best regards,
    Loreia

     
  • sqblak
    sqblak
    2012-11-02

    Hello, first of all thanks for making UDL 2.0.

    Same as above, i haven't read whole thread but only about half of it so sorry if it was already solved.

    #1
    Is there a way to define delimiter style as:
    Open: %
    Close: % OR space
    ?
    Here's the situation:
    1. MsgBox, %MyVar%
    2. MsgBox, This is%variable%end
    3. MsgBox, % MyVariable

    For now i use % as keyword prefix but it doesn't work for second example where there is text just before of after variable. I think space as close char would fix it.

    #2
    I also would like to know if there is a way to add more groups (1 or 2) of operators? especially those that can be used without separators. I would find a few use of them.
    Example:
    MsgBox, Hello World `; This isn't a comment

    here comment is added but it shouldn't due to escape char " ` ". with another group of operators " `; " could be defined as an operator and its font could be changed to normal text (not to Operator 1 for 'normal' operators). I found it the only way to work as it should.
    Or maybe there should be option like 'start comment line only if theres white char before it'. This one would be even better in this case but two additional groups of operators for other styling would be also great..

    #3
    Is there a way to  have {+} higlighted in this example?
    Example:
    text{+}text
    - i tried to make it a keyword but it doesnt work because there aren't spaces around.
    - i tried to make it delimiter (open { and close } ) but it collides with 'Folding in code 2'
    Maybe there is (or should be) a way to make one keyword group highlighted even theres no spaces around it? (same as operator 1 group)
    (of course {+} is only example, theres more keywords like {something} )

    I would be really grateful for answer or any suggestions.

     
  • Loreia2
    Loreia2
    2012-11-02

    Hi sqblak,

    there is no need to read all those pages, it is much easier (and more efficient) just to ask directly.

    1. MsgBox, %MyVar%
    2. MsgBox, This is%variable%end
    3. MsgBox, % MyVariable

    Take advantage from the fact that example 3 ends with new line, and define:
    1. keyword1 type: % (with prefix ticked)
    2. delimiter1 type:
    - open:%
    - close: ((% EOL))

    I also would like to know if there is a way to add more groups (1 or 2) of operators?

    Not in current version, but it will be added in the future.

    here comment is added but it shouldn't due to escape char " ` ". with another group of operators " `; "

    I see the problem. Just a quick suggestion, is this whole line perhaps wrapped in some sort of delimiter? Than you could take advantage from delimiter's ability to define escape chars.

    #3
    Is there a way to  have {+} higlighted in this example?
    Example:
    text{+}text
    - i tried to make it a keyword but it doesnt work because there aren't spaces around.
    - i tried to make it delimiter (open { and close } ) but it collides with 'Folding in code 2'
    Maybe there is (or should be) a way to make one keyword group highlighted even theres no spaces around it? (same as operator 1 group)
    (of course {+} is only example, theres more keywords like {something} )

    All "forward" keyword types are highlighted regardless of prefix and suffix. So, the simplest way to highlight {+} is to define it as Operator1. Other way is to define it as delimiter: open: { close: }.

    Also, { } should be defined as Folding type 1 (not type 2).
    Can you explain in more detail how delimiter and Folding in code 2 collide.
    I am to busy to test it myself, but that sounds like a bug. Can you provide an example (with screen shots if possible) Thank you.

    BR
    Loreia

     
  • sqblak
    sqblak
    2012-11-02

    1. MsgBox, %MyVar%
    2. MsgBox, This is%variable%end
    3. MsgBox, % MyVariable

    Take advantage from the fact that example 3 ends with new line, and define:
    1. keyword1 type: % (with prefix ticked)
    2. delimiter1 type:
    - open:%
    - close: ((% EOL))

    But  in ex. 3 only percent sign should be highlighted not everything to EOL, thats why i asked about space delimiter (similar to EOL)

    MsgBox, Hello World `; This isn't a comment

    is this whole line perhaps wrapped in some sort of delimiter?

    Actually not. its 'normal' line of text setting some delimiter for whole line would highlight all that is not a keyword (because those could be nested but everything except that would be highlighted)

    So, the simplest way to highlight {+} is to define it as Operator1.

    I know that that's why i asked about another forward operators group or keywords group that behave this way.

    Also, { } should be defined as Folding type 1 (not type 2).

    Yea i figured it out.

    Can you explain in more detail how delimiter and Folding in code 2 collide.

    Not sure if its a bug or if it just should work this way.
    When I want to use { } as a folding Open and Close (no matter if it is folding 1 or 2, both behave the same in this situation) and then again use { } as a delimiters, delimiters take precedence before foldings and code cant be folded. Both A and B images have { } as folding code 1 and A is without { } delimiters and B with delimiters set to { }

     
  • Loreia2
    Loreia2
    2012-11-02

    Hi sqblak ,

    I guess at this point, UDL2 is simply not up to your needs. Adding more operator1 groups will help, but you also need to distinguish % as an operator and as a delimiter. That ability will be included with new UDL GUI, but that is a major update that won't come soon.

    Just one question. When you define %variable%, does that mean that delimiter defined as (open: % close: %), should be highlighted only if both open and close strings are "touching" some non-white space text:
    e.g.
    %variable%
    %also a variable%
    % not a variable %

    Thank you and best regards,
    Loreia

     
  • sqblak
    sqblak
    2012-11-02

    For my needs only %variable% should be highlighted. there arent spaces in variables names so this is %not a variable% and this is also % not a variable %. But a%variable%a should be highlighted (only %variable%). I'm not sure how it should work in general because possible cases are uncountable.

    Thank you for your replies

     
  • Loreia2
    Loreia2
    2012-11-02

    Hi sqblak ,

    I just asked because someone asked for a similar feature recently, and I was thinking how to implement it.

    Anyway, next major update to UDL will have comments and delimiters merged. This will enable me to "twist" delimiters so that % on its own is considered an operator and %variable% would be a delimiter.
    That version will work for your language too.

    Thank you and best regards,
    Loreia

     
  • CorruptedFile
    CorruptedFile
    2012-11-05

    Hi Loreia,

    Just curious if you have any idea when your beta for these fixes might hit a release build?

    Thanks,
    Jeff

     
<< < 1 .. 7 8 9 10 11 .. 14 > >> (Page 9 of 14)