https://github.com/mrtazz/vim-stencil
simple template loading plugin for VIM
https://github.com/mrtazz/vim-stencil
Last synced: about 1 year ago
JSON representation
simple template loading plugin for VIM
- Host: GitHub
- URL: https://github.com/mrtazz/vim-stencil
- Owner: mrtazz
- License: mit
- Created: 2014-07-22T12:21:20.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-12-12T15:11:47.000Z (over 11 years ago)
- Last Synced: 2025-03-27T22:14:34.419Z (about 1 year ago)
- Language: VimL
- Homepage: http://www.unwiredcouch.com/bits/2014/07/22/productive-vim-with-templates.html
- Size: 133 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vim-stencil
## Overview
VIM plugin to load templates from a directory and do basic variable substitution.
## Installation
If you don't have a preferred installation method, I recommend installing
[pathogen.vim][pathogen], and then simply copy and paste:
cd ~/.vim/bundle
git clone git://github.com/mrtazz/vim-stencil.git
## Usage
Set the path where to find the templates like this:
`let g:StencilTemplatepath = "~/.vim/templates/"`
Then you can load templates with the `:Stencil` command. It supports tab
completion for choosing the template. The template loader will always load the
template after the first line of the file.
## Variable expansion
Stencil supports expansion of some simple variables. Those are:
- %%DATE%% will be replaced by the current date in the format mm/dd/yyyy
- %%WEEKDAY%% will be replaced by the full name of the weekday (e.g. Friday)
[pathogen]: https://github.com/tpope/vim-pathogen