nz_21
nz_21

Reputation: 7343

Intellij shortuct to create a line between two lines?

Say I have two lines

line 39: foo
line 40: bar 

My cursor is one line 39, and I want to write some stuff right below, moving the content of line 40 to line 41, like so:

line 39: foo
line 40: <cursor...>
line 41 bar 

So: Given that I'm initially on line 39, how do I move my cursor down to line 40, shifting everything on line 40 and beyond to one line below?

The manual way is to drag my cursor all the way the end of line 30, hit enter. But if line 30 is a big line, it takes time to do this.

Upvotes: 0

Views: 98

Answers (2)

Yevgen
Yevgen

Reputation: 1667

There are numerous ways to achieve this (from obvious End then Enter combo to IdeaVim's o), but the Intellij's way to do it would be Shift + Enter hotkey.

The shortcut is called Start New Line in Editor's Action keymap and can be changed to your preference.

Upvotes: 1

Related Questions