开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜