-
-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements for predefined filters #243
Comments
Hi @variar , I like the ideas you mentioned and I want to contribute to this feature because I heavily use it at work. For now I'll start with:
Cheers! |
One of the features discussed in: variar#243
One of the features discussed in: variar#243
One of the features discussed in: variar#243
One of the features discussed in: variar#243
@variar I have one question in context of predefined feature. Is there any particular reason why you refactored collection type to: using Collection = std::unordered_map<QString, QString>;
Thanks! |
@twardakm my bad, I've overlooked ordering issue. For highlighters manual ordering is important, but for these filters alphabetical should be completely fine. Should be changed to std::map :) |
One of the features discussed in: #243
Fixed unorderd_map in 0974b57 |
One of the features discussed in: variar#243
One of the features discussed in: variar#243
I like the idea of predefined filters, but it would be nice if we had something that's the opposite. So basically, show everything except lines matching filtered value. Perhaps a checkbox to invert a rule? |
@redfellow inverse checkbox can be helpful. Right now there is no support for such "inverted" filters in klogg internals. I hope to implement it in next release. |
predefined filters is a cool feature! I think the simple version of this is the I know it's quite same with the import/export feature by klogg conf file. But the simple file format of grep can be more general and compatible with different workflow, without depend klogg, and klogg own conf file is suite to support more complex options like specify if case sensitive for every pattern. |
Hi @xaljer , your idea seems interesting, it would also fit my workflow, but I want to make sure we understand it the same way. How I would see such feature is to add an option to specify directory in which there is a number of files, each file specifies one filter, where name of the file is filter name, and content is filter content. In terms of practical implementation, I think it would be best to implement something similar to Highlighters sets - so you can specify multiple sets of filters, e.g. one set of filters per project you are working on, and for every set you can either add filters manually or specify directory with grep-like pattern files. Let's wait for @variar opinion, but I like it very much, and would be eager to help with implementation. |
Hi @twardakm , yes, we got the same idea here. But I think we can talk more about details. I think may be we can simplify concepts. We could just say "filter". A filter can be specified by inputting a regex in klogg manually, or specified by a file (could be in any directory). “specify directory", you said, I think we can understand it as multi-selection of files under a directory, but there is no limitation that files under different directories. |
@xaljer , your idea about specifying file per filter makes more sense that mine :) I will start implementing it once I have some time! |
One of the features discussed in: #243
@redfellow Button to invert match rule is now available in builds >= 21.04.0.886 |
Internal storage for predefined is changed to list-like. That way ordering can be user-defined and not related to filter names.
Moved ideas about filter patterns in files to separte issue |
Some ideas
The text was updated successfully, but these errors were encountered: