'How to create a file in the terminal of VSC?
I know how to create a folder in the terminal of vsc mkdir NameOfFolder
, but how to create a file in the terminal?
Solution 1:[1]
Ctrl + ` to open the terminal in Visual Studio Code.
echo > "File.txt"
to create a new .txt
file in the current directory.
Solution 2:[2]
You can also use:
code filename.filetype
This also works with directories
code app/program.py
This wil open the new file in te editor (if the filetype allows it) and then you can just save it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Timothy G. |
Solution 2 | Chopins_left_hand |