Here’s the setup on Sublime 3 (3083):
- I have a text file open, like a console log file
- I perform a Find which locates the first instance
At this point, I want to record a macro that does these actions:
- Find > Quick Find All
- Selection > Expand Selection to Line
- Selection > Invert Selection
- Delete selection with Delete key
However, if I run the macro, it skips over Step 1 and ends up only selecting one line in Step 2. If I create a macro just for Step 1, it fails. If I manually perform Step 1 and then create a macro for steps 2-4, then it works fine. So, something about this Quick Find All step that is not getting recorded into the macro. This is what the macro file looks like:
{
"args": null,
"command": "find_all_under"
},
{
"args":
{
"to": "line"
},
"command": "expand_selection"
},
{
"args": null,
"command": "invert_selection"
},
{
"args": null,
"command": "left_delete"
}
]
Ideas? Unless there’s another way to do this, basically what I’m after is a macro that will delete all lines in a log that don’t match a search term.
- pt