Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse's Ctrl+1 in IntelliJ and Android Studio

I really like the Ctrl+1 shortcut (hints for errors and mini refactorings) in Eclipse. Is there an equivalent for it in IntelliJ and Android Studio?

like image 386
Andreas Köberle Avatar asked Aug 08 '11 12:08

Andreas Köberle


People also ask

Can we use Eclipse shortcuts in IntelliJ?

IntelliJ IDEA automatically suggests a predefined keymap based on your environment. Make sure that it matches the OS you are using or select the one that matches shortcuts from another IDE or editor you are used to (for example, Eclipse or NetBeans).

What does Ctrl k do in Eclipse?

In Eclipse, if the cursor is over a word and you press Ctrl + K you will jump to the next occurrence of that word in the file.

How do I act like an Eclipse in IntelliJ?

If you want to mimic the Eclipse behavior, you can invoke the Build Project action Ctrl+F9 - it will save the changed files and compile them. You can also enable the Build project save action in Settings/Preferences | Tools | Actions on Save.

Can we import Eclipse project in IntelliJ?

IntelliJ IDEA automatically detects Eclipse projects located on your computer and places them in the dedicated node right on the Welcome screen. This node will be available among the recent projects until you decide to remove it. When the Eclipse project is in the node, just click it to quickly open it in the IDE.


2 Answers

Alt+Enter

like image 167
CrazyCoder Avatar answered Oct 13 '22 05:10

CrazyCoder


Personally I don't think AltEnter is particularly correct. Ctrl1 does lots of code generation like generating local variables given a method call etc.

CtrlAltV ... generates a local variable

CtrlAltF ... generate a field

AltInsert ... generate (drop down menu to generate all sorts)

Now, unrelated to the question but maybe helpful and in the same ball park is that the "foreach" short cut in IntelliJ is iter rather than for.

like image 42
Rob Bygrave Avatar answered Oct 13 '22 05:10

Rob Bygrave