我正在尝试使用 python-mode.el 配置 emacs。我做了很多研究,尽管我还是新手,因为我不确定如何配置所有内容。我使用了以下资源,它们很有帮助:
- Why I chose python-mode.el: http://www.emacswiki.org/emacs/PythonProgrammingInEmacs
- General emacs modes info: https://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html#Choosing-Modes
- Andrea Crotti explains his setup: http://www.youtube.com/watch?v=0cZ7szFuz18
- Andrea's configuration instructions via README.md
- Andrea's init.el file
- Jedi Repository
- Python 2.7 installed via Enthought Canopy
- Downloaded python-mode.el here
我一直在设置使用 Andrea 的方法,我相信我有资源,但我仍然有疑问:
- 我有一个
.emacs文件,我知道要删除它。我应该将我的.emacs文件的内容迁移到新文件~/.emacs.d/init.el下吗? - 由于我打算使用 Andrea 的
init.el文件,我是否应该将它与我旧的.emacs文件中的内容添加到一个init.el 中文件? - 我在
~\.emacs.d\python-mode.el-6.1.2下提取了 python-mode .tar.gz 文件。这是正确的,还是我应该使用像 ELPA 这样的包管理器? - 从 Andrea 的
README.md,我可以通过pip install jedi epc pylint安装 Jedi。我应该在哪里克隆 Jedi 存储库,我应该在哪里运行pip install jedi epc pylint? - 我在
C:\Users\Lucas\AppData\Local\Enthought\Canopy\User下安装了 Enthought 的 Canopy python 2.7,其中有python.exe和libs(包含我需要的所有库),但我不确定这个位置将来是否会给我带来问题。我应该在C:\下重新安装 python 2.7 吗?
我使用的是 Emacs 24.3 版 操作系统:Windows 7
请您参考如下方法:
I have a .emacs file, which I know to remove. Should I migrate the contents of my .emacs file under a new file, ~/.emacs.d/init.el? Since I plan to use Andrea's init.el file, should I add it with the contents from my old .emacs file into a single init.el file?
您不需要。但我建议你这样做。你也不需要将你的 config 添加到 Andrea 的 init.el,你可以在一个单独的文件中说 ~/.emacs.d/my- config.el,然后通过将 (load "~/.emacs.d/my-config.el") 从 init.el 加载到Andrea 的 init.el。
I extracted the python-mode .tar.gz file under ~.emacs.d\python-mode.el-6.1.2. Is this correct, or should I use a package manager like ELPA?
我怀疑你是否需要这个,因为 Andrea 的配置已经安装了 python-mode。
From Andrea's README.md, I can install Jedi via pip install jedi epc pylint. Where should I clone the Jedi repository, and where should I run pip install jedi epc pylint?
您不需要克隆 Jedi 存储库。您可以从任意位置运行 pip install jedi epc pylint。
I have Enthought's Canopy python 2.7 installed under C:\Users\Lucas\AppData\Local\Enthought\Canopy\User, which has python.exe along with libs(with all the libraries I'll need), but I am not sure if this location will cause me problems in the future. Should I re-install python 2.7 under C:\?
只要 C:\Users\Lucas\AppData\Local\Enthought\Canopy\User 如果在您的路径中,这应该可以正常工作。
