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

      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.
    • Robk BlueR

      Tab spacing copying from Notepad++ into WordPress

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      3
      0 Votes
      3 Posts
      149 Views
      Robk BlueR
      @Alan-Kilborn Hi, 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. Like I said, in Notepad++, I have the same amount of tabs per line for clean formatting of my CSS file. Yet in the WP portal, the lines will have different amount of tabs/spaces, not all uniformly different by the same amount. For example, this is how it might appear in NP++ . div { (2 spaces)display: block; (2 spaces)font-family: Arial; (2 spaces)text-align: right; (2 spaces)font-size: 20px; } In WordPress, it might look like this: . div { (2 spaces)display: block; (8 spaces)font-family: Arial; (4 spaces)text-align: right; (4 spaces)font-size: 20px; } Note: I had to represent the spaces in brackets as the forum editor removes them from my post.
    • Thomas KnoefelT

      [New Plugin] MultiReplace

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      86
      3 Votes
      86 Posts
      92k Views
      Thomas KnoefelT
      Hi guy038, interesting series of runs, thanks! Both runs without threads, the 2 m one and most likely the 1 m 28 s one too (see below), are slower than the 1 m 13 s with auto. So the threads do help on your key, even if cold runs vary quite a bit. Yes, the quotes are expected. LoadThreads is stored as text because it can also be "auto", and the quotes are removed when the file is read, so 0 and "0" mean the same. What changed your 8 back to 0 is something else: MultiReplace reads its INI file once at startup and, once its panel has been opened, writes all its settings back when Notepad++ closes. An edit made in the meantime is therefore overwritten on exit. So your 1 m 28 s run most likely still used LoadThreads=0. To test 8: change the line either in Notepad++ before opening MultiReplace, or with another editor while Notepad++ is closed. Then restart Notepad++, and the new value is used. Curiously, in my experience with other tools, four to six parallel threads were always the optimum.
    • 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
      8
      9
      1 Votes
      8 Posts
      384 Views
      mpheathM
      @guy038 The testing looks better. If the Change History -> Show in text option is checked then can see changes to a character for more detail. No need to retest and repost images to show the indicators. A change of the regex pattern to: Find: (?-s)^(?=.{79}).{1,78}\K\x20(?!\R) Replace: \r\n and then press the Replace All button. It does replace less as it does not capture and so only the \x20 space is matched. Unfortunately, it will read the line to length of 79 and then read the line again if line is 79 to continue the pattern so might be slower then your previous tested pattern. The (?=.{79}) is needed to ensure shorter lines are not matched for wrapping. The (?!\R) is probably optional to have in the pattern as it is limited to detecting trailing spaces. Since the pattern uses \K, then the Replace button is not expected to function properly to step through the replacements. The text comparison in my testing shows the regex patterns achieve equal results which seems to be fortunate. That test was done on license.txt.
    • V

      Apex Language is missing under Language Tab

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      2
      0 Votes
      2 Posts
      168 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…