删除 PYDEV 中的缩进
我正在使用 pydev 进行 python 开发。我在删除语句块的缩进时遇到问题。
如果我必须添加缩进,我会按 SHIFT + 向下 箭头键,直到到达要缩进的语句块的末尾,然后按 TAB 键。这就是我过去添加的方式一步缩进一组语句。
我现在面临的问题是在一步中删除语句块的缩进。例如,我有一个 for 循环,并且在该 for 循环中有一个语句块。现在我不想再有 for 循环,并且想删除 for 循环语句块下面的缩进。目前,我将遍历每一行并按退格键删除缩进。有没有简单的方法可以对整个语句块执行此操作?
I am using pydev for python development. I am facing issue while removing indentation for a block of statement.
If I have to add indentation I used to press SHIFT + down arrow key until I reach the end of block of statements which I want to indent and then press the TAB key.This is how i used to add indent for a block of statements in one step.
The issue now I am facing is to remove indent in one step for a block of statement.For example I have a for loop and i have a block of statement with in that for loop. Now I dont want to have the for loop any more and want to remove the indent underlying the for loop statement block. At present I am going each line and press backspace to remove that indentation. Is there any easy way to do this for the entire statement block?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不了解 Pydev,但在大多数编辑器中 Shift+Tab 就可以了。
I don't know Pydev, but in most editors Shift+Tab will do the trick.
来自 pydev.org,他们的页面:
Block indent (and dedent) Tab / Shift-Tab
Smart indent (and dedent) Enter / Backspace
From pydev.org, their page:
Block indent (and dedent) Tab / Shift-Tab
Smart indent (and dedent) Enter / Backspace