You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I do delete surronding tag dst inside "link" to delete the <a> element, that works.
If I now visually select "somewhere" and do st to surround with a tag, and enter "<span", the attributes are remembered and used for the new elemen tag:
some kind of link <span href="a">somewhere</span>
This happens agan if I surround something else. If I add some extra attributes in my new tag, they are added along with the remembered attributes.
Maybe it's related to using e.g. "cst t span" to chang the existing tag to another tag and have the attributes remain (which does sound like a feature, not a bug :) ).
The text was updated successfully, but these errors were encountered:
Allow me to place a shamless plug here and recommend Exato.el (Evil XML/HTML Attributes Text Object), which allows you to work attributes of html tags as vim objects. It's pretty neat and should help you in a bunch of cases. The source code is here: https://github.com/ninrod/exato.
I'll keep this issue open in case another user wants to chime in with a different opinion.
The way things actually work here doesn't look like it is an intended feature.
If it were a feature, there would be a simple way to not include the attributes, e.g. by adding space after the tag name.
If it were a feature, when you do specify new attributes for a tag, those attributes would override the remembered ones, and would in turn become the remembered attributes to use in the future.
Let's say I have this HTML:
If I do delete surronding tag
dst
inside "link" to delete the<a>
element, that works.If I now visually select "somewhere" and do
st
to surround with a tag, and enter "<span", the attributes are remembered and used for the new elemen tag:This happens agan if I surround something else. If I add some extra attributes in my new tag, they are added along with the remembered attributes.
Maybe it's related to using e.g. "cst t span" to chang the existing tag to another tag and have the attributes remain (which does sound like a feature, not a bug :) ).
The text was updated successfully, but these errors were encountered: