FarManager icon indicating copy to clipboard operation
FarManager copied to clipboard

Editor: Add option to delete all lines matching a pattern or not matching pattern

Open pmisik opened this issue 7 years ago • 5 comments

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.

pmisik avatar Dec 04 '17 21:12 pmisik

It should be achievable with a trivial macro that would invoke the search and delete the found line in a loop.

alabuzhev avatar Dec 04 '17 22:12 alabuzhev

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

trexinc avatar Dec 12 '17 19:12 trexinc

Yeah, except when you actually want that "\d" to be a replacement string.

alabuzhev avatar Dec 19 '17 23:12 alabuzhev

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

trexinc avatar Dec 20 '17 06:12 trexinc

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.

MKadaner avatar Oct 23 '18 05:10 MKadaner