I'm wondering if there is a shortcut for VS Code that highlights in solution explorer tree current opened file. Like we have in Visual Studio:
Alt + Shift + L
In Visual Studio's menu go to Tools > Options > Projects and Solutions. Then check "Track Active Item in Solution Explorer".
To verify open any file in Visual Studio and press the shortcut keys Shift + Alt + L and you'll see the file in the solution explorer. Enjoy!
In the simplest case, to build and run an open project in Visual Studio: Press F5, choose Debug > Start with debugging from the Visual Studio menu, or select the green Start arrow and project name on the Visual Studio toolbar.
Couldn't live with no complete answer, so figured out the following:
Without a direct keyboard shortcut:
Files: Reveal Active File in Side Bar
.Then, take the above and map a keyboard shortcut to it:
Preferences: Open Keyboard Preferences File
.// Place your key bindings in this file to overwrite the defaults [ { "key": "shift+alt+l", "command": "workbench.files.action.showActiveFileInExplorer", }, ]
Note that it's not as good as Visual Studio, Atom, etc. in that you can't then navigate with arrow keys in the tree (arrow keys navigate the active file contents), but I guess I'll eventually figure out how to do that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With