Home > OS >  vscode quickOpen existing "instance" of file in whatever Tab it is in
vscode quickOpen existing "instance" of file in whatever Tab it is in

Time:03-22

Say you have Tab X and Tab Y open. In Tab X you have file1 and file2 open, but file2 is on top of the stack being rendered on the screen. In Tab Y you have other files open.

Now I'm currently focusing Tab Y and I open the quickOpen menu and select file1 there. The vscode normal behavior is to open another "instance" of file1 in Tab Y.

q1: Is there a way to change this behavior so I would just open the existing "instance" of file1 in Tab X? I.e. move the focus to Tab X and move file1 to the top of the stack.

q2: Is there a way to list all the open files only where you can fuzzy search names? I know quickOpen lists open files as well, but when working on a big project it is nice to be able to search only on already opened files.

The reason I'm asking is because this is how Intellij works. I find it easier to use multiple tabs and navigate between files when there is a single list of all open files regardless of which tab it is on and if you select a file from the list it just moves you to that file.

Thanks in advance!

CodePudding user response:

q1: enable the setting Workbench > Editor: Reveal If Open

q2: I don't think you can search for a file within open files only. The Open Editors view may be as close as you are going to get (see Explorer > Open Editors: Visible). Perhaps there is an extension that does this.

  • Related