emacs python 补全比较_Emacs的Python自动补全

今天折腾了一天Emacs的python自动补全功能,先是下载了ipython,Rp不好导致各种失败,没办法,只好用pycomplete了。

pycomplete有种,一个是launchpad上的,一个是

首先,需要装上Pymacs,需要的就是make一下pymacs目录,然后将pymacs.el扔进Emacs的加载路径,pymacs.py扔进Python的加载路径。

然后下载python-mode.el,也放进Emacs加载路径,

接下来在.emacs添加:

;; python-mode settings

(setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))

(setq interpreter-mode-alist(cons '("python" . python-mode)

interpreter-mode-alist))

;; path to the python interpreter, e.g.: ~rw/python27/bin/python2.7

(setq py-python-command "python")

(autoload 'python-mode "python-mode" "Python editing mode." t)

;; pymacs settings

(setq pymacs-python-command py-python-command)

(autoload 'pymacs-load "pymacs" nil t)

(autoload 'pymacs-eval "pymacs" nil t)

(autoload 'pymacs-apply "pymacs")

(autoload 'pymacs-call "pymacs")

(require 'pycomplete)

这个插件只实现了5个功能:

code completion hitting (or ) key: e.g.: time.cl -> time.clock time. -> list of possible choices

description of the element (function/module/class/keyword) at the point hitting key

hitting ‘(‘ and ‘,’ shows funtion signature e.g.: time.strftime( -> strftime(format[, tuple]) -> string

getting signature of a given function name

getting description of a given element name

初学阶段就这几个足够了,先用着吧。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值