Some plug-ins (such as tagbar) will be loaded before auto pairs, and these plug-ins will create buffers on their own. In this way, auto pairs will not get the BuffEnter event and will not execute AutoPairsTryInit()
I added call AutoPairsTryInit() in the last line, which means trying to initialize the plug-in at the first time to solve the problem.
Some plug-ins (such as tagbar) will be loaded before auto pairs, and these plug-ins will create buffers on their own. In this way, auto pairs will not get the BuffEnter event and will not execute AutoPairsTryInit() I added call AutoPairsTryInit() in the last line, which means trying to initialize the plug-in at the first time to solve the problem.