你的Python模式钩子中有什么?

2 投票
1 回答
4018 浏览
提问于 2025-04-16 17:17

我开始学习Python,想要自学一些东西。

你们的Python模式设置里有什么呢?

我对Emacs有一些经验,但对Python不太熟悉。

  • 你们推荐哪个Python模式?我在Windows上用的是Emacs 23.2。
  • 有没有适用于Python的flymake?(我该怎么设置?)
  • autopair在Python中能用吗?(怎么用?)
  • auto-complete在Python中能用吗?(有什么提示吗?)
  • 等等等等

谢谢你们提供的任何建议。

1 个回答

2

关于autopair。没错,它是有效的。我使用的是autopair.el的0.3版本。在autopair.el的顶部文档中,有一个扩展可以让三重引号正常工作。

我的设置:

(require 'autopair)
(autopair-global-mode) ;; enable autopair in all buffers 
(setq autopair-autowrap t) ;; attempt to wrap selection

;; this mode-hook is taken straight from the comments in autopair.el
(add-hook 'python-mode-hook
      #'(lambda ()
          (setq autopair-handle-action-fns
            (list #'autopair-default-handle-action
              #'autopair-python-triple-quote-action))))

撰写回答