• Facebook login broken

    2
  • Style token not saved

    30
    0 Votes
    30 Posts
    13k Views
    SalepS

    @PeterJones thank u sir I got it

  • Notepad ++ connecting to browsers from program

    3
    0 Votes
    3 Posts
    218 Views
    Mark OlsonM

    You could also right-click on the tab for a file and select Open in Default Viewer from the drop-down menu that appears. If, for example, your default viewer for a .html document was Firefox, that would open that file in Firefox.

    I have no idea which NPP version that option was first introduced in.

  • alphabetic order

    4
    1 Votes
    4 Posts
    253 Views
    pouemes 0P

    thanks Alan and Coises will see the plugin

  • A simple search and replace

    8
    0 Votes
    8 Posts
    292 Views
    Mark OlsonM

    @guy038 said in A simple search and replace:

    To my mind, all these statements can be solved with the two following regexes :

    Regex A : (?-s)"(?:\\.|.)+" Regex B : (?-s)"(?:\\.|.)+?"

    I would use Regex B with a slight modification; the +? should be a *? to correctly handle the empty string "".

    Thus, I think the simplest regex we can use for this task is probably (?-s)"(?:\\.|.)*?"

    There is one important caveat here: these regexes for recognizing JSON strings will break if you start the search in the middle of a string.

    For example, if you have this text

    "foo" "bar" "from\r\n\t[\"\\\"here\\\"\", \"to\", \"here\" is all one string]"

    the best regex, (?-s)"(?:\\.|.)*?", will correctly identify exactly three strings in the file if you start the search at the beginning of the file.

    But if you start with the caret after the word from on the second line, you will incorrectly identify "\\\"here\\\"\", \"to\", \"here\" is all one string]" as being a valid string.

  • Hotkey for Search Results > Copy Selected Line

    3
    1 Votes
    3 Posts
    348 Views
    Artur HarisonA

    @PeterJones
    I thought it would be in the release.
    Since the status on GitHub is implemented.
    Sorry!

  • How to (auto) format text to start at column 25, 85 and 115

    10
    0 Votes
    10 Posts
    1k Views
    Alan KilbornA

    Another editing technique that might help; say you have this:

    218c1177-23de-4b20-b9a1-2db2b1d6c785-image.png

    Clearly all of the data in the second column needs to be lined up.

    If you create a column caret using Shift+Alt+arrows and make it look like this:

    93212e91-ccf9-4b6f-8a93-0d3cbaf7aaf7-image.png

    and then press Ctrl+Delete, you’ll get something looking like this:

    3f7b30e7-d6e8-427b-9c70-bb66c644d59a-image.png

    It’s then a simple matter to press space-bar a few times to get all of the data aligned, and in the correct column:

    289e96d7-55b3-4b4a-a488-285d26cd325a-image.png

    Note that in the create-column-caret step, the column caret does NOT touch any of the text to be aligned, there is one or more intervening space(s) (this is a very important point).

  • Notepad data deleted after clicking "Yes" to prompt

    5
    0 Votes
    5 Posts
    475 Views
    Alan KilbornA

    @githubtools101 said:

    there is a way to TURN OFF that unnecessary prompt for the future:
    Under “File Status Auto-Detection” click Disable from the drop-down menu
    Now, you will NEVER be given this prompt again!
    I don’t understand why Notepad++ has this feature to begin with

    So @githubtools101 had a problem with data loss, and your solution is to give him a method that can guarantee future data loss? Nice job…

  • To align single line content to multiple lines

    2
    0 Votes
    2 Posts
    155 Views
    CoisesC

    @Lakshman-Prasath-Š said in To align single line content to multiple lines:

    Try this:

    From the main menu, choose Search | Replace….

    In the dialog, enter:
    Find what: Updated
    Replace with: Updated\r\n
    Wrap around checked
    Search mode: Extended
    then click Replace All.

  • Combine 2 searches

    6
    0 Votes
    6 Posts
    348 Views
    HaPe KrummenH

    @Mark-Olson @PeterJones

    thank you for your help. ChatGPT wrote me a routine that worked with a dozen files on my directory testfiles … now I copy all files to a directory to test it tonight with 25000 files

    I’m really surprised how easy this can be.

    And I’m reading the code to understand, what the script is doing as I apreciate any help but want to learn :-)

  • How to group lines with same beginning

    12
    0 Votes
    12 Posts
    2k Views
    Mark OlsonM

    @Alan-Kilborn said in How to group lines with same beginning:

    Python’s re uses a different engine than Notepad++ does. While this can be a “good thing”, sometimes it will trip a user up – they’ll get a “tricky” regular expression working in Notepad++, and then run into trouble when trying to automate using the same expression in a script.

    This does in fact happen in multiple places in my script. I’ll just break down how the regular expressions I used had to change to be compatible with Python’s re engine.

    STEP 1 REGEX CHANGES

    (?-s)^([^\$\r\n]*)(.*\R)(?:\1(.*)(?:\R|\z))*
    becomes
    (?m)^([^$\r\n]*)([^\r\n]*(?:\r?\n|\r))((?:\1(?:[^\r\n]*)(?:\r?\n|\r)?)*)

    (?-s) is unnecessary (because . already does not match newline by default in re) (?m) is necessary to make it so that ^ matches at the beginning of the file and at the beginning of lines. In Notepad++ regex, ^ matches the beginning of lines by default. Every instance of . must become [^\r\n] because in Python . matches \r, which is bad because that is the first character of the \r\n sequence that indicates a newline in Windows. Every instance of \R (shorthand for any newline) must become (?:\r?\n|\r), which matches the three most common newlines (\n, \r\n, and \r)

    The Step 2 regex also needs to be changed from (?-s)(\R?)(\x07)?([^\$]*)(\$+)(.*) to ((?:\r?\n|\r)?)(\x07)?([^$\r\n]*)(\$+)([^\r\n]*) because of point 3 above (the lack of \R in Python’s re)

    Finally, I had to create callback functions (the def replacer1(m): and def replacer2(m)) above, because the replacement regexes I used in Notepad++ don’t work in Python.

  • search / replace /delete parts of URL on several hundred pages

    9
    2 Votes
    9 Posts
    889 Views
    HaPe KrummenH

    Just wanted to say THANK YOU for your help!

    Beeing able to use regular expressions changes a lot and makes searching / replacing and deleting of texts so much easier.

    Have a good day!

  • Opening files in Macintosh and i need in windows

    4
    0 Votes
    4 Posts
    8k Views
    John RinconJ

    @Scott-Sumner . Thanks Scott.

    September 2024 and this message is still very helpful. I had the same problem loading a file that usually loads without problems.

    This time, the problem was the one related with your diagnosis. The line terminators CRLF in the end of line of the records.

    Thanks for help the community.

  • Run C++ without compiling

    7
    0 Votes
    7 Posts
    926 Views
    rdipardoR

    The directory will change automatically after clicking on NppExec’s “Follow $(CURRENT_DIRECTORY)” option (which I thought was enabled by default – sorry):

    Screenshot 2024-09-10 121533.png

  • How can I setup that when I close NotePad++ all tabs will close?

    3
    0 Votes
    3 Posts
    231 Views
    H4P3RH

    @PeterJones thank you very much!

  • How to integrate Notepad++ and Microsoft Edge?

    5
    0 Votes
    5 Posts
    1k Views
    mkupperM

    @Thomas-S said in How to integrate Notepad++ and Microsoft Edge?:

    The solution works also with EDGE, you only have to create this entry in the registry:

    This either does not work on Windows 11, no longer works, or maybe I need to reboot. As the registry path was for IE I also did the same for Edge.

    Attempts to view the source of a web page in Edge still create a new Edge tab with the URL set to something like view-source:https://community.notepad-plus-plus.org/topic/23872/how-to-integrate-notepad-and-microsoft-edge/4

    I added these, first as a test to see of plain old Notepad.exe was launched. I had also tried the full path to Notepad++. No joy.

    Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Edge\View Source Editor\Editor Name] @="Notepad.exe" [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\View Source Editor\Editor Name] @="Notepad.exe"

    Google for site:answers.microsoft.com "View Source Editor" finds most of the answers are for Windows 7. This forum post on answers.microsoft.com is more generic as far as the Windows version goes and is presumably is the source of the information in @Thomas-Spost.

  • How to update title of plugin

    5
    0 Votes
    5 Posts
    311 Views
    SinghRajenMS

    @rdipardo

    The - separator is indeed fixed.

    Yes, it is fixed as we can see it here. Also, it seems we need to ensure tbData.pszAddInfo remains valid. If you want to change anything there, update the text on the original pointer.

    I feel, instead passing _hself to LPARAM, it should pass tTbData to NPPM_DMMUPDATEDISPINFO.

    Anyway, - is very minor stuff here. I am good with it. Thanks for the help on this.
    Cheers!

  • replacing all in line with veried numbers1

    4
    0 Votes
    4 Posts
    377 Views
    CoisesC

    @darkfang1989 said in replacing all in line with veried numbers1:

    @Mark-Olson

    <csv xpath=“/entitygroups/entitygroup[@name=‘sleeperHordeStageGS332’]/text()” delim=“\n” op=“add” >
    zombieFatHawaiianElite, .24
    zombieFemaleFatElite, .24
    zombieHazmatElite, .39
    zombieLumberjackElite, .39
    zombieSoldierElite, .39
    zombieLabElite, .58
    zombieSpiderElite, .58

    this is one of the blocks, all blocks having different numbers. i would like to know if there’s a way to change the “zombieSpiderElite, .58” number in each block despite the number being different in each one.

    You can use regular expression replacement to do that. From the main menu, select Search | Replace…, then enter:

    Find what: (?<=zombieSpiderElite,)\s*[.\d]+
    Replace with: .00 (note: there is a space before the period, but you can’t see it here)
    Wrap around: checked
    Search Mode: Regular expression

    and click the Replace All button.

  • 0 Votes
    7 Posts
    2k Views
    rdipardoR

    @Sylvia Ngari

    You could also try a third-party theme, like this one, which even includes a module attribute style — although it’s debatable how useful that feature really is:

    Python (Coral Reef theme)

  • How to set options for the current file?

    4
    0 Votes
    4 Posts
    413 Views
    Alan KilbornA

    @Coises

    Actually, I think any of those ideas could be made to work well.