:Author: Adrian Perez aperez@igalia.com
This is a simple plugin for Vim that will allow you to have a set of templates for certain file types. It is useful to add boilerplate code like guards in C/C++ headers, or license disclaimers.
The easiest way to install the plugin is to install it as a bundle. For example, using Pathogen__:
Get and install pathogen.vim <https://github.com/tpope/vim-pathogen>
_. You can skip this step
if you already have it installed.
cd ~/.vim/bundle
git clone git://github.com/aperezdc/vim-template.git
__ https://github.com/tpope/vim-pathogen
Bundle installs are known to work fine also when using Vundle__. Other bundle managers are expected to work as well.
__ https://github.com/gmarik/vundle
.. important:: If you use Fish as your shell, you will need to add
set shell=/bin/sh
to your ~/.vimrc
— the plugin relies on the
setting pointing to a Bourne-compatible shell.
http://fishshell.com/ https://en.wikipedia.org/wiki/Bourne_shell
The documentation can be browsed directly in Vim::
:help template.txt
Alternatively, you can also read it in your browser
__.
__ https://github.com/aperezdc/vim-template/blob/master/doc/template.txt
In order to update the plugin, go to its bundle directory and use Git to update it:
cd ~/.vim/bundle/vim-template
git pull
Use the :BundleUpdate
command provided by Vundle, for example invoking
Vim like this::
% vim +BundleUpdate