2

I'm working with pydev on eclipse, and I'm wondering if there is a way to circumvent the indentation, or at least quickly edit indentation in files.

For example, if I make a handful of methods, but then want to put them under a class umbrella, is there an easy way of doing this in terms of indentation, or do I need to go through them line by line?

4

2 回答 2

3

突出显示所有代码并使用Taband Shift+ Tab

编辑:您还可以突出显示代码,右键单击选择,然后选择Shift+►</kbd> (or to unindent, Shift+◄</kbd>).

于 2012-12-05T02:55:50.150 回答
1

我不知道 pydev 的行为如何,但我使用 spyder 已经有一段时间了,我可以选择未缩进/过度缩进的代码块的所有行,然后按 Tab/Shift+Tab 来添加/删除缩进。这甚至可以通过编辑菜单中的缩进/取消缩进选项来完成。

如果您不了解 Spyder,我建议您尝试一下! http://code.google.com/p/spyderlib/

于 2012-12-05T02:57:10.013 回答