emacs-evil / evil-surround

you will be surrounded (surround.vim for evil, the extensible vi layer)
Other
631 stars 61 forks source link

Renaming tags not working for me #185

Closed elmehalawi closed 2 years ago

elmehalawi commented 2 years ago

Sorry for the obtuse question, but I can't seem to get tag renaming working. For example, if I have this bit of JSX:

<Text style={[styles.sectionTitleText, textStyle]}>{text}</Text>

and I have the cursor inside the tag, then do cst<... it ignores antying after the < and what I end up with is:

<{text}<

I'm using doom emacs with evil-surround. Any ideas what could be causing this?

tomdl89 commented 2 years ago

Hi @elmehalawi I don't think this is an obtuse question. I guess there may be another mode interfering with evil-surround, I'd suggest you bisect your way to the answer by commenting out / disabling half of your config (minus evil-surround, of course) and testing until you find the culprit. If you still can't find a cause, it sounds like either a doom problem (in which case make an issue there) or an issue with your emacs or env. Probably worth running a make emacs session (where only evil and evil surround are loaded) to test the latter. There's always a chance it's an evil-surround bug, but I'd need repro steps to investigate. Let us know how you get on

elmehalawi commented 2 years ago

Thanks @tomdl89 I will try that and update, I appreciate your help

elmehalawi commented 2 years ago

As suggested by someone in the doom-emacs repo, doing csttdiv> instead works. I'm not sure why, but that does work so no complaints here.