Auto-detect newline in Eclipse - how to disable?

This seems to be a question with a question, because I know what the corrent answer should be for setting the indentation for Java code in Eclipse (Windows -> Preferences -> Java -> Code Style -> Formatter), but I can't find exactly the option that leads to the following behavior that I want to disable.

Problem: every time I press Enter after some text in a line, the editor does not move the text cursor at the beginning of the previous line, but adds one level of indentation. How can this be disabled in indigo? I need each new line to start at the position from which the original line starts. I tried many controls in the formatting settings - so far nothing has helped. Maybe I missed something.

+7
source share
1 answer

I found this: Settings -> Java -> Editor -> Enter, the Enter key check box , will adjust the indent on a new line . (This tab provides the editor with additional intelligence, in addition to formatting, and works on the fly. It may be useful to configure some of these options depending on the practice of personal coding.)

Unfortunately, when this check box is disabled, the editor stops adding paired curly braces, even if the Automatically paste options in the correct position: curly braces and Automatically close {Braces} are both enabled. I do not understand why the indent parameter affects curly braces and actually disables this very convenient mode.

PS Intelligent Insert Mode is on.

+11
source

All Articles