rope-code-assist, M-/
Code completionrope-rename, C-c r r
Rename a variable, function, etc. 5.程序调试
在Emacs中,通过M-x pdb可调出pdb对python代码进行调试。但是发现在Windows系统中,总进入不了调试模式。主要原因有:
1. windows中,找不到pdb.py位置。需自己制定pdb的路径。可以通过下面的方法设置pdb的路径:
;; pdb setup, note the python version
(setq pdb-path 'c:/python25/Lib/pdb.py
gud-pdb-command-name (symbol-name pdb-path))
(defadvice pdb (before gud-query-cmdline activate)
"Provide a better default command line when called interactively."
(interactive
(list (gud-query-cmdline pdb-path
(file-name-nondirectory buffer-file-name)))))
from pyflakes.scripts.pyflakes
import mainmain()
效果如下:
7.文档帮助
我还是喜欢firefox直接上官方文档库查找。
emacs wiki 也给出了sphinx后格式的文档下载,可以直接在emacs info里查看帮助。
具体链接请见本文末尾处效果可以看最后一个链接。
8.段落注解:
Comment/Uncomment Region
If you have ‘transient-mark-mode’ on, you can just use ‘comment-dwim’:
select a region and hit ‘M-;’.
The DoWhatIMean means that it will comment or uncomment the region as appropriate.
If you do not have ‘transient-mark-mode’ on by default, you can hit C-SPC twice to activate it temporarily.
( doesn’t python-mode.el offer `py-comment-region? --CH )
You can also use “rectangles” with comment/uncomment region (among other things that you can do with rectangles).
See RectangleCommands or “(emacs) Rectangles” in the Emacs manual. 9.框架支持
django: https://code.djangoproject.com/wiki/Emacs" 如果不是很熟悉的话,还是建议用pycharm来写吧。 10.测试
待完善,下面的link中含有。