【发布时间】:2012-07-17 21:00:05
【问题描述】:
使用Tab,我只能缩进如下样式的代码:
for ave, sd, dG, seq_pair in zip(open(predictedAve), open(predictedSD),
open(dG), open(dynLis)):
而不是这个:
for ave, sd, dG, seq_pair in zip(open(predictedAve), open(predictedSD),
open(dG), open(dynLis)):
前一种风格很丑。更糟糕的是,它会使for 循环内的语句缩进变得不可能。如何在 emacs 中通过 Tabs 实现后一种缩进?
【问题讨论】:
-
你使用的是什么版本的 Emacs 和什么 python 模式?我尝试使用
emacs -Q运行 Emacs 24.1,粘贴您的第一个代码块,移动到第二行并按 Tab。第二个块中缩进的代码就是结果。你得到了什么?
标签: python emacs tabs indentation multiline