Eclipse 开发设置 pydev 配置

发布时间: 更新时间: 总字数:378 阅读时间:1m 作者:IP:上海 网址

使用 Eclipse 开发,字符集和 tab 键是空格等问题经常困扰开发中,特别是在 windows 和 linux 切换时,进程会因为文件格式导致问题,如文件 bom 格式。本文中重点介绍 eclipse 调优和 pydev 设置。

Eclipse 更改默认字符集 设置 UTF-8 Unix

  1. 打开选项:Window -> Preferences -> General -> Workspace;

  2. 在右侧 Text file encoding 选择 Other,改变为 UTF-8

Eclipse 工作空间 Workspace 更改文本编码 Text file encoding 为 UTF-8

Eclipse 设置软 tab

用 4 个空格字符代替

  1. 打开选项:General -> Editors -> Text Editors

  2. 在右侧找到 Displayed tab width: 把下面的“Insert spaces for tabs”勾选上。

Eclipse 文本编辑器 Text Editors 设置软 Tab 为空格

针对 java 文件配置 softtab

  1. 打开选项:General -> Editors -> Java -> Code Style -> Formatter,然后点击 Active profile 中的 Edit 按钮,如下图:

Eclipse Java 代码格式化 Formatter Profile 编辑入口

Eclipse Java 格式化设置 Tab policy 为 Spaces only 软 Tab

在弹出的窗口中,选择 General settings 中的 Tab policy 为 Spaces only,修改 Profile name 然后保存即可

Eclipse pydev 配置

在部署使用 eclipse 配置 Python 开发环境是,时长遇到 eclipse 版本与 pydev 不一致的问题,本文章主要介绍他们之间的对应关系。

Need to use older Eclipse/Java

If you need to use an older version of Eclipse/Java, below is the latest PyDev version to be used based on your requisites.

text
Eclipse 4.5, Java 8: PyDev 5.2.0
Eclipse 3.8, Java 7: PyDev 4.5.5
Eclipse 3.x, Java 6: PyDev 2.8.2

ref

http://www.pydev.org/download.html