views:

74

answers:

2

Is there a keyboard shortcut to start a new line on the currently selected line?

I.e. The current line goes down one line and the cursor is on a blank line.

There is Shift + Enter which starts a new line but on the next line. I want the current line.

A: 

Do not think anything exists in version IntelliJ 8 or 9 for that matter. Prove me wrong.

JavaRocky
+1  A: 

There isn't one, but you can very easily create it using a macro. In order to create the macro you can follow these steps:

  1. Place the cursor on any line with code.
  2. Click on menu Tools | Start Macro Recording
  3. Press: Home -> Enter -> Up
  4. Click on menu Tools | Stop Macro Recording
  5. Test your macro using Tools | Playback Last Macro
  6. You can remove any action from the macro that doesn't belong there by using Tools | Edit Macros.
  7. When the macro is working fine you can assign a shortcut to it in the Settings window on the Keymap page.
Hugo Palma

related questions