我在OS X上使用当前的Emacs和Prelude,几乎没有自定义配置。在处理perl文件时,smartparens会干扰cperl-mode并按“{”insert“{}}”(https://github.com/bbatsov/prelude/issues/1062)。仅在前奏中为perl文件禁用smartparens的正确方法是什么?
如果您正在使用cperl-electric-parens
,您可以在perl模式下禁用插入该对的smartparens
,例如。添加到您的perl配置
(with-eval-after-load 'smartparens
(sp-local-pair 'cperl-mode "{" nil :actions nil))