Advanced file creation for Neovim.
The edit command in neovim does not create folders or files inside new folders.
AdvancedNewFile.nvim provides a simple and fast way to create new files and folders in the current working directory.
This plugin was inspired by AdvancedNewFile plugin in SublimeText.
It is currently tested on macOS but it should work on other operating systems.
Install with the package installer of choice:
Plug 'wbartz/AdvancedNewFile.nvim'
use 'wbartz/AdvancedNewFile.nvim'
return {
'wbartz/AdvancedNewFile.nvim'
}
You can use AdvancedNewFile
command to create new files and folders in neovim. You may want to map this to key bindings for easy access.
keymap("n", "<C-n>", "<cmd>lua require('advanced_new_file').run()<CR>", silent)
Get current file dir
keymap("n", "<C-y>", "<cmd>lua require('advanced_new_file').run(true)<CR>", silent)
Enter the filename in the prompt and it will be created in the current workin directory.
if the name enterd ends with a path separator, a folder will be created.
You can also create files inside new or present folders.
If installed, this plugn will work with nvim-notify.