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

Problem with PHP code in HTML attributes

Open johnkhughes opened this issue 11 years ago • 3 comments

Using cit in an HTML element with an attribute removes additional characters when the attribute contains PHP. For example:

<p class="<?php echo $foo ?>">bar</p>

ends up as (where ^ is the cursor position):

<p class="<?php echo $foo ?>^</p>

so the "> at the end of the opening tag has been removed. Is there any chance of a fix?

johnkhughes avatar Jul 03 '14 15:07 johnkhughes

Vim's built-in dit fails here as well, so no, probably no fix in the short term.

tpope avatar Jul 03 '14 15:07 tpope

I've found this problem too. Has it been reported to vim?

berarma avatar Jun 18 '15 09:06 berarma

Same for me! Is there any way I could help in order to get that fixed? Maybe implement another text object?

andreiglingeanu avatar Sep 21 '17 18:09 andreiglingeanu