emacs-evil / evil-surround

you will be surrounded (surround.vim for evil, the extensible vi layer)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Changing and deleting multi-char surrounding tags doesn’t work

Mango0x45 opened this issue · comments

I have recently been working with jinja quite a lot, so I decided to make my life easier by adding some custom pairs:

(add-hook
 'html-mode-hook
 (lambda () (push '(?% . ("{% " . " %}")) evil-surround-pairs-alist)
            (push '(?# . ("{# " . " #}")) evil-surround-pairs-alist)
            (push '(?{ . ("{{ " . " }}")) evil-surround-pairs-alist)))

When I enter an HTML buffer, if I put my point on foo bar and do ys_{ I get the following behaviour:

{# Before #}
foo bar

{# After #}
{{ foo bar }}

So that’s correct. But the moment I try to change- or delete the pairs then stuff stops working. Here is what happens with ds{:

{# Before #}
{{ foo bar }}

{# After #}
{foo bar}

I have recently been working with jinja quite a lot, so I decided to make my life easier by adding some custom pairs:

(add-hook
 'html-mode-hook
 (lambda () (push '(?% . ("{% " . " %}")) evil-surround-pairs-alist)
            (push '(?# . ("{# " . " #}")) evil-surround-pairs-alist)
            (push '(?{ . ("{{ " . " }}")) evil-surround-pairs-alist)))

When I enter an HTML buffer, if I put my point on foo bar and do ys_{ I get the following behaviour:

{# Before #}
foo bar

{# After #}
{{ foo bar }}

So that’s correct. But the moment I try to change- or delete the pairs then stuff stops working. Here is what happens with ds{:

{# Before #}
{{ foo bar }}

{# After #}
{foo bar}

Yup, same problem here, any work around plz?:)

@Mango0x45 @wisonye this should now be fixed in master. Please let me know if you observe otherwise.