Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
10e0a956
提交
10e0a956
authored
3月 07, 2012
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added doc on how to configure emacs for pep8/python syntax check.
上级
6800a4ff
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
42 行增加
和
1 行删除
+42
-1
dev_start_guide.txt
doc/dev_start_guide.txt
+42
-1
没有找到文件。
doc/dev_start_guide.txt
浏览文件 @
10e0a956
...
...
@@ -317,7 +317,48 @@ bindings to work only on Python files.
Emacs
~~~~~
WRITEME
There is an **execellent** system to configure emacs for python:
`emacs-for-python
<https://github.com/gabrielelanaro/emacs-for-python>`_. It gatter many
emacs config into one and modify them to behave together nicely. You
can use it to check for pep8 compliance and for python syntax errors.
To install it on linux, you can do like this:
.. code-block:: bash
cd
git clone https://github.com/gabrielelanaro/emacs-for-python.git .emacs.d/emacs-for-python
Then in your ``~/.emacs`` file, add this:
.. code-block:: bash
;; Mandatory
(load-file "~/.emacs.d/emacs-for-python/epy-init.el")
(add-to-list 'load-path "~/.emacs.d/emacs-for-python/") ;; tell where to load the various files
;; Each of them enable different part of the system
;; only the 2 first are needed for pep8, syntax check.
(require 'epy-setup) ;; It will setup other loads, it is required!
(require 'epy-python) ;; If you want the python facilities [optional]
(require 'epy-completion) ;; If you want the autocompletion settings [optional]
(require 'epy-editing) ;; For configurations related to editing [optional]
;; define f10 to previous error
;; define f11 to next error
(require 'epy-bindings) ;; For my suggested keybindings [optional]
;; some shortcut that don't collide with gnome-terminal
;; otherwise, "epy-bindings" define f10 and f11 for them.
(global-set-key [f2] 'flymake-goto-prev-error)
(global-set-key [f3] 'flymake-goto-next-error)
;; next two lines are the checks to do. You can add more if you wish
(epy-setup-checker "pyflakes %f") ;; for python syntax check
(epy-setup-checker "pep8 %f") ;; for pep8 check
Unit tests
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论