Community
    • Login

    [New Plugin] MultiReplace

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    74 Posts 12 Posters 32.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Thomas KnoefelT
      Thomas Knoefel @Thomas Knoefel
      last edited by

      I want to announce the new MultiReplace release 2.3.0.10, bringing new CSV features in Notepad 8.6.3.

      Here’s what’s new:

      • Sorting Lines in CSV by Columns: Ascend or descend, combining columns in any prioritized order.
      • Deleting Multiple Columns: Simultaneously remove various columns, cleaning up any obsolete delimiters.
      • Clipboard Column Copying: Instantly copy columns, complete with original delimiters, into the clipboard.

      MultiSelect_CSVOptions_final.gif

      Header Line Sorting Control:

      The header line is excluded from sorting by default, as shown in the demo. To alter the number of excluded lines, change HeaderLines=1 to your desired count in [userdir]\AppData\Roaming\Notepad++\plugins\config\MultiReplace.ini.

      Regex Assistance for Numeric Sorting:

      To prepare numbers for lexicographical sorting and later remove the added leading zeros, you may use the following regex patterns:

      Purpose Find Pattern Replace With
      Align Numbers with Leading Zeros (Decimal) \b(\d*)\.(\d{2}) set(string.rep("0",9-string.len(string.format("%.2f", CAP1)))..string.format("%.2f", CAP1))
      Align Numbers with Leading Zeros (Non-decimal) \b(\d+) set(string.rep("0",9-string.len(CAP1))..CAP1)
      Remove Leading Zeros (Decimal) \b0+(\d*\.\d+) $1
      Remove Leading Zeros (Non-decimal) \b0+(\d*) $1

      Required Settings:

      • For “Align Numbers with Leading Zeros” operations:
        • Enable ‘Regex’
        • Enable ‘Use Variables’
      • For “Remove Leading Zeros” operations:
        • Enable ‘Regex’
      Thomas KnoefelT 1 Reply Last reply Reply Quote 0
      • Thomas KnoefelT
        Thomas Knoefel @Thomas Knoefel
        last edited by

        These are the latest updates for MultiReplace! Here’s a quick rundown of the recent version releases and their new features and fixes.

        MultiReplace 3.0.2.14 (Latest)

        Implemented updates:

        • Updated the edit field in the list to automatically remove line breaks when pasting, enabling support for complex “Use Variables” statements.
        • Added correct escaping of special characters in “Use Variables” when used with regex.
        • Optimized nil checks in conditional statement.
        • Escaped special characters in languages.ini

        MultiReplace 3.0.1.13

        Fixed issue where:

        • Quotes were removed when pasting.
        • Entries were not inserted at the correct position in the list.
        • Special characters were removed from CAPs.

        MultiReplace 3.0.0.12

        • Enhanced Statistics Columns: Added additional columns to display statistics for found and replaced values, providing more detailed insights.
        • Improved Sorting Functionality: Enhanced the ability to revert to the original sorting order of the CSV file, even after rows are modified, deleted, or added.
        • New Context Menu: Introduced a new context menu for the list, offering a comprehensive overview of all available functions.
        • Direct List Editing Features: Users can now perform copy, paste, and edit operations directly within the list.
        • Dark Mode Support for Help Page: The help page for the ‘Use Variables’ option now supports Dark Mode.
        Thomas KnoefelT 1 Reply Last reply Reply Quote 1
        • Thomas KnoefelT
          Thomas Knoefel @Thomas Knoefel
          last edited by

          @Thomas-Knoefel

          Version 4.0.0.19 has been released and will be included in the next Notepad++ update. Below are the key changes and improvements:

          Implemented updates:

          • DPI Font Support: Includes automatic DPI scaling for adjusted UI elements. A custom scaling factor ranging from 0.5 to 2.0 can also be set via the ScaleFactor variable in file C:\Users\<Username>\AppData\Roaming\plugins\config\MultiReplace.ini.
          • ‘Use Variables’ Feature: Now allows initial setting of variables before processing the complete list by adding a list entry with an empty Find string next to the initial Replace statement.
          • Collapsible List Window: The list window can now be expanded or collapsed for better handling and space management.
          • Find and Single Replace: Now support selection scope, including rectangular and multi-selection.
          • File Handling:
            • New ‘Save’ and ‘New File’ buttons for managing list files.
            • List files can now be loaded via drag and drop functionality.
          • Minor Fixes: Various UI adjustments and bug fixes.

          Here’s a visual take on the changes:
          dce29eab-a9cb-4fe3-ad3c-aa5d5c183c39-image.png

          Enjoy!

          Thomas KnoefelT 1 Reply Last reply Reply Quote 2
          • Thomas KnoefelT
            Thomas Knoefel @Thomas Knoefel
            last edited by Thomas Knoefel

            Version 4.1.1.21 has been released and will be included in the next Notepad++ update. Below are the key changes and improvements:

            • Header Column Menu: Right-click on the header to toggle columns like Find count, Replace count, Comments, and Delete.

            • Comments Column: Add custom comments to entries via the new optional Comments column. Existing list files remain fully compatible.

            • Column Locking: Lock the width of columns (Find, Replace, Comments) with a double-click on the header divider. A lock icon shows the status.

            • New Variables: Two new variables have been added for “Use Variables” option:
              • FNAME: Represents the filename or window title for new, unsaved files.
              • FPATH: Represents the full path including the filename, or is empty for new, unsaved files.
            • Multilanguage Support: The plugin now supports Danish.
            • Configuration Options: Manage settings via the INI file located at
              C:\Users\<Username>\AppData\Roaming\Notepad++\plugins\Config\MultiReplace.ini:
              • DoubleClickEdits: To disable direct editing on double-click, set DoubleClickEdits=0 (default: enabled).
              • Tooltips: To disable tooltips, set Tooltips=0 (default: enabled).
              • AlertNotFound: To disable notifications for unsuccessful searches, set AlertNotFound=0 (default: enabled).

            Here is a visual take on the changes:
            fe07924a-0201-4e47-b3c8-46b815cd081b-image.png

            Thomas KnoefelT 1 Reply Last reply Reply Quote 3
            • Thomas KnoefelT
              Thomas Knoefel @Thomas Knoefel
              last edited by

              Version 4.3.0.26 has been relased and will be included in the next Notepad++ update. This update is mostly about performance improvements.

              Implemented updates:

              • Replace matches: Allows targeted replacements using match indexes like 1, 1,3 or 2-5.

              • List Statistics: Displays counts for active, total, current, and selected entries below the list.
                (Disabled by default – enable via ListStatistics=1 in the INI file.)

              • Use Variables Performance: Significantly faster execution of replacements using the “Use Variables” option.

              • Docs and Language: Minor documentation and wording refinements.

              Thomas KnoefelT 1 Reply Last reply Reply Quote 3
              • wonkawillyW
                wonkawilly
                last edited by

                IMHO the features of this plugin should be implemented directly into N++, maybe adding a further tab page to the current Search and Replace dialog to include the features of this plugin and its future evolution.

                1 Reply Last reply Reply Quote 0
                • Thomas KnoefelT
                  Thomas Knoefel @Thomas Knoefel
                  last edited by

                  MultiReplace now also supports Replace in Files. This is another step toward a powerful feature when combined with the list entries. This feature supports all variables used in Use Variables, like FNAME and FPATH, as well as the CSV Scope option, so it is fully integrated.

                  This is a Release Candidate available for testing – if it works for you, feel free to leave a like. If you run into any issues, please report them here.

                  Download link

                  • Download the ZIP file matching your system.
                  • Copy its contents into C:\Program Files\Notepad++\plugins\MultiReplace.
                  • Done!

                  e8fa1053-4311-4396-a11e-965d6c071700-image.png

                  Happy replacing!

                  1 Reply Last reply Reply Quote 2
                  • Mit JeanM
                    Mit Jean
                    last edited by

                    A CTRL-Click on a tab would select it as part of a new scope for multi-documemt replacement.

                    A new feature very useful when you want to apply search/replace to a list of open documents but not all open documents

                    Alan KilbornA Thomas KnoefelT 2 Replies Last reply Reply Quote 0
                    • Alan KilbornA
                      Alan Kilborn @Mit Jean
                      last edited by

                      @Mit-Jean said in [New Plugin] MultiReplace:

                      A CTRL-Click on a tab would select it

                      This is not something the MultiReplace plugin has the power to do, as the idea messes with core Notepad++ functionality.
                      However, nothing is stopping the plugin author from creating some other mechanism within the plugin to do what you want.

                      1 Reply Last reply Reply Quote 0
                      • Thomas KnoefelT
                        Thomas Knoefel @Mit Jean
                        last edited by

                        @Mit-Jean
                        A better solution would be to mark documents by pinning them. Unfortunately, Notepad++ does not provide an official API to detect whether a tab is pinned.

                        Mark OlsonM 1 Reply Last reply Reply Quote 1
                        • Mark OlsonM
                          Mark Olson @Thomas Knoefel
                          last edited by

                          @Thomas-Knoefel
                          Your idea of a plugin interface to determine if a tab is pinned seems very reasonable, so I created this GitHub issue to ask for such a feature.

                          1 Reply Last reply Reply Quote 1
                          • First post
                            Last post
                          The Community of users of the Notepad++ text editor.
                          Powered by NodeBB | Contributors