How to open a file from the integrated terminal in Visual Studio Code?

Solution 1:

You can use -r or --reuse-window command line option.

code -r something.php

Solution 2:

I don't know what operating system you're using, but on MacOS you can just say open filename.ext in the integrated terminal, and it will open a new tab in the same VSCode instance, ready for you to edit.