• Search++: A work in progress

    Notepad++ & Plugin Development
    216
    7 Votes
    216 Posts
    88k Views
    CoisesC
    Search++ version 0.8 is available: Fix failure to handle hidden lines markers correctly when executing Show commands with Always hide all lines… not checked and when executing the Show only lines with shown text command on the Tools menu. Track and restore first line and last line hidden states across tab changes. Add Spy (temporarily show hidden lines) toggle to the Tools menu. When spy mode is on all lines are visible even though the markers for hidden lines and collapsed folding groups remain; hidden lines can be restored by toggling spy mode off again. Replace the Reset button in the Expand visible configuration dialog with a Tools button. Make Tools menu keyboard shortcuts work in that dialog. General reassignment of shortcut keys for greater consistency. Quite a few things have changed, so it is important to check the help, the community thread and/or the Tools menu and the Find and Replace box context menus for the new assignments if you use keyboard shortcuts in Search++. I regret the disruption; hopefully this will be a one-time change, and keyboard shortcuts will stay the same after this. There are two big changes in this release: the addition of “Spy mode” and some fairly extensive changes to the keyboard shortcuts to yield greater consistency between mnemonics (underlined letters) and shortcuts, some additional capabilities, and hopefully a generally more logical set of assignments. Those changes are detailed below. There is now a Tools button on the Expand visible configuration dialog instead of the previous Reset button, and Tools command keyboard shortcuts work when focus is in the Expand visible dialog. My rationale for this is that Reset wasn’t very clear, it just did a command from the Tools menu anyway (Show only lines with shown text), and especially with the new Spy toggle available, I’m not at all convinced there’s a reason to give any one command special accessibility. There is a small change in the way the keyboard shortcuts for Show selected/all text (now Ctrl+O / Ctrl+Shift+O) work. Previously, the unshifted version, like the menu item, would show all lines if all selected text, or the caret if no text was selected, was visible. The menu item still changes to Show all lines, not requiring a shift or a right-click, if none of the selection is hidden, but Ctrl+O will do nothing if none of the selection is hidden, so that Ctrl+Shift+O is required to show all lines. My rationale is that especially when spy mode is active, it might be easy to accidentally show all lines when that is not intended if Ctrl+O does both. When using the menu, you have the item text to clue you in. As always, comments, critiques, suggestions, problem reports and experiences are most welcome, and thank you for giving this work-in-progress a try. Spy mode lets you temporarily view all lines in the active document while keeping the markers that define what should be hidden intact. The idea is from this feature request and the subsequent discussion. I expect this to be most useful after a Show command. If the caret or selection is visible on the screen when you toggle Spy to checked, that part of the text will remain in (approximately) the same place on the screen while all lines become visible. That lets you see additional context for the match. You can use Show selected lines from the Tools menu to change the markers so the selected lines are not marked as hidden; then when you toggle Spy to unchecked, those lines will remain visible. The Spy setting is per tab and is preserved when you change tabs and change back again. (As of this release, hidden first and last lines are also preserved.) While you cannot have different hidden line markers or fold markers for the same document in different views (that’s a Notepad++/Scintilla limitation), you can have Spy checked in one view and unchecked in the other. It is possible to use the Notepad++ Hide Lines command or the icon for collapsing a fold block while Spy is checked. In this circumstance some lines will be hidden, but there may be other lines that are marked as hidden or are part of a collapsed fold block that are not hidden. The Spy entry on the Tools menu will then show a bullet instead of a check mark to indicate an indeterminant state. Clicking once will return to full Spy checked state (all lines visible), and clicking a second time will return to normal display. An indeterminant state is not preserved when changing tabs: upon switching back to the tab it will have Spy checked and all lines visible. Spy is new feature. Expect there to be some glitches. If you have the time and patience, reports of your experience will be much appreciated. There were a few interconnected rationales for the keyboard shortcut changes, all centered around trying to make things as convenient and coherent as I can for users who prefer to use the keyboard whenever possible. I am sorry for the disruption to those who are already used to some of these shortcuts; hopefully I have it “right” this time, and I won’t have to make such extensive changes again. I’ll try to list the main changes. They’re all in the help and on the menus, but I can’t guarantee I’ve caught every last one of them here. General navigation — these work in the main Search++ dialog, the Search in Files dialog, the Search++ results window and the Expand visible configuration dialog: Ctrl+F toggles keyboard focus between the Search in Files dialog and the main Search++ dialog. If the target dialog isn’t visible, it is opened. Ctrl+Shift+F closes the Search in Files dialog. Ctrl+R toggles keyboard focus between the Search++ results window and the main Search++ dialog. If the target dialog or window isn’t visible, it is opened. Ctrl+Shift+R closes the Search++ results window. Ctrl+N puts keyboard focus in the active Notepad++ document. Ctrl+Shift+N closes the main Search++ dialog. Ctrl+Shift+Q closes all Search++ dialogs and windows and puts keyboard focus in the active Notepad++ document. Note that all these except Ctrl+N have changed. Also, Ctrl+O and Ctrl+Shift+O, which used to be general navigation commands, are now the Tools commands Show selected lines and Show all lines. Main Search++ dialog navigation: Alt+O (the letter “o”) toggles between the Find box and the Replace box. Alt+1 through Alt+5 (only on the main keyboard, not the numeric keypad) open the drop-down menus on the five search command buttons. These were previously difficult to access by keyboard alone. The third (“Find All”) command button uses the mnemonic (underlined letter) A, S, K or H when the one-click command action is Find All, Select, Mark or Show. (Recall that you can set any command on the drop-down menu as the one-click command for a button by right clicking or Shift+clicking the command.) The Alt key plus that letter performs the one-click command (as it always did), while the Alt key plus one of the remaining letters performs the default command for the associated action. Search in Files dialog navigation: Alt+O (the letter “o”) toggles between the Find box and the Replace box. Alt+T puts keyboard focus in the table of files at the bottom of the dialog. Find and Replace box context menus (in the main Search++ dialog and the Search in Files dialog): Ctrl+G is Exchange Find/Replace (formerly Ctrl+E). This swaps the Find and Replace fields in the dialog in which you are working. Ctrl+Shift+H is Insert Find (formerly Ctrl+F and called Copy Find). This inserts the contents of the Find box in the main Search dialog at the location of the caret or in place of the selection. If you are working in the Find box in the main Search dialog, it replaces the contents of the Replace box with the contents of the Find box. Ctrl+Shift+J is Insert Replace (formerly Ctrl+R and called Copy Replace). This inserts the contents of the Replace box in the main Search dialog at the location of the caret or in place of the selection. If you are working in the Replace box in the main Search dialog, it replaces the contents of the Find box with the contents of the Replace box. Tools menu commands: Show selected/all lines is now Ctrl+(Shift+)O. Expand visible is now Ctrl+E, and configure is Ctrl+Shift+E. Hide all lines is now Ctrl+H. Remove marks from selected text is now Ctrl+Shift+V. Select marked text is now Ctrl+Shift+S. Copy marked text is now Ctrl+P with Ctrl+Shift+P for the configuration dialog. Clear marks [and bookmarks] from active document (formerly Remove marks…) is now Ctrl+Shift+C. Clear marks from multiple documents… (formerly Remove marks…) is now Ctrl+Shift+D. Settings… is now Ctrl+Shift+G. The mnemonic (underlined letter) for every item on the Tools menu which has a keyboard shortcut is now the same as the letter used in the keyboard shortcut. Keyboard shortcuts for Tools commands work when keyboard focus is in the main Search++ dialog or in the Expand visible configuration dialog. In the Expand visible configuration dialog, Ctrl+Shift+E opens or switches focus to the main Search++ dialog.
  • 0 Votes
    1 Posts
    34 Views
    No one has replied
  • 0 Votes
    1 Posts
    31 Views
    No one has replied
  • Notepad++ v8.9.9 Release Candidate

    Pinned Announcements
    24
    5 Votes
    24 Posts
    1k Views
    donhoD
    FYI, RC2 is available: https://github.com/donho/notepad-plus-plus/releases/tag/RC2
  • Ahem - I want to rant

    Boycott Notepad++
    2
    -2 Votes
    2 Posts
    57 Views
    PeterJonesP
    Rants like this are only allowed in the Boycott Notepad++ category, so I moved it from a reply in the General Discussion to its own topic here Do not reply to normal discussions with such rants.
  • 0 Votes
    3 Posts
    123 Views
    fml2F
    @PeterJones Thank you! I forgot about the keyboard! :-) Out of interest: is it possible to configure Notepad++ in a way that the folder marks are also displayed at the last element of the structure? I once used a program (don’t remember now what it was) where it was possible.
  • Mark lines with blue balls and jump between them

    General Discussion
    16
    0 Votes
    16 Posts
    14k Views
    T
    hello, try to navigate: Search -> Bookmark -> Next bookmark <F2> tomas
  • 1 Votes
    19 Posts
    1k Views
    CoisesC
    @guy038 said: Now if, for any font, you select all the text of that new tab and run an Edit > Line Operations > Split Lines operation, for most of them, indeed, the spliting behaviour occured right after the 78 capital letter P. However, for eample : For the proportional Times New Roman font, the spliting action occured after 76 letters P For the fixed witdh **``Consolas font, the spliting action occured after 77 letters P The explanation may lie in something I discovered while bug-hunting in the Elastic tabstops function of Columns++: when DirectWrite is in use, the width of characters can work out to fractional pixels (this is true for both fixed and proportional fonts); but Scintilla only reports the width of strings as integers. So due to the effect of rounding to integers, the width of a string of 78 letters P is not necessarily 78 times the (reported) width of one letter P. Notepad++ uses 78 times the width of one letter P. (Not that it matters much, since none of this is likely to be what anyone wants or expects anyway.)
  • 0 Votes
    1 Posts
    104 Views
    No one has replied
  • 0 Votes
    2 Posts
    109 Views
    PeterJonesP
    @ThatsYar_ , Can you share your ?-menu’s Debug Info? Does the same problem occur if you turn off all plugins (using -noPlugin command line option)? Is it for all files that need admin? Or just in one directory? Or just the one file?
  • 0 Votes
    10 Posts
    573 Views
    David Brigden52D
    Tabs v spaces As Peter said, the most important part is consistency. Mixing tabs and spaces together makes no one happy. I will throw out a couple arguments for tabs here: Indentation of code, markup language, et. cetera is meant to show the structure of whatever. Tabs are a logical, structural element. Spaces are physical. Different users may want different sizes of indentation. If i want 4 character indentation and my coworker wants 2, tabs can be set to show our preferred width. Seems for the most part that spaces are winning out though.
  • [New Plugin] MultiReplace

    Notepad++ & Plugin Development
    87
    3 Votes
    87 Posts
    93k 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
  • 0 Votes
    2 Posts
    129 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)
  • Surprising regular expression !

    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.
  • 0 Votes
    2 Posts
    263 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…
  • 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
  • PHP Lang: Word vs Keyword

    General Discussion
    3
    0 Votes
    3 Posts
    259 Views
    Laurie StearnL
    @PeterJones Good info on StyleID, thanks.
  • rename files

    General Discussion
    4
    0 Votes
    4 Posts
    531 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.
  • 2 Votes
    5 Posts
    525 Views
    fml2F
    For the reference: I’ve created https://github.com/notepad-plus-plus/notepad-plus-plus/issues/18554.
  • Notepad++ release 8.9.8.1

    Pinned 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)