Reputation: 9219
I am using the Ctrl+, keyboard shortcut to navigate between files. However when I select a file and press Enter it opens file in the existing tab with italics on the title. If I select another file using Ctrl+, and press enter it opens the other file on the same tab. Is there a keyboard shortcut to open the file in a new tab instead of the same tab?
Upvotes: 25
Views: 25205
Reputation: 10892
What if I want to make that file not in preview mode without changing that setting? What is the shortcut for that?
This can trigger reload actions in some development file servers, however. There are two more ways that I found, slightly more laborious:
View: Move Editor into Right Group
, then View: Move Editor into Left Group
. You could even make this a macro and assign it to a custom shortcut.View: Pin Editor
, View: Unpin Editor
. Has the side effect of moving the tab to the very leftUpvotes: 14
Reputation: 15057
The (default?) shortcut for the command that you want (That is the Keep open
/View: Keep Editor
command) is CTRL+K Enter
To see your shortcut open the command panel (CTRL+(shift)+P by default) and type the following command: >View: Keep Editor
You can also right-click the editor tab and near the bottom there should be the command Keep Open
with the (default) shortcut next to it.
These commands allow you to 'keep the current tab open when navigating to a new file'. Doesn't match your requirement for the full 100% but for me it works wonders :-)
Upvotes: 2
Reputation: 115402
As you have seen, when you single-click a file it previews it in the current tab and you have to double-click it to open it properly for editing. You can disable this behaviour by going into Code's settings and specifying:
"workbench.editor.enablePreview": false
...in your user settings.
Upvotes: 27