Emacs下配置Python IDE环境

转载 2012年04月27日 19:25:04

本文部分参考转自:http://www.byywee.com/page/M0/S211/211203.html


扩展工具:

Snippet: 可定义模板;
AutoComplete:自动完成工具,可以弹出列表框以供选择;
Rope and Ropemacs: 重构工具,如 extract method, goto difinition, show documents  等等
pycomplete:智能提示工具,如,输入time.cl 按TAB,会列出time模块全部以cl开头的函数。调用函数时,可以通过mini buffer提示函数的参数类型。

1. Install YASnippet

download:
https://github.com/capitaomorte/yasnippet

install:
cp top-folder-of-yasinppet to your emcas load-path

config:
(add-to-list'load-path "d:/tools/emacs-23.2/config/.emacs.d/capitaomorte-yasnippet-dad9612")
(require 'yasnippet) 
(yas/initialize) 
(yas/load-directory "d:/tools/emacs-23.2/config/.emacs.d/capitaomorte-yasnippet-dad9612/snippets")

2. Install AutoComplete:

download:
http://cx4a.org/software/auto-complete/#Latest_Stable

install:
cp top-folder-of-autocomplete to your emcas load-path

config:
(add-to-list'load-path "d:/tools/emacs-23.2/config/.emacs.d/auto-complete-1.3.1")
(require 'auto-complete) 
(require 'auto-complete-config) 
;(require 'auto-complete-settings) ; for test here.
(global-auto-complete-mode t) 
(add-to-list 'ac-dictionary-directories "d:/tools/emacs-23.2/config/.emacs.d/auto-complete-1.3.1/dict")
;(ac-config-default) ; for test here
(setq-default ac-sources '(ac-source-words-in-same-mode-buffers)) 
(add-hook 'emacs-lisp-mode-hook (lambda () (add-to-list 'ac-sources 'ac-source-symbols))) 
(add-hook 'auto-complete-mode-hook (lambda () (add-to-list 'ac-sources 'ac-source-filename))) 
(set-face-background 'ac-candidate-face "lightgray") 
(set-face-underline 'ac-candidate-face "darkgray") 
(set-face-background 'ac-selection-face "steelblue") 
(define-key ac-completing-map "\M-n" 'ac-next) 
(define-key ac-completing-map "\M-p" 'ac-previous) 
(setq ac-auto-start 1) 
(setq ac-dwim t) 
(define-key ac-mode-map (kbd "M-TAB") 'auto-complete) 

3. Install rope, pymacs and ropemacs

download rope:
http://pypi.python.org/pypi/rope

install rope:
python setup.py install

config rope:
no need

download pymacs:
https://github.com/pinard/Pymacs/downloads

install pymacs:

for python part:
python pppp -C ppppconfig.py pppp.rst.in pymacs.el.in pymacs.rst.in Pymacs.py.in contrib tests
python setup.py install

for emacs part:
cp top-folder-of-pymacs\pymacs.el your-eamcs-load-path(for me, is d:\tools\emacs-23.2\config\.emacs.d\pymacs\)

config pymacs:
(add-to-list'load-path "d:/tools/emacs-23.2/config/.emacs.d/pymacs")
(require 'pymacs)
(autoload 'pymacs-apply "pymacs") 
(autoload 'pymacs-call "pymacs") 
(autoload 'pymacs-eval "pymacs" nil t) 
(autoload 'pymacs-exec "pymacs" nil t) 
(autoload 'pymacs-load "pymacs" nil t) 

download ropemacs:
http://bitbucket.org/agr/ropemacs/get/tip.gz

install ropemacs:

python  setup.py install

install repemode:
( must install repemode for ropemacs, which can be download from http://bitbucket.org/agr/ropemode/get/tip.gz)
python setup.py install


config ropemacs:
(require 'pymacs)
(pymacs-load "ropemacs" "rope-") 
(setq ropemacs-enable-autoimport t)

To chech pymacs and ropemacs sussfully:

luanch eamcs, and within the *Pymacs* buffer, you can info such like this:

<23 (version "0.24-beta2")
>45 eval pymacs_load_helper("ropemacs", "rope-")
<5801 (eval (progn (defgroup ropemacs nil
  "ropemacs, an emacs plugin for rope."
  :link '(url-link "http://rope.sourceforge.net/ropemacs.html")
  :prefix "rope-")
......

4. Install pycomplete:

download:
http://www.rwdev.eu/articles/emacspyeng

install and config:
refer to http://www.rwdev.eu/articles/emacspyeng

5. config gdb

to continue.

【Python】第二周Python基础(下)

本周课程主要讲解Python的面向对象编程, 异常处理、模块、MySQL数据库、Python的数据库支持以及图形用户界面等技术,最后我们使用阶段案例开发了一个《飞机大战》的游戏。
  • 2018年03月16日 11:34

[转]将Emacs配置成一个C/C++的IDE编程环境

1.写在前面          Linux下的编程,业界多数人士并不喜欢,尤其是习惯了在windows下编程的程序员,认为windows的IDE各种好,而linux下没有一个好 的IDE ,估计很多...
  • shqhope
  • shqhope
  • 2017-01-06 19:38:41
  • 1240

【Emacs配置Python IDE】Configuring Emacs as a Python IDE

俗话说:工欲善其事,必先利其器。
  • u012550779
  • u012550779
  • 2014-04-06 14:40:34
  • 7006

emacs作为python2.7 IDE的配置

emacs python2.7配置
  • shile
  • shile
  • 2017-04-22 19:08:39
  • 858

配置emacs python 开发环境

安装版本emacs 24及以上配置emacs包管理的源; start package.el with emacs
  • xljiulong
  • xljiulong
  • 2016-04-29 15:20:34
  • 4206

emacs作为python3.4 IDE的配置

1. ~/.emacs.d/init.el文件内容如下 (setq inhibit-startup-message t) (require 'package) (add-to-list 'packa...
  • shile
  • shile
  • 2017-11-28 11:09:42
  • 763

配置emacs的python开发环境

本文将介绍,在Emacs中,通过各种扩展,打造强大的Python IDE环境,包括Snippet工具,智能提示,自动补全,重构工具,调试以及GAE的调试,等等。以下各工具的安装前提是你对Emacs的配...
  • qinxiuchen
  • qinxiuchen
  • 2011-09-26 18:56:00
  • 1322

Emacs 降魔系列之制作 Python IDE

个人的武装配置比较搓。希望大神指正下。 我们先去这里收集主人公闯关道具 —— 昊天塔 emacs for windows:http://ftp.gnu.org/gnu/emacs/windows/ 我...
  • u011659057
  • u011659057
  • 2015-04-12 23:55:15
  • 3099

OSX上配置emacs的C/C++开发环境

我安装的是emacs24,之前在linux上习惯了用emacs读写c/c++的代码,所以换用macbook pro之后也想用到emacs,特别是最近要学习一些开源的代码。 正常安装emacs24,然...
  • haoeng
  • haoeng
  • 2014-12-15 19:59:20
  • 658

【积水成渊-逐步定制自己的Emacs神器】6:首次变身IDE,Emacs C++ IDE

本文开始介绍如何把Emacs打造成一个C++ IDE。目标是可以在这个IDE中,可以高效地浏览Linux Kernel源代码,比如跳转到光标处的定义或引用,常见的C++ IDE中前进和后退的功能,快速...
  • elloop
  • elloop
  • 2016-03-03 09:25:13
  • 2460
收藏助手
不良信息举报
您举报文章:Emacs下配置Python IDE环境
举报原因:
原因补充:

(最多只允许输入30个字)