• Read This First

    Pinned Locked
    1
    5 Votes
    1 Posts
    8k Views
    No one has replied
  • 2 Votes
    32 Posts
    47k Views
    ThosRTannerT
    Just a quick question - when will the plugintemplate repo be updated to include the new message? Thanks
  • Search++: A work in progress

    133
    6 Votes
    133 Posts
    45k Views
    CoisesC
    Search++ version 0.6.6 is available: Add tab icons to the docking search dialog and the results list. (When you have more than one dialog docked to the same edge in Notepad++, the icon shows on the tabs that are not active.) Fix an error (present since version 0.6) that caused the count of files containing a match in the status message when counting or searching in Files in View or in Open Documents to be one too large. Various internal updates to Find in Files to make it more robust against I/O errors, with better error reporting. Thank you to everyone willing to try this work in progress. Comments, critiques and suggestions are always welcome. Progress on the 0.6.x releases has been slow. Much of that was because I decided to introduce Search in Files in version 0.6 as a multi-threaded process, and I had no real experience writing multi-threaded code. After adding Find in Files, I spent a lot of time trying to improve performance. My eventual conclusion, after much trial and error, is that either it can’t be done, or I can’t figure out how to do it. Hopefully the next few weeks will produce some visible progress. To that end, I want to list some things that are on my mind at present. Please comment if you have any thoughts about these (which are important, which are unimportant or misguided, thoughts about how they should work, thoughts about things I’ve missed… and I am pretty sure I’m forgetting something): Obvious missing features Implement Replace in Files in the Search in Files dialog. Ability to save and recall search strings. There is already history on the right-click menus. I’m not sure if it should be longer, be longer but on a flyout menu, longer with the first n items on the menu and the rest on a flyout, have a configurable number of items…? Would the ability to “pin” history items be useful? (Simpler and faster than a save process.) For saving I’m thinking of controlling that through a dialog that would let you name what you save, so you would then recall it by name. Saving would save the Find and Replace strings and the associated settings. It would have to be possible to edit, rename or delete a saved search as well. Recalling would probably be by selecting from a flyout on the right-click menu. Thoughts? Is that too complicated? Should the regular dialog (for searching in documents) and the Search in Files dialog share a single set of saved searches? Features under consideration Context in search results: that is, showing one or more lines before or after the line(s) containing a match. This would be optional and configurable, but a tricky question is whether it is sufficient to configure it before the search or whether you should be able to request context — either for a specific match or for all matches — directly in the search results window, after the search. It seems like it would make sense for this to be available for Show actions, too. Warn or block when characters used in the find or replace fields are inconsistent with the character encoding of files to be searched. (Right now find proceeds without a warning, and replace uses the substitution character, usually a question mark.) Find is tricky, because I would have to parse the regular expression to attempt to determine whether the inconsistent characters are required for a match (so no match is possible) or whether they are only required by some alternatives (which might be intentional, if the same expression is used with files in different encodings). Is it worth doing at all? Would a warning (so I didn’t have to parse, since you could just say to search anyway) be more annoying than helpful? Replacing can also be conditional, so do I try to detect that, and if it’s conditional, only warn or block if it actually happens? If replacing in multiple files, it could vastly slow down the process if I have to examine each file first to determine its encoding before beginning the actual replace operation. Is it worth it? Or do I only raise the warning if and when I encounter a file that can’t do the replace as written? In the main search dialog, when the default action is active for a button (e.g., Find, Count, etc. without a scope qualification like “in Selection” or “in Marked Text”), somehow indicate what the default action would be if you pressed the button right now. That is, Find adapts to work in selection if you have a selection large enough, or in marked text, or in the whole document, but what will it actually do right now? This feels like a big missing thing to me, but I’m a bit stumped as to how to indicate it. If a put a general indicator somewhere (it will always be the same for all buttons with default scope), where, and how should it appear? I am very hesitant to take up additional space in the dialog, or to make it any more “busy” than it already is. If I show it on each button, how would I distinguish it from the marker that tells you the direct action for the button is a command with a specified scope? (Remember, this has to work for any dark mode color combination the user might pick, and some users are colorblind.) Would it be better to show it on the buttons and remove the ability to select an action with other than default scope as the action for a button by shift-clicking the drop-down menu? Does anyone even realize they can shift-click the drop-down menus (the only way to know is to do it by accident or read the help)? Figure out how to modify Boost.regex to get rid of the dreaded “complexity” message. Make progress responsive during a search (not just between finds, as it is now: Boost.regex as built has no progress callback, so you can only estimate progress after it succeeds or fails to find a match, not while it’s working) and let the user cancel if it’s taking too long. Figure out how to modify Boost.regex to support Unicode word boundaries, and extend that to plain text searches by translating them into regex searches. (Unicode word boundaries recognize that sequences like “can’t” are a single word; for example, if implemented, a whole word match for “can” wouldn’t match the first three letters of ”can’t”; at present, it does.) Implement “Unicode compatibility forms” matching. This means being able to search for something like “naive” and have it match “naïve” (or vice versa). I think I would only attempt to implement this, at least at first, for plain text searches (which would be translated to a regular expression the user would not see). Deficiencies and bugs Personally, I really like the Show function. It hides all lines and then shows the ones that have matches, also marking the matches. A bit like a Find All with the results list right in the document instead of in a tiny little window at the bottom. But there are problems. I use Scintilla’s hidden lines feature directly. Notepad++ also uses that feature, but it doesn’t provide a way for plugins to use it through Notepad++, and it keeps internal status information that assumes only it is using hidden lines. There appears to be no way to make Notepad++ synchronize its own idea of which lines it thinks are hidden with the actual state of Scintilla. Various bizarre things happen because of this. That leaves me with four choices, none of which are great: Remove the Show function entirely. Accept that if you use Show, unintended and illogical things can and will happen. Petition Don to provide a way for plugins to use hidden lines without confusing Notepad++, which might not be accepted, would probably take a long time even if it is accepted, and even when completed would mean this would only work correctly on versions of Notepad++ at least that new. Get “creative” and look for some back-door, hacky way to fix it (which might or might not be possible, and might break without warning when Notepad++ changes something). Keyboard navigation in the Search++ dialog (the main one that can be docked, not the Search in Files dialog) is clunky and not comprehensive. There’s no straightforward way to invoke something like “Select in Marked Text” without using the mouse. There’s a setting to focus the document after stepwise Find and Replace, but if you check that then there’s no way to do the next Find or Replace without switching back to the Search++ dialog first. The only way I can think of to manage that would be to add two more menu items, which you could assign to free keyboard shortcuts… as if anyone has any free yet memorable keyboard shortcuts. Doing repeated Find actions while being able to edit immediately in the document after a Find seems like a common task. It should be natural and fluid, but it isn’t. For Search in Files actions, there is presently no warning about files that are open in Notepad++; the files are processed on disk. This will be more critical when Replace in Files is implemented. My thought is to present a warning, with OK and Cancel options, noting that Search in Files only processes files on disk. Note that for Find in Files, the impact is that files that were open with changes would search based on the data on disk, not the live version of the document. Documents that are open in Notepad++ (with or without changes) and are also changed on disk by Replace in Files would show a “File changed” notification when activated in Notepad++. Because of the way Search in Files works, it would be complicated to treat files open in Notepad++ differently, but is that something that is really important… important enough to go ahead and make the code more complicated in order to do it, so that files open in Notepad++ are processed as open documents and not as files on disk? The date selection controls in the Search in Files dialog look awful in dark mode. Unfortunately, it turns out the Windows control I used is just about impossible to render in dark mode. (At least, I haven’t found a single example in open source of someone doing it successfully.) So I expect to replace it with something simpler, more like a text control with a drop-down history, where you just type the date. Would it be useful to be able to enter the time, and not just the date, to limit which files are examined? Would a single universal format (yyyy-mm-dd) be good, or is it an important user amenity to be able to enter dates in your locale format (e.g., mm-dd-yy in the US, dd-mm-yy in most other places)? Would you miss the drop-down calendar control? Would you miss having up/down arrows (spin control) for the elements of the date and thus needing to type the numbers to change the date? Does anybody even think the date filter is useful in the first place? Do I need a way to take a date from a specific file, rather than the user knowing what dates are wanted, to make it useful?
  • [New plugin] Smart Math

    5
    1 Votes
    5 Posts
    837 Views
    Vitalii DovganV
    The syntax file can be created by means of user-defined language. But how to apply this user-defined language automatically when Smart Math is enabled for the current file/document? OK, sorted it out: call NPPM_GETNBUSERLANG first to get the number of UDLs; then iterate through all the UDLs and call GetMenuStringW; once the menu item string matches my UDL name, I’ve identified my UDL menu id; after that, call NPPM_MENUCOMMAND with the obtained UDL menu id. Here is an example withUDL applied: [image: 1788696158249-d17e9134-3e1a-4b20-b7e9-62b16dbc4eff-image.jpeg] It’s a pity that I can’t make the keyword colors (such as function colors) to be dependent on the active color theme/style. I mean, for dark color themes these keywords in blue look too dark, so the color must be changed for dark themes.
  • Testing nppPluginList for new/updated plugin

    8
    0 Votes
    8 Posts
    400 Views
    rdipardoR
    @PeterJones said: If you’ve got steps that work for doing a local debug build, that would be helpful. > where cmake C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe > type .\build_gup.ps1 param ( [string]$Configuration = "Debug", [string]$Platform = "x64" ) if (-not $(Test-Path "${PSScriptRoot}\wingup\.git")) { git clone --single-branch https://github.com/notepad-plus-plus/wingup.git wingup } try { pushd "${PSScriptRoot}\wingup" $CmakeArchParam=$(if ("$Platform" -imatch "x86") {"Win32"} else {"$Platform"}) $LibPlatform=$(if ("$Platform" -imatch "Win32") {"x86"} else {"$Platform"}) cmake -S ".\curl" -B ".\curl\build\$LibPlatform" -A $CmakeArchParam ` -DBUILD_SHARED_LIBS=OFF ` -DCURL_STATIC_CRT=ON ` -DBUILD_CURL_EXE=OFF ` -DCURL_USE_SCHANNEL=ON ` -DCURL_USE_OPENSSL=OFF ` -DBUILD_TESTING=OFF ` -DUSE_LIBPSL=OFF ` -DCURL_USE_LIBPSL=OFF ` -DUSE_NGHTTP2=OFF ` -DUSE_LIBIDN2=OFF cmake --build ".\curl\build\$LibPlatform" --config $Configuration pushd vcproj msbuild GUP.sln /v:m /p:configuration=$Configuration /p:platform=$LibPlatform popd } catch { $_.InvocationInfo.PositionMessage; $_.Exception.Message } finally { popd } > powershell .\build_gup.ps1 Debug x86 # ...
  • [New Plugin] ZeroBasedColumn

    1
    0 Votes
    1 Posts
    91 Views
    No one has replied
  • [New Plugin] MultiReplace

    80
    3 Votes
    80 Posts
    85k Views
    Thomas KnoefelT
    @guy038 Hello @guy038, Thanks for this thorough test, and no, you didn’t do anything wrong. Your investigation uncovered two separate behaviors in the code: Binary Files: MultiReplace “Find in Files” currently skips binary files, while native N++ searches every file it lists. That accounts for most of the gap in your USB drive numbers. I’ll look at how to make this configurable and more transparent. UTF-16 Bug: There is indeed a bug in how “Find in Files” handles UTF-16 encodings compared to “Find in Docs” and “Replace in Files”. This most likely explains the missing files in your smaller Test folder too. Since the forum isn’t ideal for sharing files and tracking bug fixes, I have opened a GitHub issue for this here: https://github.com/daddel80/notepadpp-multireplace/issues/133 I would gladly take you up on your offer to share the E:\Test folder contents so I can verify the fix against them. Could you please attach that folder as a zip or provide a link in the GitHub issue? Thanks again for your time and for helping to polish the next release candidate!
  • nppftp and and windows 11

    11
    0 Votes
    11 Posts
    865 Views
    xomxX
    @Afik-Gilboa said: both of them have the “run as administrator” unchecked. so any ideas why it keeps opening in admin mode? apparently everything running as administrator here, not sure why but it’s everything… I recognize the symptoms - you probably have turned off the Windows UAC completely somehow and at the same time the account, you are logged in, has the administrator rights (then everything launched will have the admin rights as default). Check your Registry for EnableLUA REG_DWORD 0x00000000 in: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] (click on Windows Start, start typing “Reg” there, click on the Registry Editor (System) app offered and navigate there to the hive path above) If there is that 0x00000000 (OFF), change it do 0x00000001 (ON) and restart your PC.
  • 1 Votes
    3 Posts
    264 Views
    S
    @PeterJones, many thanks to Your reply. This workaround works perfectly. I searched for this workaround (because I expected that anyone wouls have the same needs) but wasn’t successful - searching for a solution to a problem can be a frustrating experience if you don’t use the right search term(s) — which, of course, you don’t know yet at that stage…
  • [New Plugin] EncTags — inline text encryption via ^^...^^ tags

    3
    1 Votes
    3 Posts
    284 Views
    rdipardoR
    @saintleningrad-prog said: Select text, or place the cursor inside a ^^…^^ tag, press Ctrl+Shift+E Just a head’s up: that’s the same default key combination that decodes HTML entities when HTML Tag is installed. Since plugin commands are mapped in alphabetical order, and the most recent mapping prevails, having both installed will silently block the EncTag’s plugin shortcut from functioning: [image: 1787355567929-enctags-v020-shortcut-conflict.png] One more thing: the text you are passing to the About message box (here) contains the literal Unicode character U+2013: EN DASH. Since the Unicode literal is inside a character string, the compiler interprets everything between "..." as if it were encoded in the operating system’s default, single-byte code page (usually Windows-1252 on English- or European-language PCs). When shown, the emdash becomes the string of nonsensical bytes \xe2\x80\x94: [image: 1787355726977-enctags-v020-mojibake.png] You just need to escape the Unicode literal, i.e., "Ctrl+Shift+E \u2013 ..."
  • Markdown UDL Help

    markdown udl
    9
    1 Votes
    9 Posts
    5k Views
    J
    @dcog989 Thanks for this - if you have any tweaks or updates you’ve made since this comment, let me know!
  • Search++ (\W)'(\w) regex replace failure

    49
    0 Votes
    49 Posts
    4k Views
    M Andre Z EckenrodeM
    @Coises said: I expect that Version 0.6.5 will fix this. Noted, thanks again, and I’ll let him know — although he actually doesn’t typically use regex for his own purposes.
  • [BETA] Upcoming Plugin: HiddenLexers

    15
    1
    2 Votes
    15 Posts
    1k Views
    PeterJonesP
    Since it’s essentially working at this point, I’ve renamed the Topic to “BETA” @mpheath , I have updated the README at https://github.com/pryrt/NppPlugin-HiddenLexers to enumerate available options I think I’ll be patient, and give the beta test a while longer, so won’t try to rush to release it before N++ v8.9.8’s PluginsAdmin list is finalized.
  • Awesome Notepad++ Configs, settings and syntax highlighting

    9
    3
    1 Votes
    9 Posts
    3k Views
    rafaelloR
    1.2.2 Syntax highlighting PowerShell Improved absolute, relative, quoted and unquoted paths colors [image: 1785402977913-paths.png] Improved variables interpolation colors [image: 1785402952228-interpolation.png] [image: 1785402954396-interpolation4.png] Added colors for expressions $(..), ${..} Added registry hives colors (HKLM, HKEY_LOCAL_MACHINE, …) Fixed syntax highlighting Fixed variables colors inside paths and quotes Fixed excessive colors of variables, keywords, and functions enclosed in quotes Fixed unexpected sc.. and vk.. colors in AutoHotkey code Disabled colors for variables inside single quotes ' ' (because single quotes prevents var. interpolation)
  • Search++ Config save prompt when exiting after multi-instance

    4
    0 Votes
    4 Posts
    429 Views
    M Andre Z EckenrodeM
    @Coises You’re welcome, and thank YOU for promptly creating the new version, and for your plugins in general to begin with! The new one lets me exit without incurring any dialog.
  • User defined language - operator § not working

    4
    1
    0 Votes
    4 Posts
    394 Views
    PeterJonesP
    @arnaud-derette said: I does not work in the operator 2 list either (or may be i need to do something more than just put § there ?) Like I said, because you want the § to not have spaces, like in parent§.D, it won’t work for you. § in operators 2 will only work if you can have spaces around the §
  • 1 Votes
    3 Posts
    2k Views
    R
    @rdipardo thank you for pointing that out. I will check and do the needful.
  • Modern text file icon

    1
    1
    0 Votes
    1 Posts
    876 Views
    No one has replied
  • Translate plugin

    22
    0 Votes
    22 Posts
    47k Views
    J
    Thank you again for your help.
  • Parser/Lexer Plugin for FIX protocol logs

    2
    0 Votes
    2 Posts
    2k Views
    PeterJonesP
    @chtaylo3 , You only need to post in the “Support for Plugins Admin & NppPluginList” topic if there’s a feature or bug with the Plugins Admin and the list DLL itself. If there are issues with your PR to add it to NppPluginList, those will be discussed in the PR itself – and it looks like yours has been accepted already. If you want to just announce your new plugin, you can just create a new Topic in the Plugin Category to tell us about it. Hence, I am moving your post to its own Topic. And congrats on creating a lexer plugin!