在VS2008中从一个代码块移至另一个代码块的键盘快捷键 [英] keyboard shortcut to move from one code block to another in VS2008

查看:91
本文介绍了在VS2008中从一个代码块移至另一个代码块的键盘快捷键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio 2008中,是否存在将一个代码块直接移至另一代码块的快捷方式?就像从一个功能说:下一个功能的开始.
目前,我所能做的就是按下箭头键.

我知道Ctrl +]在匹配的花括号之间跳转,但是这并不能使我免于最初多次按上/下按键的麻烦.另外,"Edit.NextMethod"不起作用,因为除非您正在编辑VB代码,否则它始终处于禁用状态(它们似乎也不起作用).

解决方案

宏是解决方案: VS2008附带的示例宏包含:
Sample.VSEditor.BeginningOfFunction -移至函数的开头. 可以对其进行修改,以使其移至函数末尾,而无需更改:将 CodeElement . GetBeginningPoint 更改为 GetEndPoint .接下来是另一个用户定义的宏: NextMethod ()首先导航到当前函数的末尾,然后找到下一个函数,最后移至该下一个函数的开始. /p>

获取宏: http: //social.msdn.microsoft.com/Forums/zh-CN/csharpide/thread/8c5a2fd2-df25-4196-b211-5da3086f4f3d

In Visual Studio 2008 is there a shortcut to move from one block of code to an another block of code directly? Like from one function to say: the beginning of next function.
Currently all I can do is press-press arrow keys.

Edit: I am aware of the Ctrl+] to jump between matching braces but that does not relieve me from multiple up/down presses initially. Also the "Edit.NextMethod" does not work as it is always disabled unless you are editing VB Code (It does not appear to work their either).

解决方案

Macros is the Solution: Shipped with VS2008 are sample macros that contain:
Sample.VSEditor.BeginningOfFunction - to move to the beginning of a function. This can be modified to get it to move to the End of the function instead by changing: CodeElement.GetBeginningPoint to GetEndPoint. Next an another user-defined macro: NextMethod() first navigates to the end of current function then finds the next function and finally moves to the beginning of this next function.

Get the Macro: http://social.msdn.microsoft.com/Forums/en/csharpide/thread/8c5a2fd2-df25-4196-b211-5da3086f4f3d

这篇关于在VS2008中从一个代码块移至另一个代码块的键盘快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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