我尝试使用emacs制作PythonIDE,比如本文中的http://www.enigmacurry.com/2009/01/21/autocompleteel-python-code-completion-in-emacs/,但是emacs告诉我“自动完成模式未启用”。是否可以使用emacs进行python编码?
发布于 2011-07-25 00:05:23
您希望在获得该消息的上下文中激活自动完成模式,或者
每次打开python文件时,通过在.emacs中添加以下内容来执行
(添加钩子‘python模式钩子(lambda () (-
.emacs中:(全局-自动完成-模式t)
你链接到的问题暗示了一些更完整的东西(即包含了我建议的两个添加中的第一个):
(add-hook 'python-mode-hook
(lambda ()
(auto-complete-mode 1)
(set (make-local-variable 'ac-sources)
(append ac-sources '(ac-source-rope) '(ac-source-yasnippet)))
(set (make-local-variable 'ac-find-function) 'ac-python-find)
(set (make-local-variable 'ac-candidate-function) 'ac-python-candidate)
(set (make-local-variable 'ac-auto-start) nil)))要使用代码片段和Rope完成全部工作,就需要添加这些内容。
https://stackoverflow.com/questions/6806777
复制相似问题