Visual Studio: Shortcut to scroll solution explorer to current file
I'm not asking for the option to automatically follow the current file in the solution explorer. This has been answered in this question and I have this option turned off because I hate the behavior.
I would like to have a shortcut (or macro, or ....) to jump to the file I'm currently editing in the solution explorer.
In VS 2013 there is a built-in keyboard shortcut (CTRL+\, S)
- Press CTRL+backslash
- Release both keys
- Press the S key
Or click the button highlighted in the image bellow.
One also has the option to customize the keyboard shortcut if you don't like the default combination :)
In Visual Studio 2015, 2017 and 2019 you can press Ctrl + [ and then s.
This will highlight the file currently being edited in Solution Explorer.
This can be configured via the following keyboard command: SolutionExplorer.SyncWithActiveDocument
To reconfigure, navigate to Tools -> Options -> Environment -> Keyboard