Skip to content
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

Delete surrounding triple quote in ruby files clears all text #97

Open
PROgram52bc opened this issue Jul 18, 2020 · 3 comments
Open

Delete surrounding triple quote in ruby files clears all text #97

PROgram52bc opened this issue Jul 18, 2020 · 3 comments

Comments

@PROgram52bc
Copy link

I just noticed this happening, but not sure what caused it. It is only a problem in Ruby file (not in python) as far as I know, so probably has to do with vim's native support for Ruby?

To reproduce, open vim with some *.rb file, paste the following text:

text = """ Below is an add function """
def add(a, b)
    return a + b
end

Move the cursor to any of the following position

text = """ Below is an add function """
           ^^^^^^^^^^^^^^^^^^^^^^^^

and in normal mode, press sdi and then enter """ for both prompts. Then the entire buffer should be cleared.

Defining a custom mapping with

{'buns': ['"""', '"""'], 'input': ['q']}

and do sdq would produce the same result.

@machakann
Copy link
Owner

Thank you for your report! Unfortunately, I could not reproduce the problem in my environment. Do you have any other settings related? Or if you could make a minimum working vimrc it would be great.

sandwich_issue97

@PROgram52bc
Copy link
Author

It seems that when set foldmethod=syntax, the problem would occur. Otherwise it works fine on my machine as well :)

@machakann
Copy link
Owner

Thanks, I reproduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants