-
Notifications
You must be signed in to change notification settings - Fork 47
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
Enhancements for deadgrep-edit-mode #105
Comments
Of course, one can achieve C-x C-q and C-c C-c in e.g. the use-package definition:
Unfortunately, there will be no feedback when saving the changes and returning from deadgrep-edit-mode to deadgrep-mode. |
As far as I can tell, the updating of files happens as you are typing in EDIT: Ah, I see that you probably knew this already. Sorry for the noise. |
this is unsolicited feedback, but coming to |
Also I found that when the operation is completed (after waiting for all buffers/files to be modified), typing It's too bad because otherwise deadgrep is great. |
Nowadays, I can recommend to use consult-ripgrep and embark-export. They let you narrow the search easily, giving you live results and a standard grep buffer that you can switch to a writable grep buffer. You can configure consult-ripgrep args, and if that is not enough, maybe write a small wrapper function that adds sorting to the args, then call consult-ripgrep, and bind it to some key. |
Please consider adding C-x C-q to deadgrep-mode-map as default keybinding for activating deadgrep-edit-mode. dired uses this for enabling editing dired buffers, so it would feel natural to have this.
Also add C-c C-c to deadgrep-edit-mode-map to perform the changes, or C-c C-k to abort them, restoring the previous state. This would be similar to magit and other tools, and wgrep uses C-c too. Aborting the changes and restoring the previous state probably needs to be implemented first.
Finally, refreshing the buffer often returns the results in a different order. I assume this is because rg does a multi-threaded search. However, sometimes it would be less confusing if the order of the results stayed the same. rg itself has options for this (--sort and --sortr), though it probably makes search slower because single-threaded.
The text was updated successfully, but these errors were encountered: