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

Delete lines matching string #936

Open
borkfomb opened this issue Dec 13, 2024 · 3 comments
Open

Delete lines matching string #936

borkfomb opened this issue Dec 13, 2024 · 3 comments

Comments

@borkfomb
Copy link

Hi, what is the process for deleting all lines matching a string? Here's what I tried,

Find Text, [enter string], Select All
[all matches are now highlighted]
Edit > Lines > Delete Line

This deletes only the final line containing a match.
Is there a Select All Lines/Select Highlighted Lines option? Thanks

@zufuliu
Copy link
Owner

zufuliu commented Dec 13, 2024

  1. On "Find Text", check "Bookmark matched line", then "Find All".
  2. Edit -> Bookmarks -> Select All, then press Delete key.
    image
    image

@borkfomb
Copy link
Author

borkfomb commented Dec 13, 2024

Thank you for the quick reply, I would never have discovered that. I was expecting a Select Highlighted Lines option somewhere then to simply hit Delete.

For reference, here's the process in Sublime Text.

  • Find Text, [enter string], Select All
  • Expand Selection to Line (Ctrl+L)
  • Delete

@zufuliu
Copy link
Owner

zufuliu commented Dec 14, 2024

Expand Selection to Line (Ctrl+L)

Here is "Select Lines (Expand Selection)", but it currently only handles main selection.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants