snippets-for-vim


Ⅰ. 插件描述

Some general snippets in Vim.

Ⅱ. 基本信息

创建日期:  2015-12-28
使用用户:  2
Github星:  0
插件作者:  Yan QiDong

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/yanqd0/snippets-for-vim

Ⅳ. 文档说明

# snippets-for-vim

Release

This is a collection of my personal snippets in Vim.

Install

Make sure the Vim plug-in SirVer/ultisnips is installed and accessable in your Vim editor.
If you use Vundle.vim, it is like this:

Plugin 'SirVer/ultisnips'
Plugin 'yanqd0/snippets-for-vim'

UltiSnips is the default path of SirVer/ultisnips If you changed that, make sure UltiSnips is always included in your vimrc.

let g:UltiSnipsSnippetDirectories = [
            \ "your_personal_snippets_directory",
            \ "UltiSnips"
            \ ]

Content

Vim

TriggerDescription
helloworldA basic "Hello world!" demo
functionA function block
ifif block
ifeif else block
ifiif elseif block
ifieif elseif else block
todo# TODO comment
fixme# FIXME comment
xxx# XXX comment

Java

TriggerDescription
helloworldA basic "Hello world!" demo
classA public class, named after file
iclassA inner class
interfaceA interface
ifif () {} block
ifeif () {} else () {} block
ifiif () {} else if () {} block
ifieif () {} else if () {} else {} block
dodo {} while (); block
whilewhile () {} block
forfor () {} block
tryctry {} catch() {} block
tryftry {} finally {} block
trycftry {} catch() {} finally {} block
syncsynchronized () {} block
todo// TODO comment
fixme// FIXME comment
xxx// XXX comment

Python

TriggerDescription
helloworldA basic "Hello world!" demo
#!#! block, file header
mainmain block
classA new class
ifif block
ifeif else block
ifiif elif block
ifieif elif else block
whilewhile block
forfor in block
tryetry except block
tryftry finally block
tryeftry except finally block
todo# TODO comment
fixme# FIXME comment
xxx# XXX comment

Shell

TriggerDescription
helloworldA basic "Hello world!" demo
#!#! block, file header
functionA function block
ifif block
ifeif else block
ifiif elif block
ifieif elif else block
casecase esac block
selectselect do done block
untiluntil do done block
whilewhile do done block
forfor do done block
todo# TODO comment
fixme# FIXME comment
xxx# XXX comment

snippets

TriggerDescription
snipAdd a new snippet.
globAdd a global block.

all

TriggerDescription
MITAdd a MIT License full text.
Apache2Add an Apache License 2.0 full text.
#Apache2Add a # comment header of Apache2 .
/*Apache2Add a /* comment */ header of Apache2 .
!-Apache2Add a <!-- comment --> header of Apache2 .
GPLv2Add a GNU General Public License Version 2 full text.
#GPLv2Add a # comment header of GPLv2 .
/*GPLv2Add a /* comment */ header of GPLv2 .
!-GPLv2Add a <!-- comment --> header of GPLv2 .
GPLv3Add a GNU General Public License Version 3 full text.
#GPLv3Add a # comment header of GPLv3 .
/*GPLv3Add a /* comment */ header of GPLv3 .
!-GPLv3Add a <!-- comment --> header of GPLv3 .

License

License

The MIT License (MIT)

Copyright (c) 2016 yanqd0@outlook.com

添加新评论