The C Make Folder Creator extension for Visual Studio Code allows developers to create a new folder with a specified file inside. It prompts the user for a file name, and it automatically creates a folder and a corresponding file with the provided name inside the opened workspace. This extension is helpful for quickly setting up project structures or creating new files without manually creating folders and files.
- Prompt user for a file name (without extension).
- Automatically create a folder and a file with the specified name inside the opened workspace.
- File is created with a
.cpp
extension. - Ability to customize the initial content of the created file.
-
Open a Folder: Open a folder in Visual Studio Code where you want to create the new folder and file.
-
Run the Command:
- Press
Ctrl + Shift + P
(orCmd + Shift + P
on macOS) to open the Command Palette. - Type
Create Folder with Files
and select the command to run.
- Press
-
Enter File Name:
- You will be prompted to enter a file name (without extension).
- The extension will create a folder and a file named
{filename}.cpp
inside the opened workspace.
-
File Content:
- The created file will contain a basic C++ template:
#include <iostream> int main() { std::cout << "Hello, World!" << std::endl; return 0; }
-
Terminal Command (Optional):
- After the folder and file are successfully created, you can specify a terminal command to run.
- Modify the
extension.ts
file to add your desired terminal command.
- Launch Visual Studio Code.
- Go to Extensions (or press
Ctrl + Shift + X
). - Search for "Folder Creator" and click Install.
If you find any issues with the extension or have suggestions for improvements, please feel free to create a new issue on GitHub.
This extension is licensed under the MIT License.
Happy coding! ๐