Move the text cursor to the previous line when I am in the left corner of the current line

Is it possible that in IntelliJ IDEA move the cursor to the previous line when it is in the left corner of the current line, and I press the left arrow key.

Let me explain:

1) Text cursor in the left corner of line 4

First state

2) I press the left arrow key

Second state

3) All I want to get is move the text cursor to the end of the previous (3) line

Third state

But IDEA does not move the text cursor from the previous line, it just stays there.

Help me please.

+6
source share
1 answer

This is because, by default, IntelliJ allows you to place a caret after the end of a line. When you press the key, it does not move, since it will need to go to the infinite right side of your file, which is not very convenient (at least as I understand it: p).

Go to Settings > Editor and uncheck Allow placement of caret after end of line , this will solve your problem.

+6
source

All Articles