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

Surround does not behave as it should in a few cases #1255

Closed
xconverge opened this issue Jan 29, 2017 · 3 comments
Closed

Surround does not behave as it should in a few cases #1255

xconverge opened this issue Jan 29, 2017 · 3 comments

Comments

@xconverge
Copy link
Member

Great work, your way of implementing the surround plugin is pretty nice! Here are some findings I had that I wanted to at least document. It is kind of nitpicking but also takes away quite a bit from the usage of the plugin when things are off by one etc, I anticipate some people might mention things on slack related to these.

Here are a few cases that I found surround does weird things:

te|st
ysaw"
expected: "test"
actual: t"est"
(this only happens on the last line of a file I think...)

te|st
ysas"
expected: "test"
actual: test""

visual line select, [ ] is selection

[test
test]

S"
expected:

"
test
test
"

actual:

"test
test"

Backspace when entering a tag should remove the previous character, not add (similar to searchstate)

surround t should trigger the same thing as <, not surround with t

Should not be able to surround using any character, and b and B should be brackets
check out this data structure for the only valid pairs besides tags, I think it is correct:

https://github.com/xconverge/Vim/blob/8c24283d2801596378f9d34dee4b27b592f8968f/src/surround/surround.ts#L29

@kitsu
Copy link

kitsu commented Feb 1, 2017

I ran into the t for tag one already. Also some kind of feedback during tag input would be nice.
Over all great feature though, the one thing I really missed most from Vim.

@xconverge
Copy link
Member Author

feedback during tag input was added to master, will show in the status bar atleast for now

@xconverge
Copy link
Member Author

fixed most in #1289

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