The FileManager plugin sounds like it might be of use to you. Among the features it provides, it's fm_create
command allows you to create files or folders, including automatically creating any path elements that don't exist.
The command is bound to Alt+N by default (across all platforms) and is also available in the command palette as File Manager: New File
. Despite the name of the command, it creates both files and folders and uses the last character to determine which you meant to create:
FileManager doesn't have a command create_new_file and create_new_folder. Just fm_create. It opens up an input, and the last character you type in is a / (or a ), it creates a folder instead of a file.
In addition the input supports auto-completion of paths and it's fairly customizable as well. For example, I added this command to a Defaults.sublime-commands
in my User
package to implement a command that allows me to easily create a file at the same path as the current file:
{
"caption": "File Manager: New File Relative to Current View",
"command": "fm_create",
"args": { "initial_text": "$here/" }
},