简体   繁体   English

emacs中多行python语句的错误缩进

[英]wrong indentation of multi-line python statement in emacs

Using Tab, I can only indent the code in the style like this: 使用Tab,我只能以这种样式缩进代码:

for ave, sd, dG, seq_pair in zip(open(predictedAve), open(predictedSD),
open(dG), open(dynLis)):

instead of this: 代替这个:

for ave, sd, dG, seq_pair in zip(open(predictedAve), open(predictedSD),
                                 open(dG), open(dynLis)):

The former style is ugly. 前者风格丑陋。 And what's worse, it will make the indentation of statements inside the for loop impossible. 更糟糕的是,它将使for循环内的语句无法缩进。 How can I achieve the latter indentation by Tabs in emacs? 如何通过emacs中的Tabs实现后者的缩进?

您可以检查是否启用了python-mode

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

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