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

Disable add second bracket near word #330

Open
gelerum opened this issue Aug 1, 2021 · 4 comments
Open

Disable add second bracket near word #330

gelerum opened this issue Aug 1, 2021 · 4 comments

Comments

@gelerum
Copy link

gelerum commented Aug 1, 2021

when add " -> ""request.POST, but should just one"request.POST
and if " after world " -> request.POST" should just one
when we try add ( it shouldn't add second if before word ( -> (request
but if we add after word ( -> request()

@LunarWatcher
Copy link

LunarWatcher commented Aug 1, 2021

With the exception of the quotes at the end of a word (I think, the single quote handling system may or may not have been expanded in a way that let's this be customized. Need to check when I'm out of bed), my fork has an opt-in option to do this: let g:AutoPairsCompleteOnlyOnSpace = 1

@DavidFelsen
Copy link

Same problem here. Not sure if I did it wrong but I tried @LunarWatcher 's fork and had the same issue: when adding a quote right before the first letter of an existing word, it still adds a closing quote so that it goes quoteme -> ""quoteme

@LunarWatcher
Copy link

@DavidFelsen no repro. Did you remember to let g:AutoPairsCompleteOnlyOnSpace = 1? Remember to reload the buffer if you're testing live instead of making .vimrc-updates. Off the top of my head as a possible cause if you did both, possible migration problem with your favorite plugin manager. You can make sure you're using my fork with :echo g:AutoPairsVersion. I introduced the variable in my fork, so Vim will error out if you're still on jiangmiao's repo

@DavidFelsen
Copy link

Fixed - Indeed the variable wasn't defined so I was still on jiangmiao's version.
I had sourced vim.init (i'm on neovim), ran vimplug to clean the old plugin, saved & closed nvim. I'm not sure why that wasn't enough (vim beginner here!), but only :edit did the trick. It works as expected now, thank you @LunarWatcher!

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

3 participants