code-d icon indicating copy to clipboard operation
code-d copied to clipboard

Rename by symbol using F2

Open aberba opened this issue 5 years ago • 2 comments

Its quite handy to have F2 work for renaming a variable or function across all areas its being used. This usually works when the variable or function is selected.

aberba avatar Jun 05 '20 11:06 aberba

This worked (somewhat) in https://github.com/d-language-server/dls (which is unmaintained, so I moved over to code-d)

The implementation looks pretty uncomplicated, it just does a "find all references" for the symbol, and then textually replaces all the references with the new symbol.

jaens avatar Aug 09 '20 20:08 jaens

yes, find all references isn't yet implemented in serve-d yet, so once that's implemented a few related features should be easier to implement

WebFreak001 avatar Aug 10 '20 06:08 WebFreak001