不使用箭头键选择 ReSharper 推荐
假设我有以下内容..
public void DoSomething()
{
var foo = 1 + bar;
}
如果我输入 var b
ReSharper 将推荐 bar 作为变量名称。那么问题是我需要按向下键并回车来选择推荐。有没有更快的方法来选择顶部选项?
我宁愿避免创建 AutoHotKey 快捷方式...
** 更新 **
我最关心的是不要让我的手离开主行,因为我是 Viemu 的重度用户。
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. 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只需按
Ctrl+Space
,列表中唯一的选项(即“bar”)就会自动提交。另一个答案也完全有效
。实际上,只要您处于此插入符号位置:
您可以 Alt+Enter 来查看 ReSharper 建议不同的声明选项,其中“创建局部变量‘bar’”将是第一个选项。
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:
you can Alt+Enter to see ReSharper suggest different declaration option where "Create local variable 'bar'" will be the first option.
将光标放在
bar
上,按 ALT+Enter,然后按“Enter”选择“创建局部变量“bar””,填写类型即可完成。所以实际上它是:鼠标单击、ALT+Enter、Enter、v、a、r、TAB不涉及箭头键,除非您没有鼠标。
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, TABNo Arrow key involved unless you don't have a mouse.