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

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

问题描述

在 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+click 快得多.

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}

推荐答案

您可以创建一个自动热键脚本来执行此操作.当您按住 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 记录器应该有足够的功能让你以点n"点击的方式创建它,而 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 中,如何使 control+click 执行“转到定义"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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