I have various logfiles which I want to filter with a grep-like functionality.
The way I did it before is:
- Mark the word / string
- Search/Mark
- enable option "Bookmark line"
- mark all
- close
- Search/Bookmark
- "Remove Unmarked lines"
For this procedure I recorded a macro and stored it in shortcuts.xml
:
<Macros>
<Macro name="Trim Trailing and save" Ctrl="no" Alt="yes" Shift="yes" Key="83">
<Action type="2" message="0" wParam="42024" lParam="0" sParam="" />
<Action type="2" message="0" wParam="41006" lParam="0" sParam="" />
</Macro>
<Macro name="grep01" Ctrl="no" Alt="no" Shift="no" Key="0">
<Action type="3" message="1700" wParam="0" lParam="0" sParam="" />
<Action type="3" message="1601" wParam="0" lParam="0" sParam="IM1 001" />
<Action type="3" message="1625" wParam="0" lParam="0" sParam="" />
<Action type="3" message="1702" wParam="0" lParam="784" sParam="" />
<Action type="3" message="1701" wParam="0" lParam="1615" sParam="" />
<Action type="2" message="0" wParam="43051" lParam="0" sParam="" />
</Macro>
Is it possible to replace the string "IM1 001"
with a wildcard, or the actual marked text and then just press a combination to do the job?