Search code examples
androidandroid-studiokeyboard-shortcutsautocorrect

android studio ctrl space replace class names glitch


I like to use Ctrl+Space to find suggestions to replace names. I used it in Eclipse. And now I am using it in Android Studio. The Android Studio version is not working as I want it to. Say I have a class called ILoveCats. But for whatever reason I have it misspelled as ILoveHats. If I place the cursor between I and L and press Ctrl+Space, sure enough it will show the correct ILoveCats. But then if I click Enter it replaces ILoveHats with ILoveCatsLoveHats. Is there a place where I can set this to behave properly: so it shows ILoveCats upon replacement?


Solution

  • After you have the suggestions open with Ctrl + Space you should be using Tab instead of Enter. Tab inserts and overwrites while Enter just inserts.