Open dunric opened 6 months ago
I would expect there to be a standard way to rename occurrences from the occur-mode
but maybe I am wrong ?
@xvw do you use the standard merlin-mode
for Emacs ? Do you know if such a feature exists ?
Anyway if it doesn't exists natively we would welcome a PR adding support for renaming :-)
From my knowledge of occur
, you can only use regular expressions to match specific lines and I must confess I don't know how to use them at all (and I don't think it's possible to rename).
In general, when I want to rename an identifier, I use xref-find-references-and-replace
which uses merlin-occurences
to find the occurrences of the term to be replaced.
@xvw It seems xref-find-references-and-replace
can mitigate the issue. Strange it didn't worked until merlin-eldoc
package was installed.
Indeed, I use Doom-emacs with the OCaml layout that includes merlin-eldoc
. Interesting that it only works if eldoc
is installed. I'll investigate.
Vim's plugin offers a command to rename an identifier under a cursor (or passed as an argument), however I can't find a similar feature for Emacs. There is support for finding/highlight of identifier's occurrences but no for renaming?
edit: Reference to current Vim's implementation: merlin_find#IncrementalRename()