-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using surround to manipulate quotes is broken when emacs doesn't think you're in a quoted string #56
Comments
Yes this is related to #92. I think evil-surround should enclose it's scope only inside a line, not multlinewise because it get's hard to know if you are writing a multiline string or not. |
@rolandcrosby, this is really hard for evil-surround to deal with. vim surround actually displays disparate behaviour in this regard. Let's take this as an example(cursor on
I'm not 100% sure of what to do in this case but I'm inclined to leave it as it is. |
Interestingly this seems to happen even when there are no literal surrounding characters due (I assume) to the native quote parsing. With this YAML snippet:
in However if you switch to |
@actionshrimp I think that happens because yaml-mode defines a different syntax table for quoted stuff. |
Ah I just realised this is related to evil text-objects rather than surround specifically (I was actually trying to do some surround related operations which sent me off in the wrong place). Sorry for the noise! |
@actionshrimp I just hit this exact issue in YAML, did you have a workaround for this? Don't mean to hijack, just working in YAML so much and I don't know where else to look. |
In this text file, with your cursor in the middle of the word 'this':
attempting to manipulate the surrounding quotes (
ds"
,cs"
, etc) returns a "No quoted string found" error. In Vim with surround installed, the quotes are correctly detected and manipulated.I believe this is due to Evil's quote textobject using native Emacs quote parsing, per this thread. Also per that thread, it sounds like Evil itself is not going to change the way quote textobjects are parsed, so a change to make surround behave normally would have to be made in evil-surround itself.
The text was updated successfully, but these errors were encountered: