FarManager
FarManager copied to clipboard
Editor: Add option to delete all lines matching a pattern or not matching pattern
As you have implemented regex replace it would be useful to have feature as vim has. http://vim.wikia.com/wiki/Delete_all_lines_containing_a_pattern
Probably it is possible even with current implementation but it is not clear to me how to achieve it.
It should be achievable with a trivial macro that would invoke the search and delete the found line in a loop.
it would actually be nice to have with regex enabled and then use a special command (for example \d) in the replace string to tell Far to delete that line
Yeah, except when you actually want that "\d" to be a replacement string.
That can be resolved, but in any case I think a better solution is : ( * ) replace | ( ) delete line
And maybe on the way add [ ] search for lines not containing the search string Although this can done using a tricky regexp
This could be done by extending regex syntax: a pattern to match end-of-line in search string, and special symbol to insert end-of-line in replace string. Visual Studio has this.