简体   繁体   English

在Spyder IDE中格式化python代码

[英]Format python code in Spyder IDE

Can anyone please advice the key combination to format python code in annaconda/Spyder IDE? 谁能建议在annaconda / Spyder IDE中格式化python代码的组合键吗? In Eclipse IDE when coding in Java I usually use command F, however in Spyder IDEthe key combination causes search window to pop up. 在Eclipse IDE中,当我使用Java进行编码时,通常使用命令F,但是在Spyder IDE中,组合键会导致搜索窗口弹出。

I tried this 我试过了

Source -> Fix Indentation, Remove Trailing Spaces 源->修复缩进,删除尾随空格

This is not the most efficient way, but it seems there are no key combinations to do these. 这不是最有效的方法,但是似乎没有任何组合键可以执行这些操作。 Even in preferences, they have not allowed to add new shortcut for this. 即使在首选项中,他们也不允许为此添加新的快捷方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM