New UserDefinedLanguage module

Loreia2
2011-07-30
2015-04-30
<< < 1 .. 24 25 26 27 > >> (Page 26 of 27)
  • 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 - 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 .. 24 25 26 27 > >> (Page 26 of 27)