Jumping out of string keyboard shortcut for Android Studio - android-studio

While we are typing a string is there any way, except pressing right arrow button, to go out of double quotation in Android studio or intellij-idea(for example a kind of shortcut or something)
If it inserts a comma and goes to next empty field it would be better also.
for example:
Log.i("stingLogName|") ==> Log.i("stingLogName", |)
(i've shown blinking cursor with |)

You can achieve this in Android Studio (and of course in intelij) with Live Templates.
But you can move from field to field with Tab button (default) or if you want Space or Enter by selecting it in the Live Templates settings.
Usage:
Open Android Studio and place the cursor inside a statment (the OnCreate method for example)
Type logi and press Tab ( or type Ctrl+J and select an element from the list)
You can find more information here IntelliJ Live Templates
Hope it helps

Related

IntelliJ (Android Studio) Feature similar to IntelliSense Toggle Completion Mode in VS/SSMS

In Microsoft IDEs there's the option to Toggle the Completion Mode, which means that it will automatically select the top result if you click . (Dot) or ;
Which is very intuitive and saves alot of clicks in the lifetime of the code writing process.
Is something similar possible in Android Studio ?
When I click Ctrl+Alt+Space it achieves exactly the desired result, but only for the currently typed expression, and then reverts to its old ways as soon as I move to the next line/expression.
Settings | Editor | General | Code Completion -> Insert selected variant by typing dot, space, etc.

How to copy the wrong hint when I use Android Studio 3.01?

I use Android Studio 3.01, it will display the wrong hint "Expecting member declaration" when there are some problem with my code.
But the text information of the wrong hint is hard to copy, it will be disappear immediately if the mouse is out of the hint area. I hardly to select the text of hint and click Copy item from Right-click menu.
Is there a simple way to do it? such as keyboard shortcuts.
Add Content
Many times that both the error hint and keyword hint are displayed simultaneously!
You may take a look to this question :
How to copy error message in Android Studio tooltip
which contain the answer:
Once popup shows up, move your mouse pointer over it and simply select (mark) bubble's text, then do Copy with keyboard shortcut (CTRL+C on Windows or Command+C on Mac) while still having mouse pointer over the bubble.

Android Studio - automatically write item from suggestions popup

In Android Studio I changed the tab key function from file > settings > keymap. I chose to remove all other bindings from tab key (mistake!!). And now I can't get auto-complete to work like before.
I want to select an item from the auto-complete pop-up then press tab to complete the word (I think this the default behaviour):
But when I press tab it "completes the sentence" and puts my cursor at the end of the line:
I don't want this, I want to just complete the word and the cursor to stay in place. This is my current configuration for tab:
How do I get the default behaviour back? I really don't want to reinstall Android Studio and it is driving me crazy.
--------------- edit ---------------
"Complete current statement" binding doesn't work:
Now when I press tab nothing happens, it doesn't auto complete at all.
Found the problem. Had to bind "Choose lookup item replace" to tab key to get the default / correct behaviour.

Android Studio autocomplete on special character (space, period, etc.) like in Visual Studio

Is it possible to enable autocompletion of the selected suggestion when entering special characters like in Visual Studio?
For example:
When typing 'MenuI' Android Studio suggests 'MenuInflater' that I can autocomplete by hitting TAB after which I type SPACE to separate my variable name.
In Visual Studio I can type SPACE directly (instead of TAB) to get the autocompletion plus my space character. This works for other special characters like period, brackets and so on, too.
Yes, I have also faced the same issue in Android studio. And finally I found it here.
Open the Android Studio settings go to Editor --> General --> Code Completion
and check the option "Insert selected variant by typing dot, space, etc."
And uncheck the options "Basic completion (Ctrl+Space)" and "Smart Type Completion (Ctrl+Shift+Space)"
Check this Android studio settings image
Well, this is implemented, slightly.
If you have MenuInflater and type in MenuI, and then CTRL+SPACE, which means you tell the IDE that you want to use the autocomplete dropdown, and then press space, it works as you wish.
So, I could type in MenuIn, then I could either press the down key, or use CTRL+SPACE ("MenuInflater" Should now be highlighted in blue:
), and then press space, and it'll work as you wish.
I suck at explaining, so if you don't get it, I'll try more.

Spaces displayed as dots and tabs displayed as arrows

In my Visual studio 2012 editor I erroneously pressed some obscure key combination (Ctrl-Alt-something or so) and now spaces are displayed as little dots and tabs are displayed as arrows.
I'd like to get rid of this, but I haven't found the corresponding option in TOOLS-Options-Text editor.
Go to Edit -> Advanced -> View White Space to rectify this. Alternatively, you may use the key combination Ctrl + R, Ctrl + W.
A quick tip:
An efficient way to find Visual Studio options and commands is to use the "Quick Launch" feature (Ctrl+Q - or just type in the box at the top right of the Visual Studio IDE) - in this case typing "white space" or just "space" in that box shows the command you need and lets you take the action from there too.

Resources