From 961100e95d88aab9ec69b2422070486642bbe84c Mon Sep 17 00:00:00 2001 From: Thomas Knoefel <53190206+daddel80@users.noreply.github.com> Date: Sat, 31 Aug 2024 17:14:34 +0200 Subject: [PATCH 1/4] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 992f1f8..40ea360 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Latest Stable Version](https://img.shields.io/badge/version-3.1.1.17-blue)](https://github.com/daddel80/notepadpp-multireplace/releases/tag/3.1.1.17) [![Total Downloads](https://img.shields.io/github/downloads/daddel80/notepadpp-multireplace/total?logo=github)](https://github.com/daddel80/notepadpp-multireplace/releases) -MultiReplace is a Notepad++ plugin that allows users to create, store, and manage search and replace strings within a list, proving useful across various sessions or projects. This enhancement increases efficiency when multiple replacements need to be made concurrently, thereby bolstering the overall functionality of Notepad++. +MultiReplace is a Notepad++ plugin that allows users to create, store, and manage search and replace strings within a list, perfect for use across different sessions or projects. It increases efficiency by enabling multiple replacements at once, supports sorting and applying operations to specific columns in CSV files, and offers flexible options for replacing text in various ways. ![MultiReplace Screenshot](./MultiReplace.gif) @@ -36,7 +36,7 @@ MultiReplace is a Notepad++ plugin that allows users to create, store, and manag - **Multiple Replacements**: Execute multiple replacements in a single operation, in one document or across all opened documents. - **Entry Toggling**: Toggle list entries for replacement, highlighting, or searching. - **String Storage**: Store and load your search and replace strings in a list, facilitating reuse across different sessions or projects. -- **CSV Scope Functionality**: Target specific columns in a delimited file for search or replacement operations, offering precision in managing CSV data. +- **CSV Scope Functionality**: Apply search, replace, or sort operations to specific columns in a CSV or other delimited file by selecting column numbers. - **Scripted Text Replacements**: Export to bash script for scripted text replacements. - **Highlighting**: Highlight multiple find words in unique colors for better visual distinction. - **Variable Usage**: Employ variables for conditional and computational operations within the replacement string. From c62cec360c4c5726feeed53143efbab638a5a14c Mon Sep 17 00:00:00 2001 From: Thomas Knoefel <53190206+daddel80@users.noreply.github.com> Date: Sat, 31 Aug 2024 17:55:26 +0200 Subject: [PATCH 2/4] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 40ea360..3ea82e4 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ Scope functions define the range for searching and replacing strings: | Remove Leading Zeros (Non-decimal) | `\b0+(\d*)` | `$1` | Yes | No | ## Option 'Use Variables' -Activate the '**Use Variables**' checkbox to employ variables associated with specified strings, allowing for conditional and computational operations within the replacement string. This Dynamic Substitution is compatible with all search settings of Search Mode, Scope, and the other options. +Activate the '**Use Variables**' checkbox to employ variables associated with specified strings, allowing for conditional and computational operations within the replacement string. This Dynamic Substitution is compatible with all search settings of Search Mode, Scope, and the other options. The functionality relies on the [Lua engine](https://www.lua.org/). **Note**: Utilize either the `set()` or `cond()` command in 'Replace with:' to channel the output as the replacement string. Only one of these commands should be used at a time. @@ -118,7 +118,7 @@ Directly outputs strings or numbers, replacing the matched text in the Replace S | `set(LINE+5)` | "10" | #### **cond(condition, trueVal, \[falseVal\])** -Implements if-then-else logic, or if-then if falseVal is omitted. Evaluates the condition and pushes the corresponding value (trueVal or falseVal) to the Replace String. +Implements if-then-else logic, or if-then if falseVal is omitted. Evates the condition and pushes the corresponding value (trueVal or falseVal) to the Replace String. | Example | Result (assuming LINE = 5) | |--------------------------------------------------------------|---------------------------------------| @@ -193,7 +193,7 @@ The `DEBUG` option lets you inspect global variables during replacements. When e | `^(.*)$` | `init({MATCH_PREV=1}); cond(MATCH == MATCH_PREV, ''); MATCH_PREV=MATCH;` | Removes duplicate lines, keeping the first occurrence of each line. Matches an entire line and uses `MATCH_PREV` to identify and remove consecutive duplicates. | Yes | No | #### Engine Overview -MultiReplace uses the [Lua engine](https://www.lua.org/), allowing for Lua math operations and string methods. Refer to [Lua String Manipulation](https://www.lua.org/manual/5.1/manual.html#5.4) and [Lua Mathematical Functions](https://www.lua.org/manual/5.1/manual.html#5.6) for more information. +MultiReplace uses the [Lua engine](https://www.lua.org/), allowing for Lua math operations and string methods. Refer to [Lua String Manipulation](https://www.lua.org/manual/5.4/manual.html#6.4) and [Lua Mathematical Functions](https://www.lua.org/manual/5.4/manual.html#6.6) for more information. ### User Interaction and List Management Manage search and replace strings within the list using the context menu, which provides comprehensive functionalities accessible by right-clicking on an entry, using direct keyboard shortcuts, or mouse interactions. Here are the detailed actions available: From 413598ec38ae555ef75a6bec1cae78ec46af35af Mon Sep 17 00:00:00 2001 From: Thomas Knoefel <53190206+daddel80@users.noreply.github.com> Date: Sat, 31 Aug 2024 18:34:41 +0200 Subject: [PATCH 3/4] Update README.md --- README.md | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 3ea82e4..7d0f762 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MultiReplace for Notepad++ [![License: GPL-2.0](https://img.shields.io/badge/license-GPL--2.0-brightgreen)](https://github.com/daddel80/notepadpp-multireplace/blob/main/license.txt) -[![Latest Stable Version](https://img.shields.io/badge/version-3.1.1.17-blue)](https://github.com/daddel80/notepadpp-multireplace/releases/tag/3.1.1.17) +[![Latest Stable Version](https://img.shields.io/badge/version-3.1.2.18-blue)](https://github.com/daddel80/notepadpp-multireplace/releases/tag/3.1.2.18) [![Total Downloads](https://img.shields.io/github/downloads/daddel80/notepadpp-multireplace/total?logo=github)](https://github.com/daddel80/notepadpp-multireplace/releases) MultiReplace is a Notepad++ plugin that allows users to create, store, and manage search and replace strings within a list, perfect for use across different sessions or projects. It increases efficiency by enabling multiple replacements at once, supports sorting and applying operations to specific columns in CSV files, and offers flexible options for replacing text in various ways. @@ -33,25 +33,23 @@ MultiReplace is a Notepad++ plugin that allows users to create, store, and manag ## Key Features -- **Multiple Replacements**: Execute multiple replacements in a single operation, in one document or across all opened documents. -- **Entry Toggling**: Toggle list entries for replacement, highlighting, or searching. -- **String Storage**: Store and load your search and replace strings in a list, facilitating reuse across different sessions or projects. -- **CSV Scope Functionality**: Apply search, replace, or sort operations to specific columns in a CSV or other delimited file by selecting column numbers. -- **Scripted Text Replacements**: Export to bash script for scripted text replacements. -- **Highlighting**: Highlight multiple find words in unique colors for better visual distinction. -- **Variable Usage**: Employ variables for conditional and computational operations within the replacement string. +- **Multiple Replacements:** Execute multiple replacements in a single operation, in one document or across all opened documents. +- **Entry Toggling:** Toggle list entries for replacement, highlighting, or searching. +- **String Storage:** Store and load your search and replace strings in a list, facilitating reuse across different sessions or projects. +- **CSV Scope Functionality:** Apply search, replace, or sort operations to specific columns in a CSV or other delimited file by selecting column numbers. +- **Scripted Text Replacements:** Export to bash script for scripted text replacements. +- **Highlighting:** Highlight multiple find words in unique colors for better visual distinction. +- **Variable Usage:** Employ variables for conditional and computational operations within the replacement string. ## Match and Replace Options -This chapter provides an overview of the various match and replace options available in MultiReplace, enhancing the flexibility and precision of your search and replace operations. - **Match Whole Word Only:** When this option is enabled, the search term is matched only if it appears as a whole word. This is particularly useful for avoiding partial matches within larger words, ensuring more precise and targeted search results. **Match Case:** Selecting this option makes the search case-sensitive, meaning 'Hello' and 'hello' will be treated as distinct terms. It's useful for scenarios where the case of the letters is crucial to the search. **Use Variables:** This feature allows the use of variables within the replacement string for dynamic and conditional replacements. For more detailed information, refer to the [Option 'Use Variables' chapter](#option-use-variables). -**Replace First Match Only:** The "Replace First Match Only" option is ideal for Replace-All operations, where it replaces only the first occurrence of a match in each list entry. This is particularly useful for different replace strings with the same find pattern. It's designed for modifying only the initial match in a document or scope, while keeping other instances intact. The same effect can be achieved with the 'Use Variables' option using `cond(CNT == 1, 'Replace String')` for conditional replacements. +**Replace First Match Only:** For Replace-All operations, this option replaces only the first occurrence of a match for each entry in a Search and Replace list, instead of all matches in the text. This is useful when using different replace strings with the same find pattern. The same effect can be achieved with the 'Use Variables' option using `cond(CNT == 1, 'Replace String')` for conditional replacements. **Wrap Around:** When this option is active, the search will continue from the beginning of the document after reaching the end, ensuring that no potential matches are missed in the document. @@ -85,9 +83,9 @@ Scope functions define the range for searching and replacing strings: | Remove Leading Zeros (Non-decimal) | `\b0+(\d*)` | `$1` | Yes | No | ## Option 'Use Variables' -Activate the '**Use Variables**' checkbox to employ variables associated with specified strings, allowing for conditional and computational operations within the replacement string. This Dynamic Substitution is compatible with all search settings of Search Mode, Scope, and the other options. The functionality relies on the [Lua engine](https://www.lua.org/). +Activate the '**Use Variables**' checkbox to employ variables associated with specified strings, allowing for conditional and computational operations within the replacement string. This Dynamic Substitution is compatible with all search settings of Search Mode, Scope, and the other options. This functionality relies on the [Lua engine](https://www.lua.org/). -**Note**: Utilize either the `set()` or `cond()` command in 'Replace with:' to channel the output as the replacement string. Only one of these commands should be used at a time. +**Note**: Utilize either the [`set()`](#command-overview) or [`cond()`](#command-overview) command in 'Replace with:' to channel the output as the replacement string. Only one of these commands should be used at a time. ### Variables Overview | Variable | Description | From 0addb05eacc2d0ad44c539f2fa8dc52c184d104c Mon Sep 17 00:00:00 2001 From: Thomas Knoefel <53190206+daddel80@users.noreply.github.com> Date: Sat, 31 Aug 2024 18:37:20 +0200 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7d0f762..440fa7a 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ Scope functions define the range for searching and replacing strings: ## Option 'Use Variables' Activate the '**Use Variables**' checkbox to employ variables associated with specified strings, allowing for conditional and computational operations within the replacement string. This Dynamic Substitution is compatible with all search settings of Search Mode, Scope, and the other options. This functionality relies on the [Lua engine](https://www.lua.org/). -**Note**: Utilize either the [`set()`](#command-overview) or [`cond()`](#command-overview) command in 'Replace with:' to channel the output as the replacement string. Only one of these commands should be used at a time. +**Note**: Utilize either the [`set()`](#setstrorcalc) or [`cond()`](#condcondition-trueval-falseval) command in 'Replace with:' to channel the output as the replacement string. Only one of these commands should be used at a time. ### Variables Overview | Variable | Description |