Community
    • Login
    1. Home
    2. Popular
    Log in to post
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics

    • All categories
    • guy038G

      Other thoughts regarding the "ReWrap Text to (Clipboard or 72) width" of the old "TextFX" plugin

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      9
      9
      1 Votes
      9 Posts
      455 Views
      guy038G
      Hi, @mpheath and All, @mpheath, from your advice, I finally chose the following process : First, run a Edit > Blank Operations > TAB to Space option Then run the regex replacement below, where C represents the maximum number of chars after you want a line-break : SEARCH [\x20\r\n]*\z|(?-s)^(?=.{C+1,}).{1,C}\K(?:\x20*\R|\x20+) REPLACE \r\n for Windows files    or    \n for Unix files Finally, run a Edit > Blank operations > Trim Trailing Space option Remarks : I began the regex with [\x20\r\n]*\z which will replace possible mixed range of spaces and new lines, at the very end of current file, with a single line-ending I used the (?-s)^(?=.{C+1,}) ( instead of the (?-s)^(?=.{C+1}) as it seems slightly faster within huge files ! Compare to your regex, I still wanted to consider all spaces, possibly followed with a line-break. So, the part .{1,C}\K(?:\x20*\R|\x20+) Note that the final Trim Trailing Space action is necessary because of this specific case with a splitting after column 40 12345678901234567890123456789012345 ABCDE 12345678901234567890123456789012345 ABCDE Now, let’s try it out with a concrete example : Double-click on https://www.gutenberg.org/cache/epub/2701/pg2701.txt => The text of the novel Moby Dick or The Whale should appear Go to the second occurrence of the string CHAPTER 1. Loomings. Select from this line to the line END OF THE PROJECT GUTENBERG EBOOK MOBY DICK; OR, THE WHALE, excluded Paste it in a N++ new tab and name it Moby_ORG.txt So, the Moby.ORG.txt file should begin and end with : Call me Ishmael. Some years ago—never mind how long precisely—having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world. It is a way I have of driving off the spleen and regulating the circulation. Whenever I find myself growing grim about ... ... ... ... unharming sharks, they glided by as if with padlocks on their mouths; the savage sea-hawks sailed with sheathed beaks. On the second day, a sail drew near, nearer, and picked me up at last. It was the devious-cruising Rachel, that in her retracing search after her missing children, only found another orphan. In other words : Line 1 EMPTY Line 2 FIRST line of text Line 20,707 LAST line of text Line 20,708 = \z As this file seems already wrapped to 71 chars, I decided to do, FIRST, an intelligent un-wrapping ! I verified that there was no tabulation, nor any trailing space in the Moby_ORG.txt file Then I noticed that 43 lines began with one or two space characters, without any real utility. So, I ran the Edit > Blanck operations > Trim Trailing Space option To get a correct un-wrapping process, we need to use the following regex S/R : SEARCH (?-s).+\K\R(?=.+) ( Do not insert a ^ character between the parts (?-s) and .+ ) of this regex ! ) REPLACE \x20 Finally, I saved the changes and renamed the Moby_ORG.txt as Moby_To_Wrap.txt So, the Moby_To_Wrap.txt file begins and ends as below : Call me Ishmael. Some years ago—never mind how long precisely—having little ... There now is your insular city of the Manhattoes, belted round by wharves as ... Circumambulate the city of a dreamy Sabbath afternoon. Go from Corlears Hook ... ... ... ... ... “AND I ONLY AM ESCAPED ALONE TO TELL THEE” Job. The drama’s done. Why then here does any one step forth?—Because one ... It so chanced, that after the Parsee’s disappearance, I was he whom ... In other words : Line 1 EMPTY Line 2 FIRST line of text Line 4,884 LAST line of text Line 4,885 = \z The second line of your script is always : local maxLineLength = 78 And the Settings > Preferences... Margins/Border/Edge > Vertival Edge Settings only contains the 78 value Then I copied the Moby_ORG.txt file three times, as Moby_Regex.txt, Moby_Lua.txt and Moby_Ctrl-I.txt and I applied : Your script against the Moby_Lua.txt file, The Edit > Line Operations > Slipt Lines option against the Moby_Ctrl-I.txt The following regex S/R against the Moby_Regex.txt SEARCH [\x20\r\n]*\z|(?-s)^(?=.{79,}).{1,78}\K(?:\x20*\R|\x20+) REPLACE \r\n Upon comparison, it turns out that these three files are completely different ! Compared to the Moby_Regex.txt file , I noticed that your Moby_Lua.txt sometimes grasps : More than it should, as, for example, in the lines : “Who-e debel you?”—he at last said—“you no speak-e, dam-me, I kill-e.” And so saying with a wrapping after 84 chars [image: 1793374535176-a1299916-7d59-4c0b-a524-c5edf237ba4e-image.jpeg] “Oh, I don’t mind ’em, sir,” said Archy; “I knew it all before now. Didn’t I hear ’em with a wrapping after 85 chars [image: 1793374577115-f376a0b5-7d95-4f82-80f8-54c71394606e-image.jpeg] Less than it should, as, for example, in lines : the Stoics to enable you to grin and bear it. But even this wears off in, with a wrapping after 72 chars [image: 1793374617791-130645ce-362a-43a6-bf62-c511f338cdac-image.jpeg] knowingly, would thereby render yourself liable to a criminal, with a wrapping after 61 chars [image: 1793374649953-eb346fc2-0eb6-445c-bc6f-1d4ef581b4e9-image.jpeg] Not important, though. Just in case you would work on your script a little more ! Now, using this long text ( the Moby_To Rewrap.txt file ), I confirm that the regex, below, exactly mimics the Ctrl + I feature : SEARCH (?-s)^(?=.{78})(?:.{1,76}\x20|.{77})\K REPLACE \r\n for Windows files    or    \n for Unix files However, note that the Edit > Line Operations > Split lines operation leaves a trailing space on all lines of a paragrah but the last one ! I think that further investigation would be useless and I’ll personally just use the method, shown at the beginning of this post, when I need to wrap any text ! Best Regards, guy038 Oh, I almost forgot something important : When you select some text or all contents of a file and execute the Edit > Line Operations > Split Lines option : The View > Word wrap must be OFF The View > Show Symbol must be OFF
    • Thomas KnoefelT

      [New Plugin] MultiReplace

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      87
      3 Votes
      87 Posts
      92k Views
      guy038G
      Hi, @thomas-knoefel and All, For these Search Results : Search "Fi" (27 010 hits in 646 file(s)) [1 153 file(s) searched], I got, successively, using your valuable instructions : 1 m 13 s 78, then 1 m 10 s 85 and finally 1 m 11 s 06 when LoadThreads="auto" 1 m 25 s 78 and 1 m 26 s 39 when LoadThreads="0" 1 m 09 s 54 and 1 m 09 s 55 when LoadThreads="8" So, the two tests with LoadThreads="8" seem very slightly better !? Note that : From Laptop documentation, my processor is an Intel® Core™ i7-1165G7 2.80 Ghz (up to 4.7 GHz with Intel® Turbo Boost Technology ) 12 MB L3 cache, 4 cores 8 logical processors From informations système, I saw for Processeur : 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz, 2803 MHz, 4 cœur(s), 8 processeur(s) logique(s) Total installed RAM : 32 Gb This explain why I wanted to test with 8 threads. But, may be this assumption is not pertinent ! ? Best Regards, guy038
    • Robk BlueR

      Tab spacing copying from Notepad++ into WordPress

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      5
      0 Votes
      5 Posts
      245 Views
      PeterJonesP
      @Robk-Blue said: Yes I’m using tab setting of 2. The problem seems to be weirder that just application processing tab characters differently because it’s not uniform. That tells me that you probably have a mix of spaces and tabs, without realizing it. In Notepad++, use View > Show Symbol > Show Space and Tab. You will see a middot • for spaces, and an arrow → for tabs… the width of the arrow will grow to fit the remaining space in the tab-spacing [image: 1793293737638-b2bb93e2-ae0e-4350-a0df-1708f84dd276-image.jpeg] (2 spaces)display: block; (8 spaces)font-family: Arial; (4 spaces)text-align: right; (4 spaces)font-size: 20px; So what this tells me is that your actual file, in Notpead++, is really as follows, with your WordPress being set to show 4 spaces per tab instead of two: [SPACE][SPACE]display: block; [TAB][TAB]font-family: Arial; [SPACE][TAB]text-align: right; [SPACE][TAB]font-size: 20px; Though the 8-wide version being two tabs surprises me, because that wouldn’t look aligned properly in Notepad++ [image: 1793294204910-8cac1852-6a8b-4cfd-8a8b-635c5b5185ab-image.jpeg] But my guess is it’s similar to that, if not that exactly.
    • Laurie StearnL

      PHP Lang: Word vs Keyword

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      3
      0 Votes
      3 Posts
      223 Views
      Laurie StearnL
      @PeterJones Good info on StyleID, thanks.
    • fml2F

      Windows list / Entry for the current tab not visible initially

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      5
      2 Votes
      5 Posts
      452 Views
      fml2F
      For the reference: I’ve created https://github.com/notepad-plus-plus/notepad-plus-plus/issues/18554.
    • F

      Plugin trust chain: unsigned DLLs, hash-only verification, and a writable plugin directory

      Watching Ignoring Scheduled Pinned Locked Moved Security security, 披露因素, trust
      3
      0 Votes
      3 Posts
      235 Views
      PeterJonesP
      same user also posted similar in this issue in comment in #17480
    • F

      Uninstall keeps user config: what survives a 'clean reinstall', and why it matters

      Watching Ignoring Scheduled Pinned Locked Moved Security security
      3
      0 Votes
      3 Posts
      112 Views
      PeterJonesP
      same user posted similar in this issue #10923 comment
    • CoisesC

      NPPM_GETCURRENTVIEW vs NPPM_GETCURRENTSCINTILLA

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      3
      0 Votes
      3 Posts
      259 Views
      CoisesC
      @rdipardo said: I would point only out that the documented return value of NPPM_GETCURRENTSCINTILLA is not supported by the actual implementation; the FALSE-returning code path contradicts the statement that this API “Returns always True [sic]”. Technically so, though the FALSE value only happens when the caller sends an invalid parameter (LPARAM null, when it should be a pointer to an int). There’s also the additional result value of -1, which is documented, but which a comment in the code says “cannot happen”; the equivalent doesn’t exist in NPPM_GETCURRENTVIEW. What troubled me, though, was that the two calls base their responses on different things. I made some attempt to search the code. As best I could tell, the connection between Notepad_plus::_pEditView and Notepad_plus::_activeView is… haphazard. Even though they sound like they represent the same information in different forms (an integer that represents the main or secondary view as 0 or 1, and a pointer to one of two ScintillaEditView structures that represent the main and secondary views), I can’t “prove” that they always change together. So I cannot be certain that they do not represent different information, used for different purposes. If NPPM_GETCURRENTVIEW were meant merely to supersede the older, clumsier-to-use NPPM_GETCURRENTSCINTILLA, one would expect it to have been based on the same code (if for no other reason, for clarity). I couldn’t find any explanation of why this call was created or what problem it was meant to solve. So I was hoping perhaps someone would know and remember the rationale for the newer call and/or the purposes of the two different variables on which the calls are based, and could tell me either “they’re the same thing, use whichever you like” or “here is the situation in which they can return different results.”
    • Steven GuillemetS

      KB5127936 and changes to the Windows 11 context menu.

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      2
      0 Votes
      2 Posts
      52 Views
      PeterJonesP
      @Steven-Guillemet said: Hopefully this will let Notepad++ ditch its current method Until that patch has effectively 100% deployment, Notepad++ should not change its implementation, otherwise it breaks something that currently works for anyone who hasn’t applied that fix. (If there’s a way to make the two methods coexist peacefully, or if there’s a way the installer can test the version and use the appropriate alternative, then that’s great. But if not, then breaking a feature to support bleeding edge is a bad idea)
    • V

      Apex Language is missing under Language Tab

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      2
      0 Votes
      2 Posts
      194 Views
      PeterJonesP
      @vivek-viv , Unfortunately, there are an unknown number of “programming languages” or “data file languages” in the world, and no text editor can syntax-highlight 100% of them out-of-the box. Apex is not available in the syntax-highlighter library that Notepad++ uses, and until it is, it will never be in the upper portion of the Language list. To get it added: A feature request would have to be put into Lexilla, and then the Lexilla team, or external volunteer, would have to code up that lexer, and they would have to accept it, bundle it with the library; then Notepad++ could update to use a version with that, and then and only then, Notepad++ could be updated to enable and list the Apex language in the default menu. I’m not saying it’s impossible… just that it’s not likely to be fast. If Apex were similar enough to another language, then, in theory, the Apex language could be mapped to use the that existing language’s lexer, but given its own list of keywords. However, Notepad++ has the User Defined Language (“UDL”) feature, which allows you to define a keyword-based syntax highlighting – so you can put in various lists of keywords, operators, folding-keywords, and delimiter pairs, and get it to do a reasonable job of highlighting simple syntax in your language. The User Defined Language page, and all the UDL > pages in the manual’s table of contents below it, describe how to use the UDL system. There’s also a community-contributed User Defined Language Collection, where people can share UDL definitions that they’ve made, or find ones to use for themselves. I don’t see Apex there… but if you created one, you could share it there, so that other Apex users I did a quick search, and if this is the Apex you are talking about, then it looks similar to YAML (builtin) – so maybe trying to use the YAML lexer might be an initial workaround. And google search AI tells me that the HAML uses a similar structure – there is a UDL in the Collection for HAML, so you might be able to use that as a reference for how to get something like what you want for Apex. No guarantees, but it’s a starting point…
    • donhoD

      Notepad++ release 8.9.8.1

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      29
      4 Votes
      29 Posts
      9k Views
      Ilya GinzburgI
      @andrecool-68 for me it’s working: русский english עברית שפה קשה Notepad++ v8.9.8.1 (64-bit) Build time: Sep 24 2026 - 15:34:11 Scintilla/Lexilla included: 5.6.6/5.5.3 Boost Regex included: 1_90 pugixml included: 1.16 nlohmann JSON included: 3.12.0 Path: C:\Program Files\Notepad++\notepad++.exe Command Line: Admin mode: ON Local Conf mode: OFF Cloud Config: OFF WinGUp: present disableNppAutoUpdate.xml: absent Periodic Backup: ON Placeholders: OFF Scintilla Rendering Mode: SC_TECHNOLOGY_DIRECTWRITE (1) Multi-instance Mode: monoInst asNotepad: OFF File Status Auto-Detection: cdEnabledNew (for current file/tab only) Dark Mode: OFF Display Info: primary monitor: 1920x1080, scaling 100% visible monitors count: 2 installed Display Class adapters: 0000: Description - Intel® Graphics 0000: DriverVersion - 32.0.101.8991 0001: Description - Microsoft Remote Display Adapter 0001: DriverVersion - 10.0.26100.8521 0003: Description - Microsoft Remote Display Adapter 0003: DriverVersion - 10.0.26100.8737 OS Name: Windows 11 Enterprise (64-bit) OS Version: 26H2 OS Build: 26300.9711 Current ANSI codepage: 1255 Plugins: ComparePlus (3) mimeTools (3.1) NppConverter (4.7) NppExport (0.4)
    • A

      Portable keeps showing up in "Open With" after I deleted it.

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      2
      1
      0 Votes
      2 Posts
      201 Views
      Lycan ThropeL
      @Adam-Harrington , First you can search your Registry file for that phrase E:\Portables\Notepad++.exe %1 or just notepad++ and look for the key/value pairs you find and change them to the new location of your Notepad++ directory. Or search this forum and the FAQ’s list for this information. I searched mine and found it with just “notepad++”
    • guy038G

      Surprising regular expression !

      Watching Ignoring Scheduled Pinned Locked Moved Blogs
      2
      1 Votes
      2 Posts
      1k Views
      S
      That’s a clever little experiment! I never really thought about using regular expressions to represent mathematical patterns like multiples of 3, but it makes sense when you look at the binary sequence. Definitely a fun way to explore just how powerful regex can be beyond ordinary text searching.
    • Mark OlsonM

      JsonTools v5.5. is live!

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development json jsonviewer plugins
      24
      2
      7 Votes
      24 Posts
      29k Views
      Mark OlsonM
      JsonTools v8.6 is now available for download (it’s not up on the Plugins Admin yet, pending my PR to NppPluginList). Major changes: Fixed potential for Notepad++ to hang or crash due to: RemesPath queries with a for loop over an empty array Maliciously crafted schemasToFnamePatterns.json config file RemesPath queries that generate too-deep JSON (which previously could have caused stack overflow) List of 16 most recently used unique RemesPath queries (stored in config file, accessible by menu command) New control in JSON to CSV form, allowing columns to be listed in the order that they occurred in the first record, rather than in alphabetical order
    • FranciscoF

      rename files

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      4
      0 Votes
      4 Posts
      498 Views
      S
      Regex is definitely the way to go for this kind of filename cleanup in Notepad++. It’s great how a simple search-and-replace can handle a whole list of filenames at once instead of renaming each one manually. Just make sure to test it on a few files first to avoid any unexpected changes.
    • donhoD

      v8.9.9 Release Candidate will be available in one week

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      2
      3 Votes
      2 Posts
      822 Views
      donhoD
      The RC will be available before October 30. Sorry for the delay.