{"repo":"nvimdev/template.nvim","free":true,"listed":false,"github":"https://github.com/nvimdev/template.nvim","clone":"git clone https://github.com/nvimdev/template.nvim.git","description":"Quickly insert templates into file","language":"Lua","stars":226,"topics":["neovim","neovim-plugin","template"],"license":"MIT","category":"saas-starters-boilerplates","readme_excerpt":"Template.nvim Quick insert tempalte Install Options Basic Usage Template Grammar - {{ date }} insert current date - {{ cursor }} set cursor here - {{ file name }} current file name - {{ author }} author info - {{ email }} email adrress - {{ variable }} variable name - {{ upper file }} all-caps file name - {{ camel case file }} converts snake case file name to CamelCase - {{ lua:vim.fn.expand(%:.:r) }} set by lua script Define your template You need to configure the setting variable temp dir . An example configuration: temp dir = ' /.config/nvim/templates' . Create the directory at the location specified then proceed to add template files. As an example create the file main owner.go in the temp dir directory you set (e.g. /.config/nvim/templates/main owner.go) Nested folders are also supported (e.g. /.config/nvim/templates/rust/http.rs) You can use lua inside the template with {{ lua: }}. For example above template generates below lines. - Work with existing file if there has a file main.go , and open it input Template . select the template main owner It will insert template to this file like - Work with not exist file use Template test.go , it will create a file named test.go in current path and auto open this file insert template. - Work with not exist file and custom variable A lua template file named nvim temp.lua , content is Use Template test.lua then it will auto fill template name nvim temp if there is only one lua template file. If are any variable items in the templa","default_branch":null,"files":null,"tree":[],"storefront":"/r/nvimdev","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nvimdev/template.nvim/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}