Search code examples
visual-studiokeyboard-shortcuts

Navigating through code with keyboard shortcuts


I'm starting to feel the need to run fastly through code with keyboard shortcuts, to arrive faster where I want to make any changes (avoiding use of mouse or long times holding , , and ).

I'm already using some:

  • Home - first position in current line

  • End - last position in current line

  • Ctrl + Home - first line of the entire code

  • Ctrl + End - last line of the entire code

  • Page Up - same vertical position, one screen above

  • Page Down - same vertical position, one screen below

  • Ctrl + Page Up - first line in current screen

  • Ctrl + Page Down - last line in current screen

  • Ctrl + / - skipping word per word

What have you got ?

I use Visual Studio. (but I'm open to any answer, as I maybe can use others soon)

obs: I've searched through stackoverflow and didn't find a nice question with this content, nor a list of keyboard code searching. If it's repeated, I'm sorry for not finding it, I'm here in my best intentions.

This question is NOT about any shortcuts, and not only about visual studio, it's about running through code with shortcuts.


Answers that suit the question so far:

  • Ctrl + - - jumps to last cursor position

  • Ctrl + Shift + - - jumps to next cursor position

  • Ctrl + F3 - Jumps to next occurance of the word the curson is in

  • Shift + F3 - Same as the above, backwards.

  • F12 - Goes to definition of method/variable the cursor is in

  • Ctrl + ] - Jumps to matching brace and select

I'll add more as there are answers.


Solution

  • For Visual Studio, Ctrl + - is priceless (jump to last position).