Ⅰ. 插件描述
Vim skeletons; about as simple as they come.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'strange/skeletor-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'strange/skeletor-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'strange/skeletor-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/strange/skeletor-vim
Ⅳ. 文档说明
# Skeletor
Vim skeletons; about as simple as they come.
Installation
Preferred Method
Install [Vundle] and add Bundle 'strange/skeletor-vim' to your .vimrc.
Manual Install
Copy autoload/skeletor.vim and plugin/skeletor.vim into corresponding
directories in your vim plugin directory.
Usage
:Skeletor brings up a list of all skeletons available for the filetype of
the currently loaded file.
Something like the following in your .vimrc might be nice:
noremap <leader>s :Skeletor<CR>
Skeletons
Skeletons are just regular files (or symlinks) located at a special location.
They can have any name and any extension. The name will be used to identify
the skeleton in the list displayed by :Skeletor; the extension will be
ignored (but is nice to have as you get syntax highlighting etc when you edit
skeletons).
Skeletons must be placed in directories matching vim's filetypes. These
directories must be placed in the directory skeletons in yourruntimetpath.
This is how you'd create a skeleton for a html form, for example:
- Make sure that the directory
skeletons, in yourruntimepath, exists. - Create the directory
htmlin theskeletons-directory. - Write your form to a file called
form.htmlin yourhtml-directory.
So, on a standard unix installation you'd put your code into the file~/.vim/skeletons/html/form.html.