klogg icon indicating copy to clipboard operation
klogg copied to clipboard

Add option to save only selected lines to file

Open variar opened this issue 5 years ago • 3 comments

As mentioned by @aokulovich in https://github.com/variar/klogg/issues/234#issuecomment-750871104_

Looks like in version Built 2020-12-24 from 576b91d it saves the whole file instead of selected lines. Is this behaviour expected?

variar avatar Dec 24 '20 15:12 variar

will this work on selected or marked lines or both options? Will this work for very large selections? I have a common use case where i want to delete lines from very large text files. It would be useful to have an "inverse selection" option or a mutli-select option for selecting several continuous sections (usually done with ctrl-click and ctrl-shift-click). then i could save all lines excluding the unwanted ones to a new file, effectively deleting lines from a very large file!

eyaler avatar Oct 29 '21 13:10 eyaler

Currently klogg is saving the content of either file view or filtered view. So for your usecase it should be possible to fiter the file using some regex and save filtered results to a separate file using the context menu in the buttom view.

variar avatar Nov 04 '21 20:11 variar

my use case can be selecting a 10MB block of text so I guess the easiest way would be by line numbers

eyaler avatar Nov 04 '21 20:11 eyaler

Should be in 23.06 builds

variar avatar Jul 01 '23 10:07 variar