bugs with macro and plugins



  • bugs with macro and plugins



  • [Unfortunately I can not send anywhere more than here, probably the reason in the old browser because the drop-down list does not work.

    .1notepad 7.4.2: start and two messages uknkown exception
    .2The CustomizeToolbar plugin does not work
    .3 does not succeed in achieving the desired result via the macro:

    1 select all
    2 inscrease line indent (n number of spaces)
    3 split lines
    4 descreace line indent
    5 inscrease line indent
    Result: 2Xline indent (need 1xline indent, descrease line indent)

    .4However, I would like to use a more advanced macro using search
    1 select all
    2 inscrease line indent (n number of spaces)
    3 split lines
    4 replase regex find: (^. {1,30} $) \ R \ R replase: \ 1 (connects small lines)
    4 descreace line indent
    5 inscrease line indent
    Result: 2Xline indent (need 1xline indent, descrease line indent) replase regex not work in macro
    .5 the macro also does not work with the textfx plugin
    1 select all
    2 textfx edit rewrap text to (75) 190 via clipboard
    3 textfx split lines at clipboard character
    4 inscrease line indent (n number of spaces)
    Variations of this macro with replase regexp
    Result: nonreadable text

    Bottom line: all possible ways of formatted text alignment with a macro do not work
    The best third way through textfx
    It is very necessary to format a large number of text and it is better that lines less than 40 characters move either backwards or forward.

    I also wanted that notepad ++ received better support for regex and that you could use regex and in the line replace only a few characters of type \ 1 or \ n

    So it would be possible to solve the alignment problem completely through regex since not only the transfer of large 190 lines with the return of rows less than 40 but also the omission in front is necessary.

    If you know another solution to this problem, I ask
    Share. Solving this problem is important for me
    So I can not wait very long, it will write a program for faster formatting for my needs.
    Thanks if you can respond.



  • I found a new problem: if I use a regular expression to solve problems
    Auto-transfer of strings.
    The main way is to use a regular expression
    Type. {30} (?! \ R) REPLACE $ 0 \ r \ n

    But for large sizes of type 100 it does not work so well.
    1: one line becomes long and the other is shorter
    2. short lines can not be processed in this way,
    Since they are less than the same 90. Thus, I do not see
    Normal solution of my problems through notepad ++

    It is possible if the regex editors supported tabs
    And otrytye tezstovogo file, I would not have written here.



  • I more or less solved my problem with three regular expressions.
    (^. {1,30} $) \ R \ R the replacement of \ 1
    (. {40,112}) (\ h + \ R? | \ R) the replacement of \ 1 \ r \ n
    ^ Replacement spaces\1



  • Hello, @unwanted,

    If you prefer, and, if your text, to be modified, is not either personal nor confidential, you could send me, an e-mail, with, as attached files, two files :

    • Your original text

    • The expected text, after regex Search(es) / Replacement(s)


    My e-mail address is tguy.038@gmail.com

    Just tell me what is your current encoding and the current End of Line characters ( Refer to the right part of the status bar ! )

    See you later,

    Best Regards,

    guy038



  • Just in case the message was not received I leave a short message:

    A really specific text does not matter, since this regular expression should work with most texts.
    For example, the same news, books, articles, and much more. Therefore I send some samples:
    1 samples already processed by the current version of the regular expression (in bracketed explanations)
    2 more ideal version of which you want to achieve
    3 approximate processing scheme

    Option in 1 line will be very difficult to achieve. Then it is necessary as that to put forward indents
    It will also be difficult to unify the preprocessing of deleting small lines and formatting by size, but ideally still handling small
    Lines after formatting without breaking indentation.

    In addition, in any case, regular expressions will be added to the regular expression macro:
    For example, removing duplicate items and lines of type: (source: http: / address)

    The main task is the creation of a universal auto-test for most cases.
    preferenses normal ansi(unicode not used (big size of txt) an crlf
    Thank you for response.



  • Recently I also added a couple of regular expressions
    ^ (. *?) $ \ S +? ^ (? =. * ^ \ 1 $) only works with: and new lines
    This regular expression removes duplicate lines
    But in some cases removes all text

    \ R \ r \ n replase \ n
    This regular expression removes two lines in a row



  • Main problems of your regular expression
    (. {1,40}) (\ h + \ R? | \ R) REPLACE = \ 1 \ r \ n link text

    1 the first line of the text is broken normally, but the counter does not end and if between 1 and 2 there is a small big line is not broken there
    Where it is necessary and most likely in half. Even for {1.40}, it matters not to mention big ones.

    Ie I need to use a more clever scheme for large strings.
    Or break every large line by adding the constraints ^ $ leaving the smaller lines the same.

    If we use eg 1-100 (. {1,100}) (\ h + \ R? | \ R) for example, we get (this is only an approximate comparison)

    Text text text text text text text text text text text text text text (long line more)
    Text text text (small line of the expression will count and it together with the next one)
    Text text text text text text text text text text text text

    We get at the output

    Text text text text text text
    Text text text text text text
    Text text text
    Text text text
    Text text text text text text text text text


    If you use a limited breakdown for each line, then only large lines are broken which is much better
    That is, to break only those lines that are larger than a certain size and which are more or less evenly broken
    Correct formatting of the text is quite difficult to take into account a lot, I will go out for a long time to look for the right solution.
    As you can see, there are small lines and they have to be sent back by connecting the previous line, but the problem is
    Most likely such a new line will be more than the required size. And again have to apply formatting.
    But it is unclear whether this new formatting will create new problems.

    Text text text text text text
    Text text text text text text
    Text text text
    Text text text text text
    Text text text text text



  • inscrease line indent 2-4
    split lines
    descrease line indet 2-4
    ^(.?)$\s+?^(?=.^\1$) null
    2017 (\d+:\d+) 17
    subscribe .+$ null
    (^.{1,30}$)\R \1
    \r\r\n \n
    ^ spaces\1
    i create macro and solved more problems


Log in to reply