Smartparen closing bracket问题

在spacemacs中使用smartparen,当使用closing bracket( ), ], } )的时候会自动移动光标到后一个closing bracket那儿,我设置了 dotspacemacs-smart-closing-parenthesis为 nil了,但是还是这样。不知道为啥。。我想把默认情况设置成插入closing bracket而不是按了C-q后才能输入。。

然后查看按下)时候key的情况,调用的函数是self-insert-command。

self-insert-command:

runs the command self-insert-command (found in global-map), which is an interactive built-in function in ‘C source code’. It is bound to many ordinary text characters.

(self-insert-command N)

Insert the character you type. Whichever character you type to run this command is inserted. The numeric prefix argument N says how many times to repeat the insertion. Before insertion, ‘expand-abbrev’ is executed if the inserted character does not have word syntax and the previous character in the buffer does. After insertion, the value of ‘auto-fill-function’ is called if the ‘auto-fill-chars’ table has a non-nil value for the inserted character. At the end, it runs ‘post-self-insert-hook’.

然后查看post-self-insert-hook

post-self-insert-hook is a variable defined in ‘C source code’. Its value is (sp–post-self-insert-hook-handler electric-pair-post-self-insert-function electric-indent-post-self-insert-function blink-paren-post-self-insert-function)

This variable may be risky if used as a file-local variable.

Documentation: Hook run at the end of ‘self-insert-command’. This is run after inserting the character.

然后查看了自己的配置和spacemacs的配置里面发现并没有post-self-insert-hook。。。

求大神解答。

(sp-autoskip-closing-pair nil)可以解决…

为什么要关掉,这个很实用啊,括号配对了才会跳过,关掉之后就失去一道检测了,容易出错。