Standing on the shoulders of:
http://www.ztw3.com/forum/forum_entry.php?id=117252
I created a macro that works great as a workaround for my
long-standing wish:
http://vujnovic.free.fr/ztw/ztw_zeps.html#ZEP500
; EditMatchingLines.ztm - Called from Viewer with F12
; where a search string and some hits already exist.
; This is a workaround for ZEP:
; http://vujnovic.free.fr/ztw/ztw_zeps.html#ZEP500
; Customizations for your environment:
; 1. Editor : C:\1\Notepad++\notepad++.exe
; 2. Temporary file: %TEMP%\zt$$$match.tmp
;
; Don't allow this macro to execute from DW
STOP_IF_DW,
; Don't allow this macro to execute from FW -- this
; does not work because Viewer thinks it is in FW
; STOP_IF_FW,
;
; ZEP:
; * We need STOP_IF_NOT_VIEWER to allow certain
; * macros to execute only in Viewer
;
; Grab last search "string" from history
f,UP,RET,HOME,SH_END,CTRL_INS,ESC,
; In eXecute window, FIND "string" in current file
x,CTRL_BKSP,@FIND,SPACE,/I,SPACE,QUOTE,SH_INS,QUOTE,SPACE,
; Insert current filespec
TAB,SPACE,
; Capture output in %TEMP%\zt$$$match.tmp
>%TEMP%\zt$$$match.tmp,RET,
; Edit output in your editor
x,CTRL_BKSP,@start "" C:\1\Notepad++\notepad++.exe %TEMP%\zt$$$match.tmp,RET,
; We should be in the editor. ZTree remains in Viewer
ESC,STOP