skeletons.vim


Ⅰ. 插件描述

VIM Skeletons plugin

Ⅱ. 基本信息

创建日期:  2013-01-26
使用用户:  9
Github星:  15
插件作者:  Tobias Schlitt

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'tobys/skeletons-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'tobys/skeletons-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'tobys/skeletons-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/tobys/skeletons.vim

Ⅳ. 文档说明

=============

VIM Skeletons

This tiny VIM Skeletons plugin allows you to define a skeleton file per file
type, which is used whenever you create a new file of that type. Furthermore,
it makes use of UltiSnips__ snippet engine to directly leave you with
placeholder you can jump through and prefill with sensible defaults.

__ https://github.com/SirVer/ultisnips

Installation

For installation I recommend using Vundle__, a package manager for VIM plugins.
If you have Vundle running, the following line in your .vimrc enables the
plugin::

Bundle "tobyS/skeletons.vim"

__ https://github.com/gmarik/vundle

Now you run

::

:BundleInstall

and you're done.

If you prefer any other VIM plugin manager, you will find your way according to
your preferences. If you do not use a VIM plugin manager, you should use one.

I ship an example skeleton for your pleasure. Take a look in the skeletons/

  1. Note, that this skeleton will not be used by Skeletons by default.

Usage

Using Skeletons is easy. Just install the plugin and put your skeleton files
into

::

~/.vim/skeletons/

a skeleton file name must follow the simple format whatever.<ft> where
<ft> is the file type you want to register the skeleton for. If you have
mutliple files for one type, Skeletons will simply use one. Which one? No idea.
Therefore I recommend to use skeleton.<ft> by convention to avoid this
issue.

If you want to change the directory where skeletons are stored, take a look at
Configuration_.

Configuration

You can influence the bahavior of Skeletons by two confiuguration variables:

g:skeletons_dir

Set this variable to a different directory if you don't want to have your
skeletons to be located in ``~/.vim/skeletons/``.

g:skeletons_autoregister

Set this to ``1`` in order to avoid Skeletons to auto-register its
autocommand for inserting the skeletons. You need to do this action
yourself then.


..
Local Variables:
mode: rst
fill-column: 79
End:
vim: et syn=rst tw=79

添加新评论