从 Visual Studio 在浏览器中加载搜索 URL
我发现内置的 Visual Studio Document Explorer 不太相关,特别是当我使用的更多 SDK 都具有最新的在线内容时。按 F1 会启动文档资源管理器,通常会显示一些无用的信息,并且对我来说不再可用。
有没有什么方法可以在按下 Visual Studio 中的组合键时:
- 默认浏览器打开到搜索引擎查询的 URL,
- 使用的是当前光标位置下的关键字,
- 添加过滤器,例如
site:msdn.microsoft.com
我对 VS 中的宏一无所知,但大概这就是我需要的。有谁知道如何进行设置? 代码会很好!
I'm finding the built-in Visual Studio Document Explorer less relevant, especially as more of the SDKs I work with have the most up-to-date content on-line. Pressing F1 starts Document Explorer usually with something unhelpful and it's not usable any more for me.
Is there any way that on the press of a key combination in Visual Studio:
- the default browser opens to the URL of a search engine
- query used is the keyword under the current cursor position
- a filter is added such as
site:msdn.microsoft.com
I don't know anything about macros in VS but presumably that's what I need. Does anyone know how to go about setting this up? teh codez would be nice!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是另一个版本(基于亚历克斯的答案),它也会选择您当前所在的单词。更像是典型的 F1 帮助。
Here is another version (based on Alex's answer) that will also select the current word you are on. More like the typical F1 help.
使用链接Preet提供我出现了这样就可以启动默认浏览器:
Using the link Preet provided I came up with this which starts the default browser:
我想出了这个。正如它所说,您需要为 HttpUtility.UrlEncode 添加对“System.Web”的引用。此外,代码中还有一些被注释掉的“选项”。部分内容取自 http://www.codinghorror.com/ blog/2005/10/google-search-vsnet-macro.html ,但有很大改进(恕我直言)。
I've come up with this one. As it says, you will need to add a reference to 'System.Web' for HttpUtility.UrlEncode. Also, there's a few 'options' in the code commented out. Parts taken from http://www.codinghorror.com/blog/2005/10/google-search-vsnet-macro.html , but much improved (IMHO).