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

Why are some matches a one way street? #199

Open
alerque opened this issue May 3, 2016 · 1 comment · Fixed by pilgrimlyieu/vim-surround#1 · May be fixed by #355
Open

Why are some matches a one way street? #199

alerque opened this issue May 3, 2016 · 1 comment · Fixed by pilgrimlyieu/vim-surround#1 · May be fixed by #355

Comments

@alerque
Copy link

alerque commented May 3, 2016

I'm trying to setup handling for smart (curly) quotes. I first tried it with just vim-surround, then found vim-textobj-quote but ran into the same problem. Now I've come back and realized this may be an issue with this plugin.

So lets say I try using q and j for single and double curly quote pairs:

let g:surround_106 = "‘\r’"
let g:surround_113 = "“\r”"

This creates a mapping that seems to work to create surround objects but it doesn't allow matching existing ones: given "this‸ string", typing cs"q will produce “this‸ string” but given “this‸ string” and typing commands that should match those such as dsq or csq( do nothing.

Am I doing something wrong or is there a bug here somewhere? I'm in NeoVim 0.1.4 if it matters.

@alerque
Copy link
Author

alerque commented May 3, 2016

This appears to be related similar to #105 which should be fixed in #107, but I can't seem to get it to work work for new mappings, the cs<target><target> and ds<target> commands only seem to handle the built in cases, not ones added outside of the core.

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