How to move / move the cursor using a block of code in VisualStudio

I want to be able to move the cursor (not move the line of code) in the text editor up or down the block by pressing <ctrl>+<uparrow> or <ctrl>+<downarrow> . In jEdit, Leafpad, etc. It just comes out of the box. I don’t want to move the whole page at a time, just go to the beginning or end of the text block I ended up in.

In particular, I want this, but for VS 2012 (which no longer has macros): a keyboard shortcut to move from one block of code to another in VS2008

I saw these messages, and they are not what I need; I don’t want to move the code, I want to move the cursor to the top or bottom of the block I ended up in. Visual Studio: hotkeys for moving up / down and moving through the latest changes Visual Studio - scroll and move the cursor

I also checked in ReSharper and cannot find the answer.

Does anyone know of an add-in that provides this functionality?

+4
source share
2 answers

Bind them to Edit.PreviousMethod and Edit.NextMethod in the menu "Options" β†’ "Environment β†’"?

+2
source

I deleted everything that was associated with these shortcuts, and then linked it to Edit.PreviousMethod and Edit.NextMethod. This put focus on the method field in the editor, but then you need to press the enter key to make it jump to that method.

The best I could find was to use ReSharper, which I was trying to avoid. However, I am minimalist, and ReSharper disturbed me, I left it disabled almost all the time, so I deleted it.

I believe this is ReSharper.MoveToNextMethod or .NavigateToNextMethod, but I deleted it so that I can go into memory. Using it, he will go to the beginning of the previous or next method, which was not quite what I was looking for, but better than nothing.

Edit: I gave up. I switched to .Net Core for C # code and performed all my edits outside the code using text editors that use common keyboard shortcuts like Geany, jEdit, etc.

+2
source

All Articles