by Elrac · 10y ago · 0 comments
IBM's mainframe editor ISPF allowed you to select a set of lines, usually based on a search (including negative search, i.e. lines _not_ containing the search data), then to manipulate the set of lines thus selected (manually removing lines, adding lines or reversing the selection) and then performing other operations, such as global search and replace, or sorting, or indenting or whatever, on that set of lines while ignoring all other text in the file.
I occasionally run into tasks where I would love to have this functionality available.
x g/foo
will select all lines containing foo. Similarly x v/foo
will select all lines not containing foo. Sorting etc. is taken care of by piping text through external tools.I was more interested in common editing tasks for huge files which according to this thread a lot of people perform using sublime text.