48

A question about the editor, I am not sure how to briefly phrase the question so I could not find an answer

I have just moved from Eclipse to Android Studio on the Mac.

If in a layout file, I start typing android:au, assuming I want to choose autotext see screenshot enter image description here

How can I get the completion to go upto the "to" of "auto". So that I just have to type the T and then enter to choose autoText.

Since there are no options without the "to" I should be allowed to select it.

Please let me know if my explanation is not clear enough

Ryan Heitner
  • 13,119
  • 6
  • 77
  • 119
  • Related post - [IntelliJ IDEA 12 code completion without capitalisation](https://stackoverflow.com/q/14127381/465053) – RBT Aug 10 '18 at 10:09

4 Answers4

86

Intellij (Studio) parses the whole text to search for your input characters by default. If you type "Text", it should show "autoText" in the options by default. You don't have to configure anything for this behavior.

It will give preference to exact matches though, so if you type in "Text" with a capital T, you're more likely to get the correct result than typing "text" with a small t.

You can change these preferences in:

Settings(or Preferences in mac)->Editor->Code Completion

Anup Cowkur
  • 20,443
  • 6
  • 51
  • 84
  • 7
    In the version I'm running (2016.2.2), its under Settings->Editor->General->Code Completion. – Brent Larsen Aug 30 '16 at 15:27
  • 1
    For Android Studio 3, 'Case Sensitive Completion' option doesn't exist. Untick 'Match Case' checkbox will be the alternative solution. – sky91 Mar 06 '19 at 02:20
49

You can set 'Case sensitive completion' to 'None' in IDE Settings > Editor > Code Completion.

jonstaff
  • 2,672
  • 2
  • 19
  • 18
  • 7
    In Android Studio go for File > Settings >Editor > General >Code Completion and then select None for "Case Sensitive Completion" – Jigar Jul 11 '15 at 09:31
  • Or in both IDEA and Android Studio just press Ctrl+Alt+S and type "case" to access this option :) – AlexeyGorovoy Aug 13 '15 at 08:16
27

in Android studio open File----> Setting (Ctrl + Alt + S) you can use this shortcut

from Setting open Editor --->General --> Code Completion -- > change Case Sensitive Completion to None

look at image below

enter image description here

Mina Fawzy
  • 20,852
  • 17
  • 133
  • 156
5

make sure to disable "power save mode" in your File >> Power save mode.

user2936719
  • 165
  • 2
  • 10