emmet-vim icon indicating copy to clipboard operation
emmet-vim copied to clipboard

remove tag removes inner content

Open mattn opened this issue 13 years ago • 12 comments

<li><a href="zen">Zen-Coding</a></li>

When do it on A tag, it should be

<li>Zen-Coding</li>

mattn avatar Jul 02 '12 00:07 mattn

Draft

pattern 1

<li><a href="zen">Zen-Coding_</a></li>

become

<li><a href="zen"/></li>

pattern 2

<li><a href_="zen">Zen-Coding</a></li>

become

<li>Zen-Coding</li>

pattern 3

<li_><a href="zen">Zen-Coding</a></li>

become

<li>Zen-Coding</li>

mattn avatar Jul 02 '12 01:07 mattn

done!

mattn avatar Dec 04 '12 04:12 mattn

This doesn't seem to work for me with current version: inner content is always removed.

davidoc avatar Oct 09 '13 13:10 davidoc

Ah, yes.

mattn avatar Oct 10 '13 00:10 mattn

Hmm, I tried this on ST3, and I noticed ST3 removes whole of contents in the tag.

mattn avatar Oct 15 '13 01:10 mattn

I think the ST3 plugin has also bug. This should be work as Pattern 2.

Remove Tag

can you fix this please?

kymmt avatar Apr 13 '14 17:04 kymmt

Something might be wrong in function :slightly_frowning_face:. Before the solution is out, we can try this. For example:

noremap <C-Y>k vat<Esc>da>`<da> 

daizeng1984 avatar Dec 24 '17 09:12 daizeng1984

I just ran into this. I don't believe remove-tag is working as described at https://emmet.io. The tutorial shows a result that doesn't match what the Emmet website describes. See https://github.com/mattn/emmet-vim/blob/master/TUTORIAL starting at line 93.

mvolkmann avatar Jan 28 '18 01:01 mvolkmann

This is the one thing I use the most (well, wrap and 'unwrap', as I call it). Agreed, the 'remove tag' function in emmet-vim does NOT work at all like in the documentation of emmet proper: it should not remove the tag and all of its children; it should, just and only remove the tag itself. This ticket has been open this long and not resolved? This makes emmet-vim completely unusable to me and I cannot recommend it to others -- as a power user, I'm slinging tags all over, moving them around, wrapping and unwrapping .. it is all a beautiful, minimal, fast, elegant dance until I have to 'unwrap' a tag, then its grinding to a screeching halt as I manually remove a tag pair; makes emmet-vim feel half-assed and 'coulda-been'. If this gets fixed I would be ecstatic to jump back on the emmet-vim wagon. It's just such a glaring coffee-stain on an otherwise excellent emmet emulator.

thanateros avatar Jul 11 '18 18:07 thanateros

Yes, this feature doesn't work as Emmet documentation describes it and it's one of the most useful ones, so it would be of great benefit if that would get fixed.

robertjk avatar Aug 22 '19 20:08 robertjk

think this would increase productivity a lot. would be nice if this could be fixed.

JoJoPuppe avatar Apr 19 '20 14:04 JoJoPuppe