Closed mortymacs closed 1 year ago
Hey, the approach I would recommend is to use a mapping that types :IncRename <word_under_cursor>
for you (see readme):
vim.keymap.set("n", "<leader>rn", function()
return ":IncRename " .. vim.fn.expand("<cword>")
end, { expr = true })
Does that work for you?
Hi,
I already saw that, and I tried to use it, but as my keymap function was my own customized, it didn't support {expr = true}
parameter, and I tried to use vim.cmd
instead, which led to getting an error. But now I updated my keymap function, and it supports it.
So, I'm going to close the issue.
Thank you!
Hi,
When I want to change a variable, I should type the whole name again plus the changes, while I was looking for a way to only type the required parts. For example
address
toaddressObj
, I'm looking for a way to haveaddress
in the INC box when I run:IncRename
, and then I just type theObj
part. But the INC box is empty all the time.Do we have this functionality, or I missed a config?
Cheers, Mort