Skip to content
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

Feature Request - Text Filtering #1191

Closed
IanAtSalt opened this issue Jul 2, 2021 · 12 comments
Closed

Feature Request - Text Filtering #1191

IanAtSalt opened this issue Jul 2, 2021 · 12 comments
Assignees
Labels
request feature requests from users
Milestone

Comments

@IanAtSalt
Copy link

One of my primary uses for a text editor is viewing logs. Often I'll need to correlate non-consecutive lines based on something like a transaction ID. I'd like to be able to completely hide any lines that do not match a given string. This is ALMOST implemented when I do a search and FIND ALL, but the lines in that little window are truncated.

@1024jp 1024jp added the request feature requests from users label Jul 11, 2021
@1024jp
Copy link
Member

1024jp commented Jul 11, 2021

For such (minor) usage, I prefer creating a script rather than adding a new feature to CotEditor itself.

@lolbat
Copy link

lolbat commented Nov 18, 2021

Select the document and then under the Find menu select Select All Find Matches. Then copy them and paste them into a new document

I am doing it right now for some files

@IanAtSalt
Copy link
Author

IanAtSalt commented Nov 18, 2021 via email

@foss-
Copy link

foss- commented Sep 16, 2023

TextMate has solved this by allowing users to just cmd+a the search results. This can then be copied to a new file.
In CotEditor this is not possible currently. Maybe that would be a nice workaround to implement and resolve this feature request?

@1024jp
Copy link
Member

1024jp commented Sep 16, 2023

@foss- CotEditor already has the “Select All Matches” in the Find menu. The command has no keyboard shortcut by default, but you can assign any key combination in Key Bindings settings.

@foss-
Copy link

foss- commented Sep 16, 2023

Hm, this seems to behave differently than TextMate. In a log after pressing cmd+f and entering a search term, results are highlighted in CotEditor. Find all shows the matching strings at the bottom of the Find & Replace dialog.

Were you refering to menubar > Find > Select all Find Matches? When I do that, all matches are selected in CotEditor. But as expected only that term is copied when I copy that to a new file, so that is not helpful.

Is there a way to copy all lines with a matching search term?

@1024jp
Copy link
Member

1024jp commented Sep 16, 2023

@foss-
Then, maybe:

  1. Find > Select All Find Matches
  2. Edit > Select Line
  3. Edit > Copy

And now I understand what you suggest. I miss the words "the search results". And, I think it's not a bad idea. Let me think if I can easily implement it.

@1024jp 1024jp closed this as completed in 476f965 Sep 18, 2023
@1024jp 1024jp self-assigned this Sep 18, 2023
@1024jp 1024jp added this to the 4.6.0 milestone Sep 18, 2023
@1024jp
Copy link
Member

1024jp commented Sep 18, 2023

... allowing users to just cmd+a the search results. This can then be copied to a new file.

Ok, I've just implemented it. The feature will be shipped with CotEditor 4.6.0, which will be released soon this month.

Screen Recording 2023-09-18 at 22 05 46

@foss-
Copy link

foss- commented Sep 21, 2023

Should this be in Version 4.6.0-beta.3 (585) already?

@1024jp
Copy link
Member

1024jp commented Sep 21, 2023

Should this be in Version 4.6.0-beta.3 (585) already?

Not yet. I'll release the stable version of 4.6.0 next week.

@foss-
Copy link

foss- commented Sep 23, 2023

Verified in Version 4.6.0-rc (587)
This is a very welcome change. Thanks so much.

@1024jp
Copy link
Member

1024jp commented Sep 23, 2023

@foss- It's my pleasure. Thank you for your quick check and feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request feature requests from users
Development

No branches or pull requests

4 participants