Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

keyboard shortcuts - Visual Studio Jump to Beginning of Function

I know that Ctrl+} will take you to the corresponding brace in Visual Studio, but say I'm in the middle of a gigantic function and I don't know where the top or the bottom is, is there a shortcut to get directly to the function declaration?

void function()
{
//so many lines of code
//can't see the top or the bottom curly brace
//can i get to the top of the function with a shortcut?
}
question from:https://stackoverflow.com/questions/27805217/visual-studio-jump-to-beginning-of-function

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I have a fresh install of VS2017. As of 15.9.1, the default for me is Alt+Shift+[.

This is the shortcut for EditorContextMenus.Navigate.GoToContainingBlock. So you may have to execute this shortcut multiple times if you are a few block layers deep, but it'll get you where you want to go.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...