ManuelGil / vscode-moodle-snippets

🎓 This extension provides Moodle snippets for PHP, XML and Mustache files. It also provides commands to create new files for Moodle.
https://marketplace.visualstudio.com/items?itemName=imgildev.vscode-moodle-snippets
MIT License
10 stars 3 forks source link

New files creates only in the root folder? #2

Open Zormon opened 9 months ago

Zormon commented 9 months ago

When i run a command (like "Moodle: New Version File"), the file is always created on the root of the project, not on current plugin or selected folder, making these shortcuts useless. There is any form of making them in the correct subdir of the folder tree?

Thanks

ManuelGil commented 9 months ago

Hi @Zormon ,

This extension is designed so that some files are created directly in the root folder since trying to detect the active folder is a complex process that may not give the best results. However, it is possible to add functionality to add the folder in which the file should be created.

In a few days I can realize the implementation of this functionality. I appreciate your interest and I hope to have this feature as soon as possible so you can continue to enjoy this extension.

ManuelGil commented 8 months ago

Hello again,

I have already integrated the new feature in the latest update.

If you want to create a new file in a specific folder, you can right click on the folder and select the New File option in the Moodle Pack context menu. This will create a new file in the selected folder and open the file in the editor.

demo