15

I can open a file with ctrl + p with VSCode, and that's good.

But I want to make the tab stay there (be non-italicised), using a keyboard shortcut. (The only way I know how to do this is to either modify the file, or to double click the tab).

What is the command palette name for this action, and is there a default keyboard shortcut for it?

user1068446
  • 1,420

1 Answers1

16

The command palette name for this action is View: Keep Editor. The default keybinding for this is CtrlK Enter (on macOS, K Enter). The command name for keybindings.json is workbench.action.keepEditor.

halter73
  • 274
  • That's a great tip, didn't know there is a shortcut for that. But do you maybe know if there is a way to keep files open by default when opening them through quick access (Ctrl + P)? – dzenesiz Aug 29 '19 at 09:17
  • 1
    Or "⌘+K Enter" on mac! – Nathan Sep 25 '19 at 16:03
  • 4
    @dzenesiz set "workbench.editor.enablePreview" to false. See: https://medium.com/statuscode/jumping-to-files-in-visual-studio-code-and-keeping-them-open-45d7b9d2f5 – Captain Squirrel Nov 01 '19 at 16:05
  • @CaptainSquirrel Taht worked prefectly. Thanks! Why don't you make it an asnwer? – dzenesiz Nov 07 '19 at 09:24