emacs python ide
2012-04-30 20:32
302 查看
申明:本文章内容结合了踢开Eclisep&Aptana,Emacs变身强大IDE 和 Emacs中打造强大的Python
IDE两篇文章,主要为了记录配置过程!
1, 添加load-path
2, 安装emacs, python
3,安装yasnippet
下载地址
解压后,将文件yasnippet.el,以及文件夹snippets分别复制到目录~/.emacs.d/lisp/,~/.emacs.d/lisp/yasnippet中
配置~/.emacs,添加如下配置信息
4,rope,pymacs,ropemode,ropemacs
rope下载地址,pymacs下载地址,ropemode下载地址,ropemacs下载地址
1> 解压并安装rope:
安装成功后,将会在/usr/local/lib/python2.7/dist-packages 出现与rope相关得文件信息(python2.7为本机python版本号)
2> 解压,安装,配置pymacs
3> 解压并安装ropemode
4> 解压,安装,配置ropemacs
5,auto-complete
下载地址
配置~/.emacs,添加如下配置信息
6,pycomplete(pycomplete.py,pycomplete.el,python-mode.el)
pycomplete.py下载地址,pycomplete.el下载地址,python-mode.el下载地址
1> 将pycomplete.el,python-mode.el复制到~/.emacs.d/lisp/
中
2> 将pycomplete.py复制到 /usr/local/lib/python2.7/dist-packages/ 中
3>
配置~/.emacs,添加如下配置信息
7,cedete
下载地址
配置~/.emacs,添加如下配置信息
8,ecb
下载地址
配置~/.emacs,添加如下配置信息
emacs-for-python:如此文所介绍,几乎把上面这些插件都集成起来了(除了pycomplete/cedet/ecb),比较易用。但是还未试用。
IDE两篇文章,主要为了记录配置过程!
1, 添加load-path
(add-to-list 'load-path "~/.emacs.d/lisp/"
2, 安装emacs, python
$sudo apt-get install emacs
$sudo apt-get install python
3,安装yasnippet
下载地址
解压后,将文件yasnippet.el,以及文件夹snippets分别复制到目录~/.emacs.d/lisp/,~/.emacs.d/lisp/yasnippet中
$cp yasnippet ~/.emacs.d/lisp/
$move snippets ~/.emacs.d/lisp/yasnippet/
配置~/.emacs,添加如下配置信息
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; yasnippet ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'yasnippet) (yas/initialize) (yas/load-directory "~/.emacs.d/lisp/yasnippet/snippets")
4,rope,pymacs,ropemode,ropemacs
rope下载地址,pymacs下载地址,ropemode下载地址,ropemacs下载地址
1> 解压并安装rope:
$sudo python setup.py install
安装成功后,将会在/usr/local/lib/python2.7/dist-packages 出现与rope相关得文件信息(python2.7为本机python版本号)
2> 解压,安装,配置pymacs
$make install $sudo python setup.py install配置~/.emacs,添加如下配置信息
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 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)
3> 解压并安装ropemode
$sudo python setup.py install
4> 解压,安装,配置ropemacs
$sudo python setup.py install配置~/.emacs,添加如下配置信息
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; repomacs ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (pymacs-load "ropemacs" "rope-") (setq ropemacs-enable-autoimport t
5,auto-complete
下载地址
配置~/.emacs,添加如下配置信息
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; auto-complete ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (add-to-list 'load-path "~/.emacs.d/lisp/auto-complete-1.3.1") (require 'auto-complete) (require 'auto-complete-config) (add-to-list 'ac-dictionary-directories "~/.emacs.d/lisp/auto-complete-1.3.1/dict") (ac-config-default) (global-auto-complete-mode t) ;(setq-default ac-sources '(ac-source-words-in-same-mode-buffers)) (setq-default ac-sources '(ac-source-yasnippet ac-source-semantic ac-source-ropemacs ac-source-imenu ac-source-words-in-buffer ac-source-dictionary ac-source-abbrev ac-source-words-in-buffer ac-source-files-in-current-dir ac-source-filename)) (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))) ;;下面这句是从auto-complete-config.el中翻出来的 ;;加上这句,在python中输入类的 . 就可以提示里面的方法了 (add-hook 'python-mode-hook (lambda () (add-to-list 'ac-omni-completion-sources (cons "\\." '(ac-source-ropemacs))) )) (set-face-background 'ac-candidate-face "lightgray") (set-face-underline 'ac-candidate-face "darkgray") (set-face-background 'ac-selection-face "steelblue") (setq ac-auto-start 2) (setq ac-dwim t)
6,pycomplete(pycomplete.py,pycomplete.el,python-mode.el)
pycomplete.py下载地址,pycomplete.el下载地址,python-mode.el下载地址
1> 将pycomplete.el,python-mode.el复制到~/.emacs.d/lisp/
中
2> 将pycomplete.py复制到 /usr/local/lib/python2.7/dist-packages/ 中
3>
配置~/.emacs,添加如下配置信息
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;pycomplete ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'pycomplete) (setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist)) (setq interpreter-mode-alist(cons '("python2.7" . python-mode) interpreter-mode-alist)) (setq py-python-command "python2.7") ;;这是我指定pythyon版本 (autoload 'python-mode "python-mode" "Python editing mode." t)
7,cedete
下载地址
配置~/.emacs,添加如下配置信息
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Cedet 1.0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (load-file "~/.emacs.d/lisp/cedet-1.0.1/common/cedet.el") (global-ede-mode 1) ; Enable the Project management system (semantic-load-enable-code-helpers) ; Enable prototype help and smart completion (global-srecode-minor-mode 1) ; Enable template insertion menu
8,ecb
下载地址
配置~/.emacs,添加如下配置信息
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ECB 2.40 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (add-to-list 'load-path "~/.emacs.d/lisp/ecb-2.40") (require 'ecb) (require 'ecb-autoloads) ;; 窗口间切换 (global-set-key [M-left] 'windmove-left) (global-set-key [M-right] 'windmove-right) (global-set-key [M-up] 'windmove-up) (global-set-key [M-down] 'windmove-down) ;; show or hide window (global-set-key [C-f1] 'ecb-hide-ecb-windows) (global-set-key [C-f2] 'ecb-show-ecb-windows) ;; 使某一ecb窗口最大化 (global-set-key (kbd "C-c 1") 'ecb-maximize-window-directories) (global-set-key (kbd "C-c 2") 'ecb-maximize-window-sources) (global-set-key (kbd "C-c 3") 'ecb-maximize-window-methods) (global-set-key (kbd "C-c 4") 'ecb-maximize-window-history) ;; 恢复原始窗口布局 (global-set-key (kbd "C-c 0") 'ecb-restore-default-window-sizes) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(ecb-layout-window-sizes nil) '(ecb-options-version "2.40")) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) (setq ecb-auto-activate t) ;;auto startup (setq ecb-tip-of-the-day nil) ;;turn off the tips
emacs-for-python:如此文所介绍,几乎把上面这些插件都集成起来了(除了pycomplete/cedet/ecb),比较易用。但是还未试用。
相关文章推荐
- Emacs下配置Python IDE环境
- Emacs as a Python IDE(转)
- Emacs as a powerful Python IDE
- How-to-configure-emacs-as-a-Python-IDE
- 【Emacs配置Python IDE】Configuring Emacs as a Python IDE
- 打造Emacs成为Python的IDE
- emacs作为python3.4 IDE的配置
- Emacs Python IDE win7 x64
- Emacs中打造强大的Python IDE
- Configuring Emacs as a Python IDE
- Emacs IDE for Python
- Emacs编辑器之Python与Perl的IDE环境配置
- Ubuntu14.04下配置Emacs的Python IDE环境
- emacs作为python2.7 IDE的配置
- Linux 下配置 Python IDE——Emacs
- Eclipse配置Python的IDE
- Python IDE
- centos6.5下Python IDE开发环境搭建
- ide of python in vim
- 在Ubuntu 16.04 LTS 下用Vim 打造自己的Python IDE 问题总结