• Delete duplicated expressions with keeping the first one

    24
    0 Votes
    24 Posts
    5k Views
    Ziad AboramiZ

    @guy038
    Thanks so much!
    I have fixed the errors.
    The command of replacment worked fine!
    Thanks a lot for your time
    You are generous!

  • Code Folding Help.

    Locked
    2
    0 Votes
    2 Posts
    836 Views
    PeterJonesP

    https://notepad-plus-plus.org/community/topic/15739/faq-desk-request-for-help-without-sufficient-information-to-help-you

    Also, this forum is formatted using Markdown, with a help link buried on the little grey ? in the COMPOSE window/pane when writing your post. For more about how to use Markdown in this forum, please see @Scott-Sumner’s post in the “how to markdown code on this forum” topic, and my updates near the end. It is very important that you use these formatting tips – using single backtick marks around small snippets, and using code-quoting for pasting multiple lines from your example data files – because otherwise, the forum will change normal quotes ("") to curly “smart” quotes (“”), will change hyphens to dashes, will sometimes hide asterisks (or if your text is c:\folder\*.txt, it will show up as c:\folder*.txt, missing the backslash). If you want to clearly communicate your text data to us, you need to properly format it.

    After you have read the above links, please come back with more details, as well example data that will actually show what you mean – interleaving the data with your question text is super confusing when you haven’t marked it up to show what’s data and what’s not.

  • NppExec F6 not working

    Locked
    12
    0 Votes
    12 Posts
    3k Views
    PeterJonesP

    @PaoloRicardo said:

    I presume I must wait for the bug to be fixed before F6 will work as designed?

    No, that’s not what we were saying there at all.

    We said that you could use the Shortcut Mapper to tell you why there was a conflict with the NppExec’s F6 and something else that was also apparently mapped to F6. We strayed a bit into a tangent about how the Shortcut Mapper displays certain items when you have a filter applied, but as my first screenshot showed, the Shortcut Mapper does tell you when there’s a conflict, and tell you where that conflict is, as long as you don’t have a filter applied.

    Since installing 7.6.3 solved your F6 problem (by resetting whatever item conflicted with NppExec’s F6), I mostly posted this clarification so that future readers of this thread won’t think that 7.5.9 breaks the F6 key; it doesn’t.

  • COBOL syntax highlighting stops working

    Locked
    5
    0 Votes
    5 Posts
    1k Views
    PaoloRicardoP

    Mata

    The above leads to compilation errors. I have split the Display into two separate statements and have an acceptable result i.e. syntax highlighting is back.

    I realised that I did not have the most recent version of Notepad++ (7.63). Installing this now means F6 correctly brings up the NppExec dialog.

    Thanks for your help.

    Psul

  • Activity is getting updated on Gitter

    Locked
    1
    1 Votes
    1 Posts
    311 Views
    No one has replied
  • Notepad++ exit

    Locked
    3
    0 Votes
    3 Posts
    873 Views
    Uffe KousgaardU

    @PeterJones said:

    Remember current session for next launch

    Disabling “Remember current session for next launch” and choosing “Simple backup” made it behave in a sensible way.

  • Notepad++ hangs after changing style

    Locked
    14
    0 Votes
    14 Posts
    3k Views
    andrecool-68A

    @blackerking said:
    on Windows 10, there are conflicts with Notepad++

  • Wrong encoding?

    Locked
    3
    0 Votes
    3 Posts
    13k Views
    andrecool-68A

    @Вениамин-Володарский
    It’s like a compiled script, and the coding has nothing to do with it.

  • Can provide an official package in MSI format?

    Locked
    1
    0 Votes
    1 Posts
    464 Views
    No one has replied
  • Why does ₹ appears as □ in npp

    Locked
    8
    0 Votes
    8 Posts
    3k Views
    V S RawatV

    Also, Arial Unicode MS’ wiki page itself says that latest version is 1.01 that was released 21 years ago in 1998, so the characters defined later are not there in it.

  • How to display the place just modified

    Locked
    2
    0 Votes
    2 Posts
    488 Views
    pnedevP

    Hello @zili-Jiang ,

    You can do something like that using Compare plugin.
    If you haven’t saved the modified file yet you can use ComparePlugin’s Diff since last Save command.

    Or you can simply Undo (it will take you to the place you last modified) and then Redo.

  • Sourcecookifier installed but not visible

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    Meta ChuhM

    welcome to the notepad++ community, @Gautier-Andreotti

    Too old, not working anymore?

    source cookifier 0.7.3 will also work on the newest versions of notepad++.

    if you have the installed version of notepad++ 7.6 - 32 bit (not the portable version):
    first please download and run the new version 7.6.3 - 32 bit installer from >>> here <<<, to update your existing version.

    then go to plugins > plugins admin, enter “source cookifier” in the search field, check “source cookifier 0.7.3” at the plugins list, and hit install, as seen at the screenshot below.

    Imgur

    now source cookifier will be installed, as seen at the next screenshot.

    Imgur

    important note: do not use “plugin manager” on a notepad++ version 7.6 and above, as it is not compatible with the newer versions of notepad++, and it would install all plugins to the wrong folder locations.
    only use the built in “plugins admin” on newer versions of notepad++.

    (it is recommended to remove “plugin manager” completely on newer versions of notepad++, as it currently does not work, and it is not known if it will be updated in the near future)

    side note: if you have installed other plugins on 7.6, you will have to reinstall them using “plugins admin” once you have updated to 7.6.3, due to changes of the plugins folder locations.

  • Advanced Search and Repace Question

    Locked
    4
    0 Votes
    4 Posts
    767 Views
    Meta ChuhM

    @bradsayers

    I would be embarrassed to note my attempts

    never be embarrassed, we (usually) don’t bite ;-)

    anything possibly “embarrassing” we read, will also help us to adapt all guides, like the ones you’ve read, for future and inexperienced users,
    as we (definitively including me) sometimes take knowledge for granted, if we are not constantly fed with such information, and hence tend to forget the times when we started off as freshmen.

  • adding incrementing numbers at the end of each line

    Locked
    7
    0 Votes
    7 Posts
    2k Views
    Terry RT

    @guy038 said:

    we could generalize the process

    I REALLY like that regex, however I wonder if it would be worth it as in the OP’s situation it would be a toss up as to whether my regex or your’s is the easier to set up.

    The power (and beauty) of your regex lies with the shortness of code, and I should say it’s generalization. Even if there were say 50 numbers to be used (50-99), your regex still looks good, mine on the other hand becomes unwieldy.

    Thanks for the enlightenment
    Terry

  • Want to change the google search to customer search.

    35
    0 Votes
    35 Posts
    14k Views
    PeterJonesP

    @Cary-Korn said:

    Unfortunately I have been unable to get any of the suggested solutions to work. I appreciate all the help. I didn’t think this would be so tough.

    If you still want help, you are going to have to be more specific than that.

    I tested my 2019-03-01T14:22:23.197Z post pretty thoroughly, and it worked exactly as I expected, passing chrome the full URL.

    So, things we will need to know in order to keep helping you:

    What browser do you want the URL to go to? Chrome? Firefox? Edge? IE? Something else? If it’s Chrome or Firefox or , we will need the full path to your browser: you should be able to right click on your browser shortcut (or, if it’s active on your toolbar, right click on the icon, then again on the application name) to get you to the Properties window, and copy the full path there. If it’s Edge or IE, we’ll use the Microsoft-special notation for accessing those browsers. 'coz microsoft. What is the exact version of Notepad++ you are using? Maybe your version is behaving differently than mine it would be easiest if you went to the menu ? > Debug Info > Copy debug info into clipboard, and pasted the results here. what exact sequence did you use when editing the shortcuts.xml? exactly how long is your URL? Did you try my exact circumstance from my 2019-03-01T14:22:23.197Z post, or did you make changes to the URL before saving the batch file? when I did that setup, making sure to save the setup, exit Notepad++, and then reload, it sent the really long URL to chrome properly if you did try this, with the DUMMY URL, how exactly did it fail? (saying “didn’t work” is so generic as to be useless for helping us help you) Did it not try to do anything? If so, where exactly did you save longurl.bat? Did you make the shortcuts.xml point to the real location of longurl.bat, or did you leave it pointing to my location for longurl.bat Did it not open chrome? Did it open chrome and try to go to the full dummy URL, and fail because it didn’t exist? This is what I would expect. In which case, I would say it didn’t fail, because that was the expected behavior. Or did open chrome, but truncate the URL?

    Once I made the batch file, it never truncated the URL on me.

    I just tried 2138 characters in the dummy URL, plus the %1 search string in my batch file, which got replaced by $(CURRENT_WORD) from Notepad++, which was the exact text longurl, and chrome tried to open that page with the full 2144 character URL; because that machine doesn’t exist, chrome told me this site can't be reached, but it actually tried to go there, and the full URL was in the browser bar. If I change my batch file to

    "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "https://www.google.com/search?ie=UTF-8&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&sen=012&q=%1" pause so that it’s going to a valid website (google search), a total of 2106 characters plus the search string long, plus has a pause so that a cmd.exe window stays open until you hit enter or space or something, I saw the full URL in the cmd.exe window, I saw the full URL in chrome, and chrome went to the google-search for the word (longurl) that I highlighted when I launched

    Do you see how detailed I was when trying to help you? If you are detailed when responding to our help, it will be easier for us to help you.

    Please answer all five of those questions. Also, tell me an exact path where you are willing to save longurl.bat. With those five answers (detailed), and with an exact path, I should be able to craft something that works for you. I will start with the big long dummy google search, so that you know it’s really working… but after that, depending on how much info you give, I might be able to help you convert the URL closer toward what you want in real life.

  • bold text everywhere

    Locked
    7
    0 Votes
    7 Posts
    17k Views
    Shannon SearleS

    @PeterJones

    I think I figured it out, thanks

  • Replace various lines with clipboard content (or from another file).

    Locked
    4
    0 Votes
    4 Posts
    1k Views
    guy038G

    Hello, @pilltwilliams, @terry-r and All,

    As your text, William, seems to have literal headers TEXT_#####_ORIG and TEXT_#####_DEST, which clearly identifies the lines, it’s fairly easy to create the appropriate regex S/R ;-))

    So, for instance, assuming that File_A contains the text, even with indented lines, and, possibly, other non-related lines, below :

    TEXT_00001_ORIG|This is original text. TEXT_00001_DEST| An other TEXT_00002_ORIG|An original line. TEXT_00002_DEST| little story TEXT_00003_ORIG|More text. TEXT_00003_DEST| TEXT_00004_ORIG|This is TEXT_00004_DEST| just for the TEXT_00005_ORIG|example TEXT_00005_DEST| demonstration TEXT_00006_ORIG|the general TEXT_00006_DEST|

    and that File_B contains the DEST lines, indented or not, with possible non-related lines, as below :

    TEXT_00001_DEST|This is modified text. TEXT_00002_DEST|An altered line. 12345 TEXT_00003_DEST|Even more text. Some bla TEXT_00004_DEST|a small blah text for TEXT_00005_DEST|to get testing TEXT_00006_DEST|idea !

    Then :

    Open a new N++ tab

    Paste the File_A contents in this new tab

    Insert a line of, at least, 3 tilde characters

    Paste the File_B contents, right after

    Now, the new tab contains :

    TEXT_00001_ORIG|This is original text. TEXT_00001_DEST| An other TEXT_00002_ORIG|An original line. TEXT_00002_DEST| little story TEXT_00003_ORIG|More text. TEXT_00003_DEST| TEXT_00004_ORIG|This is TEXT_00004_DEST| just for the TEXT_00005_ORIG|example TEXT_00005_DEST| demonstration TEXT_00006_ORIG|the general TEXT_00006_DEST| ~~~~~~~~~~ TEXT_00001_DEST|This is modified text. TEXT_00002_DEST|An altered line. 12345 TEXT_00003_DEST|Even more text. Some bla TEXT_00004_DEST|a small blah text for TEXT_00005_DEST|to get testing TEXT_00006_DEST|idea !

    Open the Replace dialog

    SEARCH (?s)^\h*(TEXT_\d+_DEST\|)(?=\R.+\R\h*\1(?-s)(.+)\R)|^(\h*\R)*~~~*.+

    REPLACE ?1$0\2

    Preferably, check the Wrap around option

    Select the Regular expression search mode

    Click once, on the Replace All button or several times on the Replace button

    Et voilà ;-))

    You should get the expected text, below :

    TEXT_00001_ORIG|This is original text. TEXT_00001_DEST|This is modified text. An other TEXT_00002_ORIG|An original line. TEXT_00002_DEST|An altered line. little story TEXT_00003_ORIG|More text. TEXT_00003_DEST|Even more text. TEXT_00004_ORIG|This is TEXT_00004_DEST|a small just for the TEXT_00005_ORIG|example TEXT_00005_DEST|to get demonstration TEXT_00006_ORIG|the general TEXT_00006_DEST|idea !

    Just note that the line of tildes and all the subsequent characters have been wiped out, as well ! The number of replacements is the number of lines TEXT_#####_DEST of File_B + 1

    Best Regards

    guy038

    P.S. :

    Be aware that, in some cases ( great amount of data, lot of non-related text between two significant lines, with headers, ... ) this regex S/R could not work properly, and, for instance, wrongly select all file contents :-((

  • bookmarks local to files

    Locked
    5
    0 Votes
    5 Posts
    746 Views
    EkopalypseE

    @todmar13

    Maybe another approach, what about using find in all open files instead of marking the results.
    The resulting search result window would have all the hits
    and in case you need to change something a click on it would open the file automatically at the exact location.

  • Macro Selecting Search Results Text and pasting into new file

    Locked
    7
    1 Votes
    7 Posts
    2k Views
    Alan KilbornA

    @Phil-Grigg

    Not sure what your most recent posting is trying to say…

  • Delete string and next two lines and repeat ?

    Locked
    16
    0 Votes
    16 Posts
    4k Views
    Terry GaffT

    Meta Chuh, Guy038 etc.
    Many thanks indeed for your help and instructions. The first reply by Meta Chuh was exactly what I was looking for. I needed to add this expression to my existing set of macros to my shortcuts file and Guy’s explanation was much appreciated also.
    Terry