自动完成的IntelliJ逃生 [英] IntelliJ autocomplete escape

查看:80
本文介绍了自动完成的IntelliJ逃生的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想出来的IntelliJ并有一个小麻烦,我无法弄清楚是否有在的IntelliJ一个可能的解决方案。在Eclipse甚至TextMate中(以及许多其他的编辑与自动完成),如果你是在自动完成节中段,如字符串或括号区域,您可以按Enter或Tab以获得该部分的结尾。例如:

I'm trying out IntelliJ and have one minor annoyance that I can't figure out if there is a possible solution for in IntelliJ. In Eclipse and even TextMate (as well as many other editors with autocomplete), if you are in the middle of an autocomplete section such as a string or parenthesis area, you can hit Enter or Tab to get to the end of that section. For instance:

if (blah.equals(something.toString()))

尖将在部分的toString的括号中间。在的IntelliJ,您可以通过这些括号没有问题类型,或者你可以或许点击结束键进入它的结束。一个是小麻烦,另一种是比较讨厌的,因为我得把我的手离开家行。在Eclipse中,我可以敲回车键,它会救我出这... TextMate的,标签的。

The caret would be in the middle of the parenthesis of the toString part. In IntelliJ, you can type through those parenthesis with no issue, or you could maybe hit the "End" key to get to the end of it. One is a minor annoyance, the other is more annoying since I have to take my hands off of the home row. In eclipse I could hit the Enter key and it would get me out of this... TextMate, Tab.

有一个设置我可以调整或东西我可以做给我类似的功能在的IntelliJ?

Is there a setting I can tweak or something I can do to give me similar functionality in IntelliJ?

推荐答案

在这种情况下,如果你preSS <大骨节病>按Ctrl-Shift键,输入疯狂codeR建议,你种得到这种行为。这将增加括号,并把光标放在下一行。您也可以preSS <大骨节病>按住Shift键并输入这将让你到下一行,使有关code少的假设。 <大骨节病>按Ctrl-Shift键,输入行为有所不同取决于code是在看,所以不会给你一致的行为。例如在它把你在该行的末端,一个字符串的中间增加分号

In that context if you press Ctrl-Shift-Enter as CrazyCoder suggests, you kind of get this behavior. It will add the braces and put your cursor on the next line. You can also press Shift-Enter which will put you to the next line and makes less assumptions about the code. Ctrl-Shift-Enter behaves differently depending on the code it is looking at, so that won't give you consistent behavior. For example in the middle of a string it puts you at the end of the line and adds a semi-colon.

这似乎只是到底是preferred关键在这里站上罚球线的末端。您可以在关键的地图添加额外的键转到该行的末尾,如果一个不同的组合键为你工作好,但它不仅将改变它的行为,因为你是在括号中间。

It just seems that end is preferred key here to get to the end of the line. You can add in the key map an additional key to go to the end of the line, if a different key combination works better for you, but it won't just change its behavior because you are in the middle of a parentheses.

综观IDEA选项,似乎括号的行为是不是真的像自动创建一个for循环动态模板,让你不卡了,当你完成,而这仅仅是自动完成的括号你,并智能识别,你可能想,如果它没有流畅地输入。

Looking at the IDEA options, it seems that the parentheses behavior isn't really a live template like automatically creating a for loop, so you don't tab out when you are done, rather it is just automatically complete the parentheses for you, and intelligently recognizing that you may want to type fluidly as if it didn't.

这篇关于自动完成的IntelliJ逃生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆