Emacs Prelude:如何为perl文件禁用smartparens?

问题描述 投票:0回答:1

我在OS X上使用当前的Emacs和Prelude,几乎没有自定义配置。在处理perl文件时,smartparens会干扰cperl-mode并按“{”insert“{}}”(https://github.com/bbatsov/prelude/issues/1062)。仅在前奏中为perl文件禁用smartparens的正确方法是什么?

emacs emacs-prelude
1个回答
1
投票

如果您正在使用cperl-electric-parens,您可以在perl模式下禁用插入该对的smartparens,例如。添加到您的perl配置

(with-eval-after-load 'smartparens
  (sp-local-pair 'cperl-mode "{" nil :actions nil))
© www.soinside.com 2019 - 2024. All rights reserved.