• 0 Votes
    5 Posts
    192 Views
    PeterJonesP

    @guy038 said in Can we use "Copy Bookmarked Line" and "Paste in ReplaceWith" field in Macro:

    Hello, @b-sethi24, @alan-kilborn and All,

    Strange ! No answer regarding my assertion / question !

    Cheers,

    guy038

    I think you may have understood the original question differently than @Alan-Kilborn did. I made a similar interpretation at first, until I tried to figure out why Alan thought it wasn’t doable, when I original did. Re-reading the original post, I determined the key point was “Pasting in ReplaceWith field”.

    At first, like you, I thought @B-Sethi24 just wanted to paste the bookmarked lines in the document – in which case, the macro you showed would work.

    But if they really want to paste it into the REPLACE WITH field, with all the options available in the dialog box (including regex processing on the REPLACE WITH value), that cannot be done. (For example, if the line ${1} to ${10} were bookmarked, and they wanted to use that as the REPLACE WITH in a regex replacement.)

    Since @B-Sethi24 hasn’t come back since, I doubt we’ll get clarification anytime soon.

  • Refining smart highlighting to make current selection more obvious

    4
    1 Votes
    4 Posts
    255 Views
    EkopalypseE

    @James-Martin-0

    ahh I see, sorry I misunderstood.
    In that case it is the Selected text colour attribute.

  • same freeze but not on start up

    7
    0 Votes
    7 Posts
    515 Views
    tseGITT

    same problem. The problem is not the “line wrap” - option. Long lines are the problem.
    For better reading of my logfile i assigned extension LOG to type SQL in %appdata%\notepad++\stylers.xml.
    After Deassigning LOG works fine, so that will be my workaround until this problem is fixed by a future notepad version. No colored keywords but freezing the editor ist gone.

  • What command lets you copy cmd and save it in a new document?

    3
    0 Votes
    3 Posts
    228 Views
    Terry RT

    @Alexander-Brkljac said in What command lets you copy cmd and save it in a new document?:

    lets me copy the contents that is in cmd

    Try this link. It’s hardly NPP specific, but the paste portion should work in most apps, once the clipboard has received the marked area or piped output.

    https://www.labnol.org/software/copy-command-output-to-clipboard/2506/

    Terry

  • on clickable links - mouse cursor is flickering

    4
    0 Votes
    4 Posts
    221 Views
    mkupperM

    My cursor is not flickering when the mouse is over it but it flickers as I move the mouse left/right over a link. It’s possible your system is making npp think the mouse is moving.

    Try disabling and re-enabling clickable links to see if the flickering problem goes away until you exit/restart npp. The enable flag is in Settings / preferences / MISC. / Clickable Link Settings

  • Wildcard in replace field

    24
    1 Votes
    24 Posts
    7k Views
    Thomas 2020T
    (^| )(\d{1,2}:\d\d):(?=\d\d([ ,'!\.\?"”\)]|$))
  • How to remove all HTML tags except <p> or <h1> <h2> tags?

    4
    0 Votes
    4 Posts
    3k Views
    NZ SelectN

    I found this code will do the job
    </?(?!a)(?!p)(?!ul)(?!li)(?!h)\w*\b[^>]*>

  • Formula in Replace function

    3
    0 Votes
    3 Posts
    1k Views
    Terry RT

    @wielki-asasyn said in Formula in Replace function:

    I would like to replace the “D001” part of the name with D002, D003, D004 etc to have unique names.

    I thought I knew what you wanted, proceeded to produce a solution using regular expressions, then once I read your post again I’m not sure I have the correct interpretation. So I’ll ask some questions.

    The single line of example above, are there about 350+ similar lines of text needing replacing? Is the single line provided actually a portion of the 1 (and only) line in the file thus within that 1 line there will be approximately 350+ names?

    If the answer to #2 is yes, that’s the idea I followed. My solution involves a few steps. Firstly we’d need to cut this down into individual lines so each name was on a line by itself. Then we’d use the column editor to add an increasing number to the start of the line. Then we’d replace the existing “Dnnn” string with the number at the start of the line. Lastly we’d merge the records back into the original format.

    So my steps are.
    Using the Replace Function we have
    Find What:\|[^”]+”(?!})\K
    Replace With:\r\n

    Search mode MUST be regular expression. Click on the Replace All button.
    So now each name should be on a separate line. Note the regex uses a negative lookahead so that we don’t create a line with the } on it by itself.

    Now the cursor must be placed at the first line, first position, actually immediately before the first character. We use the Column Editor (under Edit main menu) and select “number to insert” and use initial number of 1, increase by 1 and leading zeros MUST be ticked, click OK. Provided you have correctly located the cursor you will now see every line is preceded by a 3 digit number, increasing by 1 each line. Since you say there were approximately 350+ names every number created should be 3 digits long as you requested.

    Now we use another regex to move this, replacing the existing number using Replace function.
    Find What:^(\d{3})(.+?)(“D)\d{3}
    Replace With:\2\3\1

    Again search mode MUST be regular expression and wrap around ticked. Click on the Replace All button

    Confirm the numbers have been correctly replaced. Last step is to join the separated lines back to the original format. So again using the Replace function.
    Find What:[^}]\K\R
    Replace With: nothing in this field, leave it empty.

    Click on the Replace All button and now you should have the format you wished with unique numbers for each name.

    Terry

  • 0 Votes
    6 Posts
    891 Views
    Alan KilbornA

    Additionally, here are some basic instructions for installing Pythonscript and getting a script to run:

    https://community.notepad-plus-plus.org/post/54655

    And here’s some stuff about binding the execution of a script to a keycombo:

    https://community.notepad-plus-plus.org/post/55131
  • Notepad++ 7.8.9 32bit freezes with dbf file

    11
    0 Votes
    11 Posts
    2k Views
    Jack SmitheJ

    @Ekopalypse
    I didn’t know about DBF Viewer Plus. I was given an assignment with a deadline and went to the tools I know how to use. I completed the assignment last night so this morning I was able to delve into the notepad++ issue and discovered the source of the problem. Thank you for telling me about DBF Viewer. Once I figure out how to use it it will be a big help. If all I have is a hammer everything looks like a nail. Now I have a crowbar so now I can do more with less effort.

    @Alan-Kilborn
    The dbf is 6 lines long according to Notepad++. Line 6 is the one I am interested in which takes up 98% of the file. Now that I have DBF Viewer that should make things easier in the future. I will definitely keep this in mind for if I can’t use DBF Viewer.

  • Change Indent Keyboard Shortcut?

    27
    0 Votes
    27 Posts
    10k Views
    Alan KilbornA

    Here’s a weird condition…maybe:

    Select one or more empty lines.
    Press Tab.
    Exactly nothing happens.

    My goal was to have leading whitespace inserted on all lines at once, for each press of the tab key.

  • How to change App color to Dark theme?

    3
    1 Votes
    3 Posts
    261 Views
    sadicusS

    …and everything else was going so well, that is disappointing. I suppose that is why nothing can be perfect.
    thanks for the update!

  • How to delete rows / data based on the value in the header

    5
    0 Votes
    5 Posts
    2k Views
    Leszek BednarskiL

    Hello @guy038,

    Thank you very much! Not only for the help but also the very detailed, valuable explanations and references.
    At this point in my learning curve, it so complicated that it is just blowing my mind :)

    Best Regards
    LB

  • Find previous broken if using regular expressions

    4
    0 Votes
    4 Posts
    285 Views
    guy038G

    Hello, @derrick-gunter, and All,

    Since Notepad v7.8.7 version, the backward search is not allowed, by default, when Regular expression mode is set !

    But, as @michael-vincent, said, in his post, there is a new regexBackward4PowerUser attribute of the FindHistory tag, in the Config.xml configuration file. Just change its value from no to yes ;-))

    <FindHistory nbMaxFindHistoryPath="10" nbMaxFindHistoryFilter="10" nbMaxFindHistoryFind="10" nbMaxFindHistoryReplace="10" matchWord="no" matchCase="yes" wrap="no" directionDown="yes" fifRecuisive="no" fifInHiddenFolder="no" dlgAlwaysVisible="no" fifFilterFollowsDoc="no" fifFolderFollowsDoc="no" searchMode="2" transparencyMode="1" transparency="150" dotMatchesNewline="no" isSearch2ButtonsMode="no" regexBackward4PowerUser="yes">

    Best Regards,

    guy038

  • Encode Croatian UTF8 to ISO8859-1

    2
    0 Votes
    2 Posts
    1k Views
    EkopalypseE

    @Branko-Colavizza said in Encode Croatian UTF8 to ISO8859-1:

    Open the saved file and all the encoding is lost.

    What does that mean?
    What does the encoding field, the second from the right in the statusbar show?
    Could it be that you have to disable Settings->Preferences->MISC.->Autodetect character encoding?

    If the issue still exists, can you please post your debug-info, which is available from the ? menu?

  • Find in Files two phrases

    8
    0 Votes
    8 Posts
    231 Views
    Scott WallaceS

    @Alan-Kilborn said in Find in Files two phrases:

    (?s)Material Transfer Number.*?\KPosting Date

    Alan, the issues were typos on my side. The (?s)Material Transfer Number.*?\KPosting Date gave me exactly what I needed.
    Thank you so much for all your help.

  • 0 Votes
    9 Posts
    889 Views
    Владимир АнисимовВ

    @guy038 Thanks for the help. You have expanded my boundaries how else you can work with the regular season. Thanks you.

  • Wildcards in UDL

    4
    0 Votes
    4 Posts
    1k Views
    EkopalypseE

    @F2-Andy

    The actual documentation is on github a source.
    The documentation found on sourceforge is, afaik, outdated.

    For coloring, I posted a possible solution here.

    If there is anything I can do, let me know.

  • Replacing text at line-end

    15
    0 Votes
    15 Posts
    6k Views
    guy038G

    Hello, @terry-r and All,

    After numerous tests, here are my conclusions about the insertion of ASCI symbols, with Unicode code-point < \x{007F}, in replies on NodeBB forum

    Four cases will be considered :

    Inside Normal text, possibly emphasized :

    Writing of the symbol itself

    Writing of the symbol, preceded by a backslash \

    Inside Code Span zones or Code Block zones ( delimited between two lines of 3 backticks or two lines of 3 underscores ) or text indented with 4 space chars :

    Writing of the symbol itself

    Writing of the symbol, preceded by a backslash \

    - If inside NORMAL text, possibly EMPHASIZED : •------•--------* •---------•--------* | Type | To get | | Type | To get | •------•--------* •---------•--------* | \\[ | [ | | \\\\\[ | \\[ | | \\] | ] | | \\\\\] | \\] | •------•--------* •---------•--------* | | | | | | | \\ | \ | | \\\\ | \\ | | \* | * | | \\\* | \* | | \+ | + | | \\\+ | \+ | | \# | # | | \\\# | \# | | \- | - | | \\\- | \- | | \= | = | | \\\= | \= | | \> | > | | \\\> | \> | •------•--------* •---------•--------* | { | { | | \\{ | \{ | | } | } | | \\} | \} | | ( | ( | | \\( | \( | | ) | ) | | \\) | \) | | ^ | ^ | | \\^ | \^ | | $ | $ | | \\$ | \$ | | . | . | | \\. | \. | | | | | | | \\| | \| | | ! | ! | | \\! | \! | | " | " | | \\" | \" | | % | % | | \\% | \% | | & | & | | \\& | \& | | ' | ' | | \\' | \' | | , | , | | \\, | \, | | / | / | | \\/ | \/ | | ; | ; | | \\; | \; | | < | < | | \\< | \< | | ? | ? | | \\? | \? | | @ | @ | | \\@ | \@ | | _ | _ | | \\_ | \_ | | ` | ` | | \\` | \` | •------•--------• •---------•--------• - IF inside a CODE SPAN zone `....` or a CODE BLOCK zone ~~~....~~~~ / ```....``` or in text INDENTED with FOUR spaces : •------•--------* •--------•--------* | Type | To get | | Type | To get | •------•--------* •--------•--------* | [ | [ | | \\\[ | \\[ | | ] | ] | | \\\] | \\] | •------•--------• •--------•--------• | \ | \ | | \\ | \\ | | * | * | | \* | \* | | + | + | | \+ | \+ | | { | { | | \{ | \{ | | } | } | | \} | \} | | ( | ( | | \( | \( | | ) | ) | | \) | \) | | ^ | ^ | | \^ | \^ | | $ | $ | | \$ | \$ | | . | . | | \. | \. | | | | | | | \| | \| | | ! | ! | | \! | \! | | " | " | | \" | \" | | # | # | | \# | \# | | % | % | | \% | \% | | & | & | | \& | \& | | ' | ' | | \' | \' | | , | , | | \, | \, | | - | - | | \- | \- | | / | / | | \/ | \/ | | : | : | | \: | \: | | ; | ; | | \; | \; | | < | < | | \< | \< | | = | = | | \= | \= | | > | > | | \> | \> | | ? | ? | | \? | \? | | @ | @ | | \@ | \@ | | _ | _ | | \_ | \_ | | ` | ` | | \` | \` | •------•--------• •--------•--------• Remark : If a single BACK-TICK character must be inserted in a CODE SPAN zone, use the following THREE-lines syntax : •------•--------* •--------•--------* | Type | To get | | Type | To get | •------•--------* •--------•--------* | **`` | | | **`` | | | ` | ` | | \` | \` | | ``** | | | ``** | | •------•--------• •--------•--------•

    Best Regards,

    guy038

  • Large File Tab Close

    2
    0 Votes
    2 Posts
    2k Views
    EkopalypseE

    @Brett-Horsley

    depending on your installation/configuration you will have
    either an %APPDATA%\notepad++\backup directory or a
    backup directory in the install directory of npp.
    Rename the file with 100MB. Start Npp.