replacer.nvim
replacer.nvim copied to clipboard
Renaming files also changes the content
Given populating the quickfix list with telescope find_files
When running :lua require("replacer").run()<cr>
And renaming the files
Then the contents of the first line of the renamed files also is modified
@dstadelm thank you for opening an issue! I can't replicate it, can you provide more details?
Sorry for my delayed response. I was on vacation ;-)
Step 1: Selecting two files test1.txt and test2.txt containing the text as shown in the cat output
Step2: :lua require("replacer").run()<cr>
Step3: rename files
Step 4:
Write quickfix buffer
Step5: cat result
The text in the file is replaced with the content after the colon in the quickfixlist. But I don't know how to achieve the correct content after the colon.
It might be relevant, that I'm using Telescope find_files not live_grep
@dstadelm thank you! Yeah, that's expected, unfortunately, and I'm unsure how I would fix it. I'm parsing that text in the quickfix window, assuming the context of the contents of the line is on the right, which is not the case with find_files
since it's not picking a line. So when I'm saving the changes, I replace the line because it's like you changed it. I need to investigate, but seems weird to me that it's showing the file name on the right as well