如何删除 Eclipse 的 PyDev 插件中的尾随空格

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7744258/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 17:09:29  来源:igfitidea点击:

How to remove trailing whitespace in PyDev plugin for Eclipse

pythoneclipsepydev

提问by vinodkone

Ideally, eclipse should remove all trailing whitespace when I save the file. I know there is option for this in C++/Java plugins for eclipse, but I couldnt find one for PyDev. Is there one? If not, whats the easiest way to achieve this?

理想情况下,eclipse 应该在我保存文件时删除所有尾随空格。我知道在用于 Eclipse 的 C++/Java 插件中有此选项,但我找不到用于 PyDev 的选项。有吗?如果没有,实现这一目标的最简单方法是什么?

回答by TorelTwiddler

Check in:

报到:

Preferences > PyDev > Editor > Code Style > Code Formatter

首选项 > PyDev > 编辑器 > 代码样式 > 代码格式化程序

and check the "Right trim lines?" check box.

并检查“正确的修剪线?” 复选框。

回答by LPunker

i stumbled accros this usefull [site][1]

我偶然发现了这个有用的 [站点][1]

[1]: http://andrei.gmxhome.de/anyedit/hope this could help

[1]:http: //andrei.gmxhome.de/anyedit/希望这会有所帮助