Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent Android Studio autocomplete removing adjacent token

If I'm editing an existing line of code in Android Studio, and accept an autocomplete, the following token to the right of the cursor gets eaten:

enter image description here

Is there a way to disable this behaviour, keeping both the autocomplete plus the rest of the line?

like image 427
brk3 Avatar asked Apr 25 '14 22:04

brk3


People also ask

How to disable autofill in Android Studio?

Users can enable or disable autofill as well as change the autofill service by navigating to Settings > System > Languages & input > Advanced > Input assistance > Autofill service.

How to enable auto suggestion in Android Studio?

if the autocomplete isn't working for you in Android Studio, just press File and uncheck the Power save mode, it should work fine after that. if power save mode is already unchecked then first check then uncheck them.

How do I set autocomplete text on Android?

If you want to get suggestions , when you type in an editable text field , you can do this via AutoCompleteTextView. It provides suggestions automatically when the user is typing. The list of suggestions is displayed in a drop down menu from which the user can choose an item to replace the content of the edit box with.


1 Answers

If you press "Enter" it just pastes in the autocomplete, if you press "Tab" it replaces it. I would guess you are always pressing "Tab", so try "Enter" and see if you like how that works.

Full Documentation from JetBrains

Here's the TLDR;

  1. Use Enter to insert the selected string at the insertion point.
  2. Use Tab to replace the string next to the caret with the selected one.
  3. Use Ctrl+Shift+Enter to make the current code construct syntactically correct (balance parentheses, add missing braces and semicolons, etc.)
like image 165
Cory Roy Avatar answered Oct 14 '22 00:10

Cory Roy