open a file in crrent vcscode using cmd 1

open a file in crrent vcscode using cmd

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

> code -r something.php

Here is what the above code is Doing:
1. It’s checking if the file is already open in a window.
2. If it is, it’s checking if the window is already focused.
3. If it’s not, it’s focusing the window.
4. If the file is not open, it’s opening the file in a new window.

Similar Posts