Skip to content

shrikecode/skeleton.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

skeleton.vim

A dead simple plugin for easy Vim and Neovim file templates.

Installation

Vim-plug

Plug 'shrikecode/skeleton.vim'

Packer

use 'shrikecode/skeleton.vim'

Usage

Create a file in ~/.vim/templates with contents you want in a template. Files are matched by full filename (my-template.lua), by file directory (file-dir/skel.lua) or by extension (skel.lua).

Configuration

Below are the possible config values with defaults

" templates directory
let g:sigma_skeleton_dir = '~/.vim/templates'
" fill an existing empty files
let g:sigma_skeleton_fill = 0
-- templates directory
vim.g.sigma_skeleton_dir = '~/.vim/templates'
-- fill an existing empty files
vim.g.sigma_skeleton_fill = 0

Known issues

With g:sigma_skeleton_fill = 1, if a buffer for a file that was deleted is open or an unsaved buffer is open, it will be filled with matched template every time it is visited. That is likely not an issue that can be handled, so use this option with care and prepare from some mess from time to time.

Similar projects / inspirations