Select ReSharper recommendation without using arrow keys
Assume I have the following..
public void DoSomething()
{
var foo = 1 + bar;
}
If I type var b
ReSharper will recommend bar for the variable name. The problem then is that I need to press the down key and enter to select the recommendation. 开发者_StackOverflow Is there a quicker way to select the top option?
I'd rather avoid having to create an AutoHotKey shortcut...
** UPDATE **
My primary concern is not having my hands leave the home row as I'm a heavy Viemu user.
Just press Ctrl+Space
, and the only option on the list (that is, "bar") will be automatically committed.
The other answer is perfectly valid as well
Actually as soon as you're in this caret position:
var foo = 1 + bar|
you can Alt+Enter to see ReSharper suggest different declaration option where "Create local variable 'bar'" will be the first option.
Place you cursor on bar
, press ALT+Enter and select "create local variable 'bar'" by pressing 'Enter', fill out the type and you're done. So in effect it's: mouse click, ALT+Enter, Enter, v, a, r, TAB
No Arrow key involved unless you don't have a mouse.
精彩评论