Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use editor.linkedEditing for auto renaming references in template #2666

Open
UltraCakeBakery opened this issue Jan 16, 2025 · 1 comment
Open

Comments

@UltraCakeBakery
Copy link

UltraCakeBakery commented Jan 16, 2025

Description

When I rename a state variable during a refactor, I hate that I have to then change it everywhere in the template too. I wish vscode would automatically rename it for me everywhere, reliably.

Proposed solution

VS Code recently started promoting the editor.linkedEditing feature, which enables automatic renaming of closing tags in HTML when you rename the opening tag. For instance, when renaming a <div> tag to <section>, the corresponding closing </div> tag is automatically updated to </section>, with a visual indicator (like the red background in the image) showing that the two parts of the code are linked.

Could a similar approach be applied to renaming variables, components, etc.?

I think this could be an amazing dev-ex and productivity improvement.

Alternatives

not and require people to keep using cntrl+f and replace all

Additional Information, eg. Screenshots

No response

@UltraCakeBakery UltraCakeBakery changed the title Use new editor.linkedEditing for auto renaming variables in template Use new editor.linkedEditing for auto renaming references in template Jan 16, 2025
@UltraCakeBakery UltraCakeBakery changed the title Use new editor.linkedEditing for auto renaming references in template Use editor.linkedEditing for auto renaming references in template Jan 16, 2025
@dummdidumm
Copy link
Member

This sounds like it should be the job of refactor -> rename, which can do all these things reliably today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants