In Visual Studio Code, whenever I close a file, the next open file becomes active in the editor and the Side Bar moves to that file's location in the folder structure. This is usually not the behavior I want. I often want to open another file in the same location as the one I just closed, but now my Side Bar has shifted around to what could be a totally different place in a large project.
I like the behavior of the main Visual Studio product where the Solution does not automatically shift. Instead, if I want to see where in the solution a file is, I can use a keyboard shortcut to move there ("Find File in Solution"), instead of automatically moving there every time the active file changes.
Is there any way to change/disable this functionality in VSCode?
VSCode tip: You can move the sidebar/file explorer to the right-hand side of your editor via View > Appearance > Move Side Bar Right.
Once you've opened Visual Studio Code, just press alt + space and the system menu will appear, then you just have to select the Always on top option.
Visual Studio Code shows the side bar on the left side by default. However, you can move it to the right if you want. Just right-click on the side bar and choose "Move Side Bar Right".
The is an option explorer.autoReveal
in settings (either user or workspace) which controls if the explorer should automatically reveal files when opening them.
"explorer.autoReveal": false
setting to the User Settings document on the right if it's not already there. This is so you aren't editing the Default Setting directly, but instead adding to it.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