将Eclipse选项卡更改为Emacs正确缩进行 [英] Change Eclipse tab to correctly indent line as Emacs does
问题描述
在Emacs中,当我在一行中的任何位置点击标签时,该行将正确缩进(或至少为模式设置)。当我再次点击标签时,它将返回到下一个块。编程Python时,这真的很有帮助,因为关闭块是通过降低缩进级别完成的。
In Emacs when I hit tab anywhere on a line, the line will indent correctly (or at least to the mode settings). When I hit tab again it will move back to the next block. When programming Python this really helps since closing a block is done by lowering the indention level.
有没有办法配置Eclipse来做同样的事情?
Is there a way to configure Eclipse to do the same?
目前,我必须删除领先的空格,然后点击标签。
Currently, I have to erase the leading white space then hit tab.
这个问题是重新发布超级用户问题
推荐答案
尝试ctrl-i(osx上的Cmd-i)缩进eclipse中的当前行或选择(如果您使用默认键绑定而不是emacs )。或者,如果您想要一个不同的键绑定,请转到外观>常规>键,并将正确缩进
的绑定更改为您选择的键
Try ctrl-i (Cmd-i on osx) to indent the current line or a selection inside eclipse (if you're using default key binds as opposed to emacs). Or, if you want a different key bind, go to Appearances > General > Keys and change the bind for Correct Indentation
to key(s) of your choice
这篇关于将Eclipse选项卡更改为Emacs正确缩进行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!