-
Notifications
You must be signed in to change notification settings - Fork 0
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
is there an inverse of .save() #14
Comments
I experience something similar sometimes: I do "Ctrl+o" and then find myself in an empty buffer. I don't know exactly what to do about it. I could change the plugin to create a new buffer instead of changing the qf buffer, but it will leave those qf buffers around. What's your use case? What are you looking to do? |
My use case is dead simple: I activate the replacer, immediately change my mind and just want to get my quickfix window back (e.g., to do some more filtering first or removing lines from qf, before again switching to replacer mode and actually do something). |
I've been thinking about this. I never edit qf windows, but some people might. The issue is that replacer.nvim destroys the qf window, and reverting those destructive changes will be messy. I thought that instead of destroying the qf, I could simply create a new buffer, and if you want your qf back, go back or delete the current buffer. What do you think? I made a quick implementation if you can try it out: https://github.com/gabrielpoca/replacer.nvim/compare/gp-preserve-qf?expand=1 All of this would be configured, and I would add another configuration to delete the qf window when you're done with replacer.nvim |
Sounds like a good solution. I‘ll check the PR and give you feedback as soon as possible. |
I had a quick look and generally it works, but I litterally just switched to the branch, did a Good side-effect: Replacer works now without issues alongside bqf, too. |
I tested a bit and i have a suggestion (maybe independent from this testing branch):
and then i activate
I get first:
and it results in having 1 of the three files changed to and when i try it again i get:
Maybe this kind of errors can be catched by some nice error handling? I think it is totally okay to produce this error in e.g., a heavy refactoring but it's hard to know what's going on, because of the cognitive load of lua tracebacks. |
I did some more testing and for me it works just fine now :) |
My workflow is creating a qf list (with telescope usually), then pressing
<leader>r
which triggers the.run
method and (conveniently) opens the editable qf list (if it is not already opened).Sometimes though, i figure that i want to exit the editable qf list (=replacer ft) without any changes by e.g. returning to
normal
mode and then just hitting e.g.q
to return to the normal, unmodifiable qf list. Maybe a bit like the .cleanup method does, but without ending up with an empty qf list.Is this possible or am i just using it wrong (as in "stupid workflow")?
The text was updated successfully, but these errors were encountered: