在Visual Studio 2008中,如何进行控制+单击执行“转到定义”? [英] In Visual Studio 2008, how can I make control+click do a "Go To Definition"?

查看:544
本文介绍了在Visual Studio 2008中,如何进行控制+单击执行“转到定义”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Delphi IDE中,您可以保持控制并单击某个方法以跳转到其定义。在VS2008中,你必须右键单击并选择转到定义。

In the Delphi IDE, you can hold control and click on a method to jump to its definition. In VS2008, you have to right-click and select "Go To Definition".

我经常使用这个函数,所以我真的很想让VS表现出来就像Delphi在这方面一样 - 它可以更快地进行ctrl +点击。

I use this function quite often, so I'd really like to get VS to behave like Delphi in this regard - its so much quicker to ctrl+click.

我认为没有办法让这个在VS2008基础上运行 - 我错了吗?或者可能有一个我可以使用的插件?

I don't think there's a way to get this working in base VS2008 - am I wrong? Or maybe there's a plugin I could use?

编辑:点击然后F12确实有效 - 但对我来说这不是一个好的解决方案。它仍然比ctrl + click慢。
我可能会尝试AutoHotkey,因为我已经在运行它了。

Edit: Click then F12 does work - but isn't really a good solution for me.. It's still way slower than ctrl+click. I might try AutoHotkey, since I'm already running it for something else.

编辑 AutoHotkey 为我工作。这是我的脚本:

Edit: AutoHotkey worked for me. Here's my script:

SetTitleMatchMode RegEx
#IfWinActive, .* - Microsoft Visual Studio
^LButton::Send {click}{f12}


推荐答案

你可以创建这样做的Autohotkey脚本。当你按住Ctrl键单击一个单词时,发送一个双击,然后发送一个F12。

You could create an Autohotkey script that does that. When you ctrl-click a word, send a doubleclick then a F12.

我没有方便的AHK所以我不能尝试草拟一些代码,但它应该很容易; AHK记录器应具有足够的功能,让您以点击方式创建它,而IIRC它足够聪明,可以让您将此行为限制为特定类别的窗口。

I don't have AHK handy so I can't try and sketch some code but it should be pretty easy; the AHK recorder should have enough features to let you create it in a point 'n' click fashion and IIRC it is smart enough to let you limit this behaviour to windows of a certain class only.

准备好脚本后,只需在编码时在后台运行脚本。只需在通知栏中显示一个图标。

When you have your script ready just run the script in the background while you code. It takes just an icon in the Notify bar.

这篇关于在Visual Studio 2008中,如何进行控制+单击执行“转到定义”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆