-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
[html] provide (auto) rename of tags #47069
Comments
(Experimental duplicate detection) |
You could probably write an extension to do this |
It will be better to add it as a feature rather than an extension, especially for new users. Because when they notice the problem, they will usually think that this is a limitation in visual studio code rather than thinking about solving the issue with an extension or so. Besides, they may not even know that there are extensions on visual studio code (a user is not necessarily aware of all of the abilities of the software he uses). |
The extension for this is: |
I have used several extension that does this, but I have to say that, neither works as you would expect. Sometimes they work well, sometimes they don't. I think that if VSCode have this integrated, it would deliver a better experience in a more consistent way. |
I'd love to see this feature in vscode as well. While there are a few extensions, they are very unreliable. Auto Rename Tag does not work with multi-line tags and tags with dashes (like you'd use for components). So for angular development you might as well not use it at all. It's one of those webstorm features that I really miss in vscode. |
Adding an extension for every basic piece of functionality an IDE should already do (e.g., updating start/end HTML tags, or dragging/dropping text, and such) is why I don't use Atom. I'm surprised I don't have to install an Atom extension to use capital letters! All kidding aside, this is both an obstacle for new users, and an unnecessary hurdle for developers who already use VS Code. |
I feel like this feature is basic enough to be added to VS code. |
I agree with @shankarsridhar |
All comments i read exactly my thoughts what i wanted so i am with you guys yes we need this feature. |
Agree with everyone else, this is so basic and annoying, it shouldn't be left to extensions. |
If you use the |
@zzdumeng 😨 |
Speaking as a |
Just adding my support for this feature.... |
Please add this! The extension mentioned in this ticket doesn't work properly if at all. |
Can't believe its a YEAR and this superduper basic thing is still left wanting... The plugin mentioned indeed does not seem to work properly anymore. Can say about brackets what you will, but at least it had that. |
Emmet has edit functions for tags. Click on your tag and using the command panel type update tag. An input box will appear and type your new tag. You can bind this to a shortcut as well. Stop being lazy 🐻 |
😆 @OogieBoogieInJSON this was never about being lazy, it's about being productive |
@MrCroft I was suggesting an alternative that already comes built in with the editor. I know, the available extensions don't work well or at all but the emmet function works perfect. |
Man, the absence of this feature is frustrating. Should be built-in ! |
Would it be appropriate to implement this as a rename provider (ie |
@octref Thanks! I think this is way better than auto-rename! |
@octref Thank you! I love the rename feature so much! In which version will it be released? |
@wizcas You should already be able to use it in latest https://code.visualstudio.com/insiders/ |
Out of consideration for performance, extension compatibility (esp Vim extension and language extensions that would use HTML document), discoverability, usability, here is what I have come down to: auto selecting the matching tag's position. You can opt-out by turning off Benefits are:
The only two special cases, where I'm making edit to the document are:
This is to let you change attributes easily: And finally, this should not interfere with Vim much. Enjoy that Multi-cursor with Cmd + Option + down should also work if you have your tags well aligned. |
Updates:
This behavior was removed. And now, ESC would temporarily remove the mirroring cursor until you move cursor again. |
Hello, excited about this feature -- however, it does not seem to exist for me, using latest insiders. Positioning cursor within a tag (either via click or keyboard navigation), does not select matching tag, nor is typing mirrored in the matching tag. Retried with all extensions disabled; still nothing. There was also not If I'm doing something wrong, please let me know -- eager to have access to this feature and ditch the buggy rename- and highlight-matching-tag extensions! Mac OS X 10.13.6 |
@ultraGentle Try today's insiders should have it. Give it a try. |
Yes! Works like a charm. Much obliged. |
@octref any way to expand the scope of that feature to XML tags? Or at least give some pointers on how to achieve a similar behavior for XML (See redhat-developer/vscode-xml#130) |
@AndrePu xaml support is implemented by vscode-xml extension, so open an issue there. |
Hi. Heavily inspired by the code in: https://github.com/microsoft/vscode/blob/master/extensions/html-language-features/client/src/mirrorCursor.ts, I made a different implementation of mirrorCursors here. This new implementation is an idea I had for a PR to vscode-xml: redhat-developer/vscode-xml#213. The main reason for this implementation was to immediately dispose the Most (if not, all) of the logic was transferred over. (ie, the logic for The structure of the code is a bit different: @octref What do you think about this implementation? |
I think that's ok. Most of the corner-case handling is in |
Description:
In order to rename an HTML/XHTML/XML tag we have to modify tag start, then modify tag end.
Steps to Reproduce:
Suggestion:
I suggest that when tag start is modified, the corresponding tag end should be automatically modified and vice versa.
Benefits:
The text was updated successfully, but these errors were encountered: