Question

As my code is getting longer I often have to jump between to code sections to tweak stuff and fix bugs, however the dropdown menu with all the variables and functions is just not enough any more.
So I was thinking whether there is any way to define a shortcut to some part of my code, like many games allow you to use Ctrl+ a number to jump to a unit.
Collapsing code blocks is ok to use, but I have to manually do it for every block every time I open my project, so again it is starting to get ineffective.
I am also aware of macros, but it seems to me that it would be a bit complex to do set a macro to do this, am I right/wrong?
I am using Visual Studio 2010.
Thanks in advance for answers, positive or negative.

Was it helpful?

Solution

  • Ctrl K + K (That is hold Ctrl and then type K twice) will place a bookmark on your current location.

  • Ctrl K + N will navigate through them.

OTHER TIPS

You can use bookmarks and shortcuts for navigation between bookmarks. CTRL-K+K for create and CTRL-K+N for navigate to next bookmark or CTRL-K+P to previous bookmark. More details about text navigation hot keys can be found here in section Text navigation: http://www.dofactory.com/ShortCutKeys/ShortCutKeys.aspx. More about bookmarks here http://msdn.microsoft.com/en-us/library/2wffxsy0.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top