D tooling is disappointing

Paul Backus snarwin at gmail.com
Wed Aug 17 21:17:05 UTC 2022


On Wednesday, 17 August 2022 at 19:31:06 UTC, matheus wrote:
> On Wednesday, 17 August 2022 at 16:58:02 UTC, Paul Backus wrote:
>> ...
>> For example, if I rename a variable or a function, I can 
>> rebuild the project with :make and then use a command like 
>> `:cdo s/oldName/newName/g` to iterate over the resulting 
>> errors and replace the old name with the new name. This is a 
>> lot faster than having to look at the file + line number of 
>> each error message and navigate there by hand.
>
> I may have misunderstood you, but usually in an IDE, all the 
> references of the modified/renamed "thing" i.e: variable, 
> function, method etc. will be replaced automatically through 
> the project or an option will be given for this.
>
> I barely use IDE either, but I have seen this feature.

Yes, I'm aware that this feature exists in many IDEs, at least 
for other languages. Obviously if your tooling has a dedicated 
"global rename" feature, you should use that instead of messing 
around with error messages.

However, as far as I know, nothing like this exists for D, at 
least not yet. So being able to approximate it with the tools we 
*do* have (Vim, D compiler) is a useful stopgap.


More information about the Digitalmars-d mailing list