You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The shortcuts.xml file recognizes variables like $(NPP_DIRECTORY) and $(CURRENT_WORD) in the <UserDefinedCommands> section, but does not in the <Macros> section. That prevents creating a macro such as:
The above macro will search for the literal "$(CURRENT_WORD)" in the current doc, rather than interpolating the variable $(CURRENT_WORD) to the currently highlighted text.
Of course, the user may want to literally search for "$(CURRENT_WORD)"; maybe and escape slash \ can be used such as: \$(CURRENT_WORD) to not interpolate the variable?
I searched for this in issues and on the Community, but didn't find a hit.
Steps to Reproduce the Issue
Close all Notepad++
Create the above Macro by editing the shortcuts.xml file
Open Notepad++
Enter some repeated text:
hello
world
hello
all
hello
Highlight the first "hello"
From the menu: Macro => Find All CURR_WORD in Current Doc
Expected Behavior
Find results window shows:
Search "hello" (3 hits in 1 files of 1 searched)
new 1 (3 hits)
1: hello
3: hello
5: hello
Actual Behavior
Find results window shows:
Search "$(CURRENT_WORD)" (0 hits in 0 files of 1 searched)
Debug Information
Notepad++ v7.9.3 (64-bit)
Build time : Feb 22 2021 - 18:24:04
Path : C:\usr\bin\npp64\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 1909
OS Build : 18363.1377
Current ANSI codepage : 1252
Plugins :
The text was updated successfully, but these errors were encountered:
Description of the Issue
The shortcuts.xml file recognizes variables like$(NPP_DIRECTORY) and $ (CURRENT_WORD) in the
<UserDefinedCommands>
section, but does not in the<Macros>
section. That prevents creating a macro such as:The above macro will search for the literal "$(CURRENT_WORD)" in the current doc, rather than interpolating the variable
$(CURRENT_WORD)
to the currently highlighted text.Of course, the user may want to literally search for "$(CURRENT_WORD)"; maybe and escape slash
\
can be used such as:\$(CURRENT_WORD)
to not interpolate the variable?I searched for this in issues and on the Community, but didn't find a hit.
Steps to Reproduce the Issue
Expected Behavior
Find results window shows:
Actual Behavior
Find results window shows:
Debug Information
Notepad++ v7.9.3 (64-bit)
Build time : Feb 22 2021 - 18:24:04
Path : C:\usr\bin\npp64\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 1909
OS Build : 18363.1377
Current ANSI codepage : 1252
Plugins :
The text was updated successfully, but these errors were encountered: