Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to quickly get the focus of the file being editted in VS

Is there any short-cut or device in Visual Studio to let me quickly get focus on the file I am editing?

I often meet the scenario: after I edit a specific c# file for a while, I suddenly want to search for other files in the same directory hierarchy.

like image 566
Ricky Avatar asked Aug 03 '09 08:08

Ricky


People also ask

How do you focus on editor VS Code?

In VS Code (Visual Studio Code), you can quickly and conveniently jump between the code editor and the integrated terminal by using the following shortcuts: Mac: To focus the terminal: Ctrl + ` (the key near the ESC key) To focus the editor: Ctrl + 1.

How do I change multiple words in VS Code?

Use Ctrl + D to use multi word edit of same words in Windows and Linux.


2 Answers

If you have focus on e.g. the solution explorer you can focus on the current source code file by pressing

CTRL+TAB

like image 151
BjartN Avatar answered Nov 10 '22 19:11

BjartN


Pressing F7 will set the focus on the code editor, or customize it yourself by overwriting View.ViewCode.

You can download a cheat sheet with all the shortcuts from MSDN (mostly for English keyboard layouts):

  • Visual C# 2008 Keybinding Reference Poster
  • Visual Basic 2008 Keybinding Reference Poster
  • Visual C++ 2008 Keybinding Reference Poster

Or you can create your own cheat sheet (including all your customizations) using a macro:

How to: List Current Keyboard Shortcut Mappings

like image 23
Dirk Vollmar Avatar answered Nov 10 '22 20:11

Dirk Vollmar