jiangmiao / auto-pairs

Vim plugin, insert or delete brackets, parens, quotes in pair
http://www.vim.org/scripts/script.php?script_id=3599
4.11k stars 373 forks source link

Changes from recent commits break expected closes in some scenarios #237

Closed carlashley closed 5 years ago

carlashley commented 5 years ago

Recent commits (https://github.com/jiangmiao/auto-pairs/commit/f1d9a2bf6308ea12051e74748cf6b3580dd2f799) appears to break expected closes in some scenarios.

In the attached video, I'm trying to manually close out an existing python dictionary key with ] character, with several strings below the line on which this is occurring. However, when typing the ] character, the cursor jumps to the next line. This behaviour goes away after commenting out the lines below.

The (), {} pairs do not seem to shares this behaviour.

Additionally, changes to the behaviour seem to impact any entry of the ' character, whereby entering in u' followed by a ' to manually close out the ', results in three ' characters. Also in video.

Additionally, inserting the opening character of a pair, in a line where there are already matching close characters still results in a matched pair being inserted.

For example, foo'string') with foo('string') becomes foo()'string'). This is also demonstrated in the attached ZIP (video in the zip). Closures_Compressed_24-01-2019.mp4.zip

jiangmiao commented 5 years ago

use let g:AutoPairsWildClosedPair = '' to disable jumping of ]