简体   繁体   English

Intellij IDEA:相当于Eclipse的“完整当前声明”(Ctrl + Shift + Enter)?

[英]Intellij IDEA: equivalent of Eclipse's “Complete Current Statement” (Ctrl+Shift+Enter)?

I've been using Intellij IDEA, now switched to Eclipse. 我一直在使用Intellij IDEA,现在转向Eclipse。 And I'm looking for an alternative for Ctrl + Shift + Enter in Eclipse which completes the current statement by putting semicolon and goes to the next line. 而且我正在寻找Eclipse中Ctrl + Shift + Enter的替代方法,它通过输入分号来完成当前语句并转到下一行。 However, when I use this shortcut in Eclipse it goes to the upper line. 但是,当我在Eclipse中使用此快捷方式时,它会转到上一行。 How can I change the settings to match with Intellij. 如何更改设置以与Intellij匹配。 I'm using Intellij key schema for Eclipse. 我正在使用Eclipse的Intellij密钥模式

Is this Feature present in Eclipse ( at least even as a plugin will be fine ) . 这个功能是否存在于Eclipse中(至少即使插件也没问题)。 I use Ctrl+Shift+enter in IntelliJ a lot . 我在IntelliJ中使用Ctrl + Shift +输入很多。 Some of the things it will do are 它会做的一些事情是

  1. if it is normal statement then it will format the current line and add semicolon ( also the cursor position will be end of the line ) 如果它是正常语句那么它将格式化当前行并添加分号(光标位置也将是行的结尾)
  2. if it is a loop/conditional like for,if etc 如果它是一个循环/条件喜欢,如果等
    if -> if ([cursor position]) { } -> if() { [cursor position]} [ -> means ctrl + shift + enter command ] if - > if([cursor position]){} - > if(){[cursor position]} [ - >表示ctrl + shift + enter command]
  3. If statement is already completed then it will format the current line and goes to next line indented position. 如果语句已经完成,那么它将格式化当前行并转到下一行缩进位置。

people might think these things are very trivial/not important but only when you try to use this you will find how useful this small feature will be and how much you miss in eclipse . 人们可能会认为这些事情非常重要/不重要,但只有当你尝试使用它时,你会发现这个小功能有多么有用,你在eclipse中错过了多少。

Found an equivalent plugin for eclipse here 在这里找到了一个等效的eclipse插件

https://marketplace.eclipse.org/content/complete-current-statement-eclipse https://marketplace.eclipse.org/content/complete-current-statement-eclipse

Only issue I found so far is that it does not obey the code formatting rules. 到目前为止我发现的唯一问题是它不遵守代码格式规则。 (I like placing curly braces on new line for if statements). (我喜欢在if语句的新行上放置大括号)。 Otherwise seems to be similar to the IntelliJ version. 否则似乎与IntelliJ版本类似。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在IntelliJ IDEA中Eclipse的Ctrl + H快捷方式是什么 - What is Eclipse's Ctrl+H shortcut equivalent in IntelliJ IDEA 如何导航到 IntelliJ 中的类型? 或者什么相当于 Eclipse 的 Ctrl + Shift + T? - How to navigate to a Type in IntelliJ? or what is the equivalent to Eclipse's Ctrl + Shift + T? IntelliJ IDEA 中 Eclipse 的 Ctrl+O(显示大纲)快捷键是什么? - What is Eclipse's Ctrl+O (Show Outline) shortcut equivalent in IntelliJ IDEA? 在Eclipse中改变IntelliJ IDEA中Ctrl + Shift + Left / Right的行为 - Changing behavior of Ctrl+Shift+Left/Right in IntelliJ IDEA like in Eclipse 在IntelliJ中,有没有更简单的方法来设置“ eclipse”这样的“ Complete Current Statement”? - In IntelliJ is there an easier way to set up the “Complete Current Statement” like eclipse? IntelliJ IDEA是否具有“Ctrl”+“K”,“Ctrl”+“D”等效? - Does IntelliJ IDEA have a `Ctrl` + `K`, `Ctrl` + `D` equivalent? Eclipse中IntelliJ IDEA的“启动前:”运行/调试配置功能等同于什么? - What's the equivalent of IntelliJ IDEA's Run/Debug Configurations “Before launch:” feature in Eclipse? IntelliJ IDEA检查像Eclipse(Cmd-Shift-I)这样的变量 - IntelliJ IDEA inspect variable like Eclipse (Cmd-Shift-I) 完整的当前语句在 IntelliJ 中的 Scala 中的行为不同 - Complete Current Statement behaves differently in Scala in IntelliJ IntelliJ IDEA 中的 Ctrl-tab - Ctrl-tab in IntelliJ IDEA
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM