Variables

Paths

Indicates the main path to search for file templates. You can define another but never end with a bar because it is added automatically

let g:vimFilesThemplatesRootPathFile = '~/.config/nvim/themplates/files'

Indicates the main path to search for folder structure templates. You can define another but never end with a bar because it is added automatically

let g:vimFilesThemplatesRootPathDir = '~/.config/nvim/themplates/dirs'

Note: if these directories do not exist, they will be automatically created recursively

Dictionary of Themplates

This variable is where the directory structure templates are searched, the element on the left of the: is the name with which it will be searched later, and the value on the right is the path within g:vimFilesThemplatesRootPathDir

let g:vimFilesThemplatesDir = {
    \ 'react-native': 'react/native.txt',
    \ 'html-bootstrap': 'web/html/bootstrap.txt'
    \}

This variable is where the templates are searched for the content of the files to create, the element to the left of: is the name with which it will be searched later, and the value to the right is the path inside g: vimFilesThemplatesRootPathFile

Note: the extension of the template file is indifferent since it only imports the content, although I recommend that it be the same as the file that is expected to be created in order to develop a better template or, failing that, txt

" Dictionary of Files Themplates
let g:vimFilesThemplatesFiles = {
    \ 'react-component': 'react/component.txt'
    \}

Values

This variable allows you to indicate which will be the opening method for the created file

let g:vimFilesOpenMode = 0
  • 0 to open it in a Tab

  • 1 to open in vertical split

  • 2 to open in horizontal split

  • 3 to open it in the current window and

  • 4 so as not to open it automatically

This variable sets whether a directory and its contents should be automatically deleted without asking for confirmation of recursive deletion. By default is false

let g:vimFiles_AutoConfirmDeleteFolder = 0

Last updated

Was this helpful?