Elliot
Elliot

Reputation: 545

How to stop Android Studio from indenting next line after single line comment

This is driving me nuts. I just want to write a series of // single line comments aligned on the same column but when I hit the enter key Android studio auto-indents and I get the following:

//Todo do need to determine next fragment to navigate to
    //

Instead of:

//Todo do need to determine next fragment to navigate to
//

It also injects a tab instead of spaces so that the backspace key brings me back to the end of the previous line.

I can't find anything in settings. Thanks

Upvotes: 2

Views: 1336

Answers (1)

struct_overgrow
struct_overgrow

Reputation: 1

Seems the options are in:

File -> Settings -> CodeStyle -> C/C++ ->

Uncheck these options:

[ ] Use Tab Character

[ ] Keep Indents on Empty Lines

Then [Apply] then [OK]

In my case, I even have to Exit/Re-enter Android Studio, in order for the changes to take effect (I believe it's a bug).

And also, placing Settings, under File menu, is NOT quite trivial for me (at least in my other IDE apps).

Upvotes: 0

Related Questions