Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make Visual Studio Code open files in the already open project window? [duplicate]

I build my project on the terminal using make. When I encounter some compile errors, the output indicates in which files there is an error. I can Ctrl-click the file names to open them (a feature of iTerm). However, this makes Visual Studio Code open a new window with that single file, instead of navigating to that file in the already open project window. Is there a way to change this?

There is an option window.openFilesInNewWindow, but that only works for files opened within VS Code, not from Finder or other apps.

like image 914
Jawap Avatar asked Sep 18 '25 10:09

Jawap


1 Answers

VSCode accepts -r or --reuse-window as a parameter to force opening a file in the active project window. If you can configure your iTerm feature and add this parameter, it should work as expected.

Reference : https://code.visualstudio.com/docs/editor/codebasics

like image 190
Brahim Hamdouni Avatar answered Sep 21 '25 11:09

Brahim Hamdouni