Notepad++ 6.2 released!

Don HO
2012-10-09
2015-05-04
<< < 1 .. 4 5 6 7 8 > >> (Page 6 of 8)
  • Los_WochoS
    Los_WochoS
    2013-03-01

    Sorry my fault. I was skipping the comments section on udl homepage. Because of that I thought the check boxes in the styler dialog are predefined styles.

    Thanks for the fast answer.

    Bye

     
  • Ivan: I am trying to create a new language definition for Twig. I am however stuck on a few areas. Firstly, I cannot get the Folding2 words to be recognised inside delimiters. Secondly, I cannot specify that N++ should use another set of style rules outside of certain delimiters. Thirdly, your dialog box is too tall to fit on my laptop's screens. The built-in screen is 1280x800 and the external screen I have is 1366x768.
    Can I suggest you rearrange the dialog to have four units across and two high, instead of two across and four high?

    Here's a trivial example document:

    1  {% block header %}
    2      <style type="text/css">
    3          body { background: black; color: white; }
    4      </style>
    5      <script type="text/javascript">
    6          alert('Hello');
    7      </script>
    8      <h1>Twig + HTML + CSS + JS style test</h1>
    9  {% endblock %}
    

    "{%" and "%}" are defined using Delimiters.
    Lines 1 & 9 should be styled with Twig rules, and form a folding group from "block" to "endblock".
    Lines 2, 4, 5, 7 & 8 should be styled with HTML rules.
    Line 3 should be styled with CSS rules.
    Line 6 should be styled with Javascript rules.

    Also, when loading up Delimeter4, sometimes your dialog inserts erroneous text. It should contain "(( {%- {% ))" but sometimes has "(( {%- {% )) 10 11((". Obviously there is a parsing error when reading the XML file. You should use XML to it's strengths and not use number prefixes for 'tagging' strings, but use real XML elements (yes, 24 of them: don't worry the file will still be less than a disk allocation block in length so no space will be wasted!) Double parentheses are used because either can open a delimitation and either can close, regardless of which one opened.

     
    Last edit: Nicholas Shanks 2013-07-30
    Attachments
  • Another bug with UDLs, I cannot set FoldingInCode1 and Delimeter to the same thing, and folding still work.

    In the attached case, I have "group" in the Keywords1 list. I want Keywords1 to only be recognised outside a braces block. i.e. the first of these would be coloured Keyword1, the second would not, and the block would fold:

    group {
        group
    }
    
     
    Attachments
  • Next bug. For my Markdown style, I want to use a prefix string of 8 spaces, anchored from the start of the line, to denote something I can colour differently. Ideally this would be foldable too, with all immediately subsequent lines prefixed with 8 spaces forming part of the fold group.

     
  • Loreia2
    Loreia2
    2013-07-30

    Hi Nikolas,

    Firstly, I cannot get the Folding2 words to be recognised inside delimiters

    .
    This is not supported in current version.

    Secondly, I cannot specify that N++ should use another set of style rules outside of certain delimiters.

    .
    This is HUGE request. It has been asked before, but it won't be available any time soon. And even then, you won't be able to include external lexer, you will only be able to use UDL lexers.

    Thirdly, your dialog box is too tall to fit on my laptop's screens. The built-in screen is 1280x800 and the external screen I have is 1366x768.

    .
    My laptop is using the same resolution :-)
    just use docking functionality. Good news is that dialog will be redesigned in UDL3.

    Also, when loading up Delimeter4, sometimes your dialog inserts erroneous text. It should contain "(( {%- {% ))" but sometimes has "(( {%- {% )) 10 11((". Obviously there is a parsing error when reading the XML file.

    .
    Can you test with latest Notepad++ version? I am in a hurry next few days, so I won't be able to do it myself?

    You should use XML to it's strengths and not use number prefixes for 'tagging' strings, but use real XML elements (yes, 24 of them: don't worry the file will still be less than a disk allocation block in length so no space will be wasted!)

    .
    I agree, that's why UDL3 will use 'proper' XML.

    Another bug with UDLs, I cannot set FoldingInCode1 and Delimeter to the same thing, and folding still work.

    .
    That is not a bug, that is intended behavior.
    UDL3 will allow Delimiters to be foldable.

    Next bug. For my Markdown style, I want to use a prefix string of 8 spaces, anchored from the start of the line, to denote something I can colour differently.

    .
    Again, not a bug. UDL by design does not allow whitespace as part of syntax.

    Ideally this would be foldable too, with all immediately subsequent lines prefixed with 8 spaces forming part of the fold group.

    .
    Python-like folding is planned for some (distant)future version.

    BR,
    Loreia

     
  • Good to hear that some of these are coming.
    I am not sure what you mean by 'docking' functionality though.
    Do you have an ETA for UDL3 ?

     
  • Loreia2
    Loreia2
    2013-08-01

    Hi Nicholas,

    "docking" simply means to click on "dock" button, UDL dialog will then merge with main application windows and become scrollable.

    UDL3 won't be ready for beta testing before end of the year. Maybe a bit earlier if I find some free time, but I doubt it.

    BR,
    Loreia

     
  • mmoole454
    mmoole454
    2013-08-17

    Dear UDL Team,

    I was in the making of a 'real simple' highlighting set for some special config files.
    The main thing is just to get comments highlighted - nothing more complicated.

    The rule for something to be a comment is simple: start line with first character # or ! (no inline comments allowed).
    let's see an example

    !1========================
    ! 2a comment line
    #3========================
    # 4 a comment line 
    bla123 # this is no comment
    !5 another line
    

    But whenever I am editing in one of these lines, highlighting changes from comment-on to off and vice versa for some lines. That is strange. It really mixes me up :) . I just entered ! and # separated by a space in the 'open' field for line comments and checked force at BOL. (notepad++ 6.4.5 unicode)

    For example:
    set cursor in front of first character in line 1, press enter (np++ adds a space in the next line), press backspace, and now the line is no more a comment - until I enter a space in the empty line above directly or more lines above.

    greetings

     
  • Loreia2
    Loreia2
    2013-08-17

    Hi mmoole454 ,

    thanks for bug report. This is only reproducible when "Force at beginning of line" is selected, so it must e about miscalculated comment position. I will look into it, and patch it for next UDL release.

    BR,
    Loreia

     
  • Loreia2
    Loreia2
    2013-08-20

    Hi mmoole454,

    please download beta version and confirm here that bug has been resolved.
    http://goo.gl/Bo3emS

    BR
    Loreia

     
  • alex
    alex
    2013-08-28

    Dear UDL Team,

    I was trying to make my UDL language, and make the code foldable.
    on windows based line endings files it works perfectly.
    however when i try to use the same file with lnux line endings the folding does not work at all.

    Thanks for your help,
    Alex

     
  • Loreia2
    Loreia2
    2013-08-29

    Hi Alex,

    please download latest beta from this link:
    http://goo.gl/Bo3emS

    And confirm here that the problem is solved.

    BR,
    Loreia

     
  • Dxtr
    Dxtr
    2013-09-09

    I just tried the UDL function, and it looks great, but for languages like Ada (that don't use curly-brace blocks) the tool needs to support more folding styles. Notepad++ already supports Ada out-of-the-box, but the support is very poor (barely any highlighting, no folding, no indent highlighting etc.)

    In Ada blocks can be things like "is .. begin .. end", "loop .. end loop", "if .. elsif .. else .. end if", etc.

    Look here for some Ada code examples: http://www.adapower.com/?Command=classes&Title=Source+Treasury#Source - e.g.: http://www.adapower.com/index.php?Command=Class&ClassID=GUIExamples&CID=425

     
  • Loreia2
    Loreia2
    2013-09-09

    Hi Dxtr,

    you can set multiple keywords as folding points. In your case just put:

    Open: is loop if
    Middle: begin elsif else
    Close: end "end loop", "end if"

    BR,
    Loreia

     
  • Dxtr
    Dxtr
    2013-09-09

    That helped, thank you!

    But it seems I'd need to create a proper parser for Ada, given that it also uses ' as an operator, and that types can be enclosed by parentheses.

     
    Last edit: Dxtr 2013-09-09
  • Jim Welch
    Jim Welch
    2013-10-18

    I am using a language that uses [tab name] to start a new "page". I would like that to be a fold point until the next [tab name]. Is there a way to do this without writing a script?

     
  • Loreia2
    Loreia2
    2013-10-20

    Hi Jim,

    similar feature will be supported in UDL3.0, UDL2.1 (current version) can do it but it is not perfect solution. Just define [tab name] as Folding in code 2 middle point. It will be a bit ugly, but it will get the job done.

    BR
    Loreia

     
  • Andrew Miller
    Andrew Miller
    2014-02-05

    Can the "Language Name" textbox be expanded from 15 characters, to 20 or 30 characters? I'm creating some UDLs which need to have a longer name.

    Thanks,

    Andrew

     
  • Paul C Smith
    Paul C Smith
    2014-02-13

    Is it possible to treat a folding keyword differently based on whether it's after a newline?

    For example, one ugly language uses "REPLACE str1 WITH str2, str3 WITH str4". Worse yet, it allows continuation of the comma-separated list of substitutions until the first line that doesn't end with a semicolon. So that usage of "WITH" should not begin a folding block.

    However, "WITH" at the beginning of a line should start a folding block. Any way to embed a regex in a folding keyword maybe?

     
  • Loreia2
    Loreia2
    2014-02-14

    Hi Andrew,

    no problem, next version will be wider.

    Hi Paul,

    unfortunately that is impossible in current version of UDL. UDL3 will allow setting position of folding keywords, but it will take a while until I finish UDL3.

    BR,
    Loreia

     
  • Arkshine
    Arkshine
    2014-02-25

    Hi,

    Let's say you have something like that :

    new Float:var = 12;
    
    function(bool:var) {
    
    }
    

    Is it possible to match Float and bool tag without using a keyword list?
    If not, it would be cool having the ability to use regex.

    By the way, any news regarding UDL3 and is there an up-to-date documentation somewhere?

    Thanks!

     
  • Loreia2
    Loreia2
    2014-02-25

    HI Arkshine,

    no, this is not possible. I would like to include "postfix" option into UDL 3.0 but development is going so slow, I might decide to postpone this feature.

    There are no news regarding UDL3.0 at this point, some important things have been implemented, but there is also a lot of stuff left to do.

    BR,
    Loreia

     
  • bmn13
    bmn13
    2014-02-26

    Hi,
    not sure if this has been brought up before, just didn't feel like reading through all the posts. Hope you understand.

    I was trying to create a highlighting file for todo.txt and maybe because it's my first shot but I soon came to the conclusion that UDL2.0 (I am using NP++ 6.5.4) is not made for such a syntax.

    Here are some examples:

    • todo.txt uses "@" and "+" to create contexts and topics. So I want something starting with a "+" or "@" to be highlighted until the end of the word. I tried with with a "Delimiter" but as closing key I only found ((EOL)) though I need something like ((EOW)) for end of word
    • ([A-Z]) is used for priorities ([A-Z] is a regEx here) and is is always used at the beginning of a line. I want such lines to be completely highlighted. The closest I could get is again using Delimiters with (A),(B),(C),... as opening key and ((EOL)) as closing key. This actually works quite well but if I do that, all keywords etc. are overwritten. It would be nice to make keywords always the formatting winner ( maybe except for comments... yeah I know its complex ;-)
    • Dates used in todo.txt are of the format YYYY-MM-DD. I'd like to have such strings completely highlighted. I tried to use the Number recognition engine to add "-" as an Extra but that didn't work.

    I know todo.txt is not a programming language and thus the requirements are a little different. My first stomach feeling was "I need RegExps" for the keys I use, similar to the ((EOL)) thing.

    Maybe I just haven't tried long enough but would the above descibed things be currently possible. i fnot, would it make sense to think of it in a future version?

    Anyway, thanks for the great contribution to Notepad++.

    Regards
    Tim Drub

     
  • Loreia2
    Loreia2
    2014-02-26

    Hi Tim,

    I don't have time to read definition of TODOTXT format, so let's just go through your list one item at a time. If you have anything else, just write here.

    todo.txt uses "@" and "+" to create contexts and topics. So I want something starting with a "+" or "@" to be highlighted until the end of the word. I tried with with a "Delimiter" but as closing key I only found ((EOL)) though I need something like ((EOW)) for end of word

    .
    If you define a Keyword type, say Keyword1, as + @ and tick prefix, this is exactly what happens. Anything starting with one of these symbols will be highlighted until the end of the word. The only problem is definition of "end of the word". By default, only white space acts as "end of the word". If you want some text (and that means ANY text) you must define it as forward type, e.g. delimiters, operator1, folding in code 1, comments.
    .

    ([A-Z]) is used for priorities ([A-Z] is a regEx here) and is is always used at the beginning of a line. I want such lines to be completely highlighted. The closest I could get is again using Delimiters with (A),(B),(C),... as opening key and ((EOL)) as closing key. This actually works quite well but if I do that, all keywords etc. are overwritten. It would be nice to make keywords always the formatting winner ( maybe except for comments... yeah I know its complex ;-)

    .
    It is complex but it is also supported :-)
    This feature is called "nesting". Just define which keyword types are nested withing given delimiter and they will become formatting winners.
    .

    Dates used in todo.txt are of the format YYYY-MM-DD. I'd like to have such strings completely highlighted. I tried to use the Number recognition engine to add "-" as an Extra but that didn't work.

    .
    This one is tough. "Extra" requires a prefix (or postfix) which dates don't have, and "Range" allows just one range char per number. Unfortunately, this one is not possible in UDL. The best thing you can do is to define "-" as Operator1 type, which will give you coloring of numbers within a date string.

    BR,
    Loreia

     
  • bmn13
    bmn13
    2014-02-26

    Hi Loreia,

    woohoo, it's all there. Nice work.

    I somehow managed to get the last one working, too. I used "-" as suffix and also as range and it now highlights those dates. Of course, any numbers with two "-" in between is highlighted, but that's ok, I'll take care that dates are correct.

    Many thanks for your quick and helpful answer.

    Regards
    Tim

    PS I exported and attached my UDL file for anyone interested. It's nice and small, guess there are far more complex ones.

    Tags for search engines 8wonder if this makes sense)
    notepad++ np++ notepad plus todotxt todo.txt http://todotxt.com

     
    Last edit: bmn13 2014-02-26
    Attachments
<< < 1 .. 4 5 6 7 8 > >> (Page 6 of 8)