Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Notepad++ 6.2 released!

Don HO
2012-10-09
2015-03-11
<< < 1 .. 6 7 8 (Page 8 of 8)
  • P1h3r1e3d13
    P1h3r1e3d13
    2014-07-02

    Hi Loreia,

    I'm having some trouble with nesting two delimiters when one contains the other. Specifically, MediaWiki's ''' and '' markup for bold and italic.

    Here's my configuration:

    • Delimiter 5:
      • Open & close: ''' (triple has to come before double, otherwise it will never catch)
      • Style: bold
      • Nesting: 5 & 6
    • Delimiter 6:
      • Open & close: ''
      • Style: italic
      • Nesting: 5 & 6

    Here's my test string:
    regular''italic'''boldanditalic'''italic'''regular

    In a wiki, the text style would be what it says in each place:

    regularitalicboldanditalicitalicregular

    (In N++, I expect the “boldanditalic” part will just be bold, but that's fine.)
    The problem is that the first two characters of ''' are closing the '' section, so I get:

    regular''italic'''boldanditalic'''italic''regular

    Do you have any tips for a more robust setup of these delimiters? Or should closing delimiters only be matched on a backward search to make this work?

    (This would also apply to markdown's ** and * syntax, which I ironically had to use to write my examples above.)

    Thanks for such a helpful addition!
    –Jack

     
  • Loreia2
    Loreia2
    2014-07-03

    Hi Jack,

    this is a tough problem. UDL's delimiter handling logic is:

    if in delimiter, check forward type keywords in this order:
    1) escape sequence
    2) line continuation sequence
    3) end of delimiter sequence
    4) nested operator and delimiter start sequence

    MediaWiki syntax breaks this logic because delimiter start and end sequence overlap. There is no way to make this work in current UDL version.

    UDL3.0 will support control of whitespace around delimiter open and close sequences, which should be enough in this case, but I wonder if I should extend this functionality?

    Anyway, in UDL3.0 if you define "start" and "end" as delimiter start and end sequences, than UDL3.0 will allow you to define whether X,Y,W,Z must or must not be whitespace:

    XstartY  .... delimiter body .... WendZ
    

    Perhaps in UDL3.1 I could allow users to define X,Y,W,Z as a list of strings? We'll see if such functionality is needed.

    Regards,
    Loreia

     
  • Piet the Elder
    Piet the Elder
    2015-01-22

    Hi,

    The UDL is really useful, and I have been using it for months now.
    But, only this week have I attempted to add code folding, and have found this bizarre occurrence where it starts for fold lines that don't match the deliminaters -- or it misses valid deliminaters completely.

    I have attached a screen shot example, that also shows my set-up in "Folding 2" -- changing to "folding 1" doesn't help much either. Neither does removing the "#ifdef" -- nor removing the " marks.

    NPP is the "Je suis Charlie" edition -- Jan 10, 2015 build

    Any ideas for this would be appreciated.

    Thanks,

    PtE
    
     
    • Piet the Elder
      Piet the Elder
      2015-01-22

      My apologies, I have since found the error causing the problem.

      In my single line comments definition, I had placed ((EOL)) in the "close" -- removing this fixed the folding.

       
  • Loreia2
    Loreia2
    2015-01-22

    Hi Piet,

    that is a known bug that will be fixed in next version (3.0), in the mean time, you can use an older version available here: http://goo.gl/Bo3emS

    Best regards,
    Loreia

     
    Last edit: Loreia2 2015-01-22
  • James Benson
    James Benson
    2015-01-27

    I'm having trouble with UDL not recognizing the following character as a word boundary:
    http://www.unicodelookup.com/#%E3%80%80/1

    Can support for this be added?

     
  • Loreia2
    Loreia2
    2015-01-27

    Hi James,

    words are delimited by whitespace (in UTF-8 any character < 32). Changing this functionality would require rewrite of entire UDL. I think more elegant solution would be to define "IDEOGRAPHIC SPACE" character as Operator1 type. In this way it automatically becomes a word boundary.

    Best regards,
    Loreia

     
  • slateraptor
    slateraptor
    2015-02-20

    Hi Loreia,

    I'm attempting to create a UDL for a language called C/ATLAS (unfortunately, not in the UDL List) but I'm running into show-stopper issues due to the language's quirky syntax.

    For example, a comment is valid iff C is the first character of a line, and uses the same closing delimiter $ as regular statements.

    C       THIS IS A VALID SINGLE-LINE COMMENT $
    
    C
            ****************************************************************
            * THIS IS A VALID MULTI-LINE COMMENT
            ****************************************************************
            $
    
     C      THIS IS NOT A VALID COMMENT $
    
     000001 BEGIN, ATLAS PROGRAM 'EXAMPLE' $
         05 INCLUDE, ATLAS MODULE 'STDPROC' $
    

    Observe that the first column of any line outside of a comment is treated special; indeed, the first 7 characters of any statement is special. If I set comment style Open=C and Close=$ then the above comments will highlight correctly, however, the C in INCLUDE (or any instance of C that doesn't fall within a defined delimiter) will undesirably mark everything to the next $ as comment.

    Is there a solution around this? If not, would it be possible support a feature that constrains a delimiter to beginning of line?

    Thanks for your contributions to the community! ^^

     
  • slateraptor
    slateraptor
    2015-02-20

    Just wanted to create a separate post for a wishlist item.

    Being able to highlight numbers and units independently would be immensely useful. Consider the following:

    CASE1: 12 VDC
    CASE2: -12VDC
    

    CASE1 is inherent by listing units keywords and controlling color with its group styler. Caveat is that for at least certain human-readable languages, the same keywords can be functionally different depending on context. Pseudo-example:

    FORMAT BNR 1 WORD, UNSIGNED $ // units
    WORD = 32 BITS $              // not units
    

    CASE2 isn't quite as flexible by using number style suffix. Independent units color control is consequently lost. This limitation also manifests in keyword prefix mode.

    Having independent control number style prefix/suffix and keyword appendages when prefix mode is set would be immensely useful.

    Just a suggestion, and thanks again for your contributions. ^^

     
  • Loreia2
    Loreia2
    2015-02-20

    Hi slateraptor,

    Is there a solution around this? If not, would it be possible support a feature that constrains a delimiter to beginning of line?

    Actually, this is already implemented in UDL3 (which is still being developed). So, you can only wait until I release UDL3.0 because current UDL2.X series does not support this option.

    Having independent control number style prefix/suffix and keyword appendages when prefix mode is set would be immensely useful.

    Keyword prefix/suffix option has also already been implemented in UDL3. But if I understand correctly, you would like to set prefix/suffix mode only on keywords that are preceded/followed by a number. This is not possible.

    Best regards,
    Loreia

     
    • slateraptor
      slateraptor
      2015-02-24

      Thanks for your response, Loreia.

      But if I understand correctly, you would like to set prefix/suffix mode only on keywords that are preceded/followed by a number.

      Understood. It was worth the inquiry. ^^

      Just to clarify, and as it stands in v2.x, if VDC were listed as a valid Number suffix, then the whole context would be highlighted, e.g.
      -12V
      20mA
      100DegC

      What would be very useful is the ability to clearly disambiguate context by independently controlling the color of a number and its prefix/suffix, e.g.
      -12V
      20mA
      100DegC

      Would this be viable as a v3.0 wishlist item?

       
  • Loreia2
    Loreia2
    2015-02-24

    Hi slateraptor,

    What would be very useful is the ability to clearly disambiguate context by independently controlling the color of a number and its prefix/suffix, e.g.
    -12V
    20mA
    100DegC
    Would this be viable as a v3.0 wishlist item?

    Not in 3.0 cycle, it has been dragging on endlessly, and I would like to focus on releasing it. New features are possible only if they are minor. Numbers are one area that I would like to skip in UDL 3.0 cycle. In fact it is the only part of code that went almost untouched in 3.0 development.
    I plan to rework numbers in 3.x phase, until then they will remain as they are.

    But generally speaking, this sounds like a good feature. I like it.

    Best regards,
    Loreia

     
  • slateraptor
    slateraptor
    2015-03-11

    Greets Loreia,

    Was wondering if there was a particular Npp version that you were planning to align UDL 3.0's release with? Admittedly had an excitement false alarm with v6.7.5's release earlier today. =P

     
  • Loreia2
    Loreia2
    2015-03-11

    Hi slateraptor,

    these days I am working from 8h to 20h each day on my regular job, UDL stuff is hardly moving forward. Few lines here and there over the weekend, but that is it. It will be like this at least few more weeks.

    When I get back to UDL, and make something presentable, I will first open a new thread on forum for beta testers and early adopters. Subscribe to this thread and you will get a notification about it.

    And only when beta testing is done, and application is stable, and feature list is definitely set, only then UDL can be integrated with current version of Notepad++.
    There is no date set, it all depends on my free time.

    Best regards,
    Loreia

     
<< < 1 .. 6 7 8 (Page 8 of 8)