Comments (8)
Managed to repro with that one specifically. You could set that one to be specifically for HTML though (see g:AutoPairsLanguagePairs
and temporarily autopairs#AutoPairsScriptInit
). Gonna look into this though - the regex itself matches both, so I'm not entirely sure what happens here. Might be a borked balance check somewhere
from auto-pairs.
Try updating from the master branch. It was a borked balance check :')
TL;DR: count doesn't process regex, so your pair registered a close without an open, which tripped the balance check.
from auto-pairs.
It's working! Thank you.
from auto-pairs.
No repro in any other files but Rust files. Mildly sus it's down to the Rust plugin remapping stuff. Are you using that plugin? If yes, can you let g:rust_keep_autopairs_default = 1
for science? Might also be a part of the polyglot plugin, if you haven't explicitly defined a Rust plugin.
I have absolutely no clue why it only inserts one though -- can't repro that locally in or out of Rust files. What happens if you :verbose imap <
?
from auto-pairs.
No repro in any other files but Rust files. Mildly sus it's down to the Rust plugin remapping stuff. Are you using that plugin? If yes, can you
let g:rust_keep_autopairs_default = 1
for science? Might also be a part of the polyglot plugin, if you haven't explicitly defined a Rust plugin.
I use neither of those.
I have absolutely no clue why it only inserts one though -- can't repro that locally in or out of Rust files. What happens if you
:verbose imap <
?
It shows i < *@<C-R>=autopairs#AutoPairsInsert('<')<CR>
.
I believe it's due to language specific pair. I just edited my HTML pair to be {'\w\zs<': '>'}
, and this bug also shows up.
from auto-pairs.
I don't think it should cause issues, but not using \V in the regex method might come back to bite me. We'll see, didn't cause problems in testing - if it causes problems, feel free to open another issue or leave a comment here.
from auto-pairs.
No repro in any other files but Rust files. Mildly sus it's down to the Rust plugin remapping stuff. Are you using that plugin? If yes, can you
let g:rust_keep_autopairs_default = 1
for science? Might also be a part of the polyglot plugin, if you haven't explicitly defined a Rust plugin.
By the way, I just installed that plugin, and it disables auto pair for <>
. let g:rust_keep_autopairs_default
enables it again.
Think you may want to know.
from auto-pairs.
Yeah, it forcibly overrides b:AutoPairs
. The variable itself is largely meant for when you'd want a specific set of pairs for a buffer (i.e. for a specific filetype, as in a complete override instead of just custom additions, unless autopairs#AutoPairsDefine
is used to add pairs).
Setting it that way is kinda counter-productive (in my opinion, to be clear), as it completely overrides user config with how this plugin is set up. Might have to find an alternate system that lets plugins and user options coexist, but I have no ideas for that atm. autopairs#AutoPairsDefine
might already be a good choice, as it enables pair removal in the second argument (which is a vararg), but gonna have to deal with that later. Compatibility is also a bit of a problem -- I don't think I currently have enough "justification" or whatever to alter other plugins to facilitate this one. We'll see, future me's problem and whatnot :p
from auto-pairs.
Related Issues (20)
- Close brackets are added even when the next character is alphanumeric HOT 2
- 'Insert new indented line after Return' failed when used with vim-auto-popmenu HOT 2
- Can't delete in pairs HOT 5
- Testing for dupe tags HOT 1
- Breaking some non-English characters HOT 4
- g:AutoPairsMapCR conflicts against coc.nvim HOT 14
- Providing an option to skip setting up key maps in a file type? HOT 1
- Add a prefix variable to all the places that use `<C-p>` as a prefix
- Multibyte pair \( and \) causing errors. HOT 4
- Unexpected behavior with julia.vim HOT 5
- Regex issue with new tex multibyte pairs HOT 14
- Not getting auto completed parenthesis just before a quote HOT 7
- Changing variables has no effect on functionality of the plugin HOT 8
- Confused about MultiLineClose HOT 2
- Error is thrown while trying to use vertical split when I use auto-pairs in neovim v0.9.0 HOT 19
- bug: variable not found open HOT 2
- Not working under debian HOT 2
- modify `<C-p>` as configurable due to <C-p> in insert mode cause slow react in drop down selection HOT 2
- Add dedicated config variable to enable compatibility with vim-visual-multi HOT 1
- Delete both parentheses at once HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auto-pairs.