Ⅰ. 插件描述
This script helps to work with code snippets.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/snippetsmgr'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/snippetsmgr'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/snippetsmgr'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/SnippetsMgr
Ⅳ. 文档说明
This script helps to work with code snippets. It provides functions to insert, edit, create, delete and rename code snippets.
Snippets are files that can be loaded into the active buffer (e.g. programmers can easily add a template function header when writing a new function or add often used codes).
To invoke the snippets manager, press <leader>sm
Memory aid: sm (s)nippets(m)anager
In the current window a list of code snippets will be shown. To copy a snippet into the buffer in which SnippetsMgr was invoked, move cursor over a snippet and press <enter>. That's it.
Simple and not very useful code snippets are provided with this script. See them as examples and as starting point to write own ones. Code snippets are very personal. To use them in an efficient way you will have to write your owns.