• Seach a word and pick the 100th result

    Locked
    7
    1 Votes
    7 Posts
    2k Views
    guy038G

    Hi, @tarik, @scott-sumner, @terry-r and All,

    Thanks, Scott, for your additionnal information. Look like I was a bit tired to develop ;-))

    Of course, as Scott mentioned, your can, either, perform a sensitive to case OR a insensitive to case search, with the respective generic regexes :

    (?s-i)(?:.*?(X)){N}.*?\K\1 ( Sensitive )

    (?si)(?:.*?(X)){N}.*?\K\1 ( Insensitive )

    Cheers,

    guy038

  • notepad++ page

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    PeterJonesP

    ++@dinkumoil: that’s a great solution, if you never use the “Search on Internet”, and only want one selected-text-to-website command.

    @vincity-taymodaimo, If you want to be able to have more than one, you can add it (or them) to the Run menu by the following instructions:

    [assumes a normal installation of Notepad++]:

    Save all files and close all instances of Notepad++

    Open one instance of Notepad++. Don’t open any other instances while executing the following steps, unless directed by these steps

    Open %AppData%\Notepad++\shortcuts.xml

    Go down to the <UserDefinedCommands> section; there should be entries like launch in Firefox or wikipedia search or similar

    add a line similar to the following

    <Command name="Translate DE to EN" Ctrl="no" Alt="no" Shift="no" Key="0">https://www.deepl.com/translator#de/en/$(CURRENT_WORD)</Command> you could add a keyboard shortcut here, if you know the KEYCODE for the given key; but I find it easier to follow the final step, below if you have other commands, do them similarly

    Save %AppData%\Notepad++\shortcuts.xml, close the file, then close Notepad++

    Open Notepad++

    The Run menu should contain Translate DE to EN. Highlight a German word in Notepad++; Run > Translate DE to EN. Your default browser should open a window or tab with the translation.

    If you want to assign a keyboard shortcut,

    go to Run > Modify shortcut/delete command (or Settings > Shortcut Mapper > Run Commands), select Translate DE to EN Modify Select your desired shortcut Ok Close
  • Search in one file DELETE in another (YASADT)

    Locked
    6
    0 Votes
    6 Posts
    1k Views
    Terry RT

    @Gregory-Mompezat
    thanks for upvotes. I’m glad it worked without issues. I’m sad because I spent some minutes writing some of the text from the image, copying it and duplicating, then changing some of the text, when I didn’t see the “pastebin” link below.

    Terry

  • multiple text files replace help

    Locked
    5
    0 Votes
    5 Posts
    983 Views
    Vasile CarausV

    use GrepWin or TextCrawler for multiple search and replace in million of files all at once :)

    https://github.com/stefankueng/grepWin/releases/tag/1.8.1

    https://www.digitalvolcano.co.uk/textcrawler.html

  • 1 Votes
    4 Posts
    814 Views
    gapsfG

    @Scott-Sumner
    Yep, “Shift+Ctrl+Arrow”.
    Your advice helped.

  • Emmet: "Go to matching pair" won't work?

    Locked
    1
    0 Votes
    1 Posts
    462 Views
    No one has replied
  • Cloud setting in Notepad++ is deleting files

    Locked
    2
    0 Votes
    2 Posts
    633 Views
    Scott SumnerS

    @twentyTwo

    when an unsaved tab is closed in notepad++, it is deleted

    Yes, that’s the idea. If you close an unnamed tab (e.g. “new 1”, “new 5”, “new 23”) without saving it to a hard-named file first, it and its data are discarded.

  • Is there a current Manual?

    4
    0 Votes
    4 Posts
    2k Views
    AZJIO AZJIOA

    And I’d be happy to help with writing that manual.
    And what’s stopping you from doing this?
    When a person wants to help, 3% of the total work is implied.

  • NPP Sessions

    6
    0 Votes
    6 Posts
    2k Views
    Scott SumnerS

    @mikeguyre said:

    The File open dialog for Load Session defaults to the folder of the last file you had opened so you have to navigate to find the session file.

    Yes, this is annoying, but if you keep all of your session config files in one folder you can put a link to that folder in your Windows Favorites so that it is only a few extra navigation clicks away.

    Jim’s solution sounds better…try it.

  • Failure to Launch

    33
    3 Votes
    33 Posts
    44k Views
    Scott SumnerS

    @Jos-Debouvere177 said:

    I’m facing the same problem ‘failure to launch in browser’

    “…in browser” ?

  • Issue with 'asNotepad.xml' file.

    12
    0 Votes
    12 Posts
    3k Views
    SalviaSageS

    Wow. Great post @PeterJones.

    You may not know this, but editing the windows registry is one of my strongest areas on computers. So it was a breeze for me to recreate what you have said here.

    This method is superior to creating a asNotepad.xml file in the Notepad++ directory because that does not open the file that you want to open in the viewing tab but only loads it into the tab bar so you are left staring at an older file that you opened which is definitely not what the user wants.

    Also, this option still allows you to open things in the regular, sessioned and tabbed notepad++ while giving you another option in the right click menu to open things in a single tabbed format just like notepad.exe

    So, if you also want notepad++ to work like this, I created a .reg file, just create a file that ends with the .reg extension and copy paste the following in to it.

    Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\SingleTabNotepad++] @ = "Edit with Notepad++ (Single Tab)" "Icon"=hex(2):63,00,3a,00,5c,00,70,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\ 00,66,00,69,00,6c,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5c,00,\ 4e,00,6f,00,74,00,65,00,70,00,61,00,64,00,2b,00,2b,00,5c,00,6e,00,6f,00,74,\ 00,65,00,70,00,61,00,64,00,2b,00,2b,00,2e,00,65,00,78,00,65,00 [HKEY_CLASSES_ROOT\*\shell\SingleTabNotepad++\command] @ = "\"c:\\program files (x86)\\Notepad++\\notepad++.exe\" -nosession -notabbar -multiInst \"%1\""

    This will give you an option on top of the default “Edit with Notepad++” to use notepad++ without the sessions or tabs and will open the files separately just like in notepad.exe (without changing any default notepad++ behaviour)

    Thanks to everyone who replied!

  • Removing Words From Auto-Completion

    10
    2 Votes
    10 Posts
    3k Views
    Scott SumnerS

    @Shelby-Copeland

    I can’t tell if that last reply of yours was dripping with sarcasm or not. :-)

    It would certainly be easy enough to pull one of the files from ...\plugins\APIs into Notepad++ and then do a Find in Files on it (of course you have Follow current doc. checkbox ticked, right?), looking for the exact-case version of pubupdate

    Please post again if this technique doesn’t solve your problem, and we’ll what else can be done.

  • Txt to Asc

    Locked
    2
    0 Votes
    2 Posts
    6k Views
    PeterJonesP

    Does File > Save As and name = file.asc not work for you?

    If not:

    you might want to check to see if you’re hiding extensions in Windows → that “feature” of windows can lie to you (Windows Explorer > View > Options > Change Folder and search options > View = uncheck ☐ Hide extensions for known file types) change the Filter entry in the Save or SaveAs dialog to “all files (.)” or equivalent might want to toggle Settings > Preferences > Default Directory > ☑ Use new style dialog on or off → that setting can change how the Save, Save As, and Open dialogs display behaves, especially for the file filters, and you might be expecting the opposite behavior

    Otherwise, you’ll have to say specifically what you’ve tried (including which settings you have), and how you know it’s not working right for you.

  • Check which numbers are not included

    Locked
    10
    0 Votes
    10 Posts
    4k Views
    PeterJonesP

    @Scott-Sumner,

    That’s easy: from the URL.

    https://notepad-plus-plus.org/community/topic/16392/check-which-numbers-are-not-included/9 ^^^^^
  • 1 Votes
    1 Posts
    487 Views
    No one has replied
  • How to merge 2 seperate lines into 1 and add a colon in between?

    Locked
    2
    2 Votes
    2 Posts
    1k Views
    Scott SumnerS

    @sani-bani

    Try this:

    Invoke Replace dialog (default key: ctrl+h)
    Find what zone: (?-s)^(.+)\R(.+)(?:\R|\z)
    Replace with zone: \1:\2
    Wrap around checkbox: ticked or unticked, as you like
    Search mode selection: Regular expression
    Action: Press Replace or Replace All button, as you like

    Here’s how it works:

    THE FIND EXPRESSION:

    (?-s)^(.+)\R(.+)(?:\R|\z)

    [Use these options for the whole regular expression][1 ] (?-s) [(hyphen inverts the meaning of the letters that follow)][1 ] - [Dot doesn’t match line breaks][1 ] s [Assert position at the beginning of a line (at beginning of the string or after a line break character) (carriage return and line feed, form feed)][2 ] ^ [Match the regex below and capture its match into backreference number 1][3 ] (.+) [Match any single character that is NOT a line break character (line feed, carriage return, form feed)][4 ] .+ [Between one and unlimited times, as many times as possible, giving back as needed (greedy)][5 ] + [Match a line break (carriage return and line feed pair, sole line feed, sole carriage return, vertical tab, form feed)][6 ] \R [Match the regex below and capture its match into backreference number 2][3 ] (.+) [Match any single character that is NOT a line break character (line feed, carriage return, form feed)][4 ] .+ [Between one and unlimited times, as many times as possible, giving back as needed (greedy)][5 ] + [Match the regular expression below][3 ] (?:\R|\z) [Match this alternative (attempting the next alternative only if this one fails)][7 ] \R [Match a line break (carriage return and line feed pair, sole line feed, sole carriage return, vertical tab, form feed)][6 ] \R [Or match this alternative (the entire group fails if this one fails to match)][7 ] \z [Assert position at the very end of the string][8 ] \z THE REPLACE EXPRESSION:

    \1:\2

    [Insert the text that was last matched by capturing group number 1][9 ] \1 [Insert a colon][10 ] : [Insert the text that was last matched by capturing group number 2][9 ] \2

    Created with RegexBuddy

    [1 ]: https://www.regular-expressions.info/modifiers.html
    [2 ]: https://www.regular-expressions.info/anchors.html
    [3 ]: https://www.regular-expressions.info/brackets.html
    [4 ]: https://www.regular-expressions.info/dot.html
    [5 ]: https://www.regular-expressions.info/repeat.html
    [6 ]: https://www.regular-expressions.info/nonprint.html
    [7 ]: https://www.regular-expressions.info/alternation.html
    [8 ]: https://www.regular-expressions.info/anchors.html#az
    [9 ]: https://www.regular-expressions.info/replacebackref.html
    [10 ]: https://www.regular-expressions.info/characters.html

    RegexBuddy settings to emulate N++ regex engine: Application=boost::regex 1.54-1.57 / flavor=Default flavor / replacement flavor=All flavor / ^$ match at line breaks / Numbered capture / Allow zero-length matches

  • How to set background color for a own style

    Locked
    1
    0 Votes
    1 Posts
    672 Views
    No one has replied
  • Just installed update, now can't find my stuff!

    Locked
    6
    0 Votes
    6 Posts
    1k Views
    Scott SumnerS

    @PeterJones said:

    Don’t forget these directories… that’s where you will want to look for the files in the future.

    AND…most importantly, although I’m 99% sure this advice will be ignored, these are the directories you create independent backup sets from.

  • Delete a character

    Locked
    2
    0 Votes
    2 Posts
    637 Views
    PeterJonesP

    find what = ^0+
    replace with = `` (empty)
    make sure you’re in regular expression mode


    FYI: if you have further regex needs, study this FAQ and the documentation it points to. Before asking a new regex question, understand that many of us will expect you to show what data you have (exactly), what data you want (exactly), what regex you already tried (to show that you’re showing effort), why you thought that regex would work (to prove it wasn’t just something randomly typed), and what data you’re getting with an explanation of why that result is wrong. When you show that effort, you’ll see us bend over backword to get things working for you. If you need help formatting the data so that the forum doesn’t mangle it (so that it shows “exactly”, as I said earlier), see this help-with-markdown post, where @Scott-Sumner gives a great summary of how to use Markdown for this forum’s needs.

  • 0 Votes
    2 Posts
    746 Views
    Scott SumnerS

    @Nico-Henttunen

    It comes up occasionally. You cannot do it with “replace extended”. You can resort to a programming language (in which Notepad++ is not involved) or you can write a script within Notepad++ to do it. Some related script references follow if you care to do your research to get started:

    https://notepad-plus-plus.org/community/topic/15318/replace-text-with-incremented-counter https://notepad-plus-plus.org/community/topic/16307/need-regex-for-incremental-by-1 https://notepad-plus-plus.org/community/topic/16245/find-and-replace