Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove auto-formatting from Android Studio?

I would like to know how to turn off Android Studio's auto-formatting?

For some reason blank lines are always devoid of tabs or spaces, regardless of the scope or what so ever. Even if I manually place tabs in there, in a few moments they are gone. Its so annoying I always have to always press tab before writing code. It may be possible that this could be happing because I am using an older version of the program. But I am even unable to upgrade (a problem for another day, not today). So if anyone has a solution to this please share? Thanks in advance.

like image 515
user3892644 Avatar asked Oct 30 '15 07:10

user3892644


People also ask

How to disable auto format code in Android Studio?

You can change the formatting style under File>Settings>Editor>Code Style>Languages .

How do I turn off auto format in Intellij?

In the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Editor | Code Style. Switch to the Formatter tab and enable the Turn formatter on/off with markers in code comments option.

How can I get beautify code in Android?

Navigate to the file in which we have to format our code and then click on the shortcut key as Ctrl+Shift+Alt+L after clicking this key you will get to see the below dialog on your screen. Select the formatting options and your code will be formatted and rearranged according to selected options.

How do I turn off auto indent in Pycharm?

Just go to File>Setting>Save Actions and turn off all actions. Hit apply and you are good to go. See the picture for more info.


2 Answers

You can turn off most of the meddling with your text formatting in the menu...

Settings->Editor->General->Smart Keys

...and then untick as many things as possible.

I have not found a simple 'Just leave what I type alone' option.

like image 177
Andy Krouwel Avatar answered Sep 24 '22 01:09

Andy Krouwel


You can change the formatting style under File>Settings>Editor>Code Style>Languages.

Edit:

enter image description hereClick on the Language you want to change the formatting. You can see the the different tab to to change the spaces and lines.

Note:screen shot taken on Android Studio 1.4

like image 20
Sanjeet A Avatar answered Sep 25 '22 01:09

Sanjeet A