license-to-vim


Ⅰ. 插件描述

License your code from Vim like a secret agent

Ⅱ. 基本信息

创建日期:  2016-03-18
使用用户:  6
Github星:  18
插件作者:  Alex Arslan

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/ararslan/license-to-vim

Ⅳ. 文档说明

# license-to-vim

This is a simple Vim plugin that gives you the license to license your code.
You can insert a license right into your code without leaving Vim!

The table below lists all licenses currently available in this plugin, as well as the abbreviation used by the plugin and whether the license suggests adding a stub.

LicenseAbbreviationStub
GNU Affero General Public License 3.0agplYes
Apache License 2.0apacheYes
Artistic License 2.0artisticNo
Beerware License 42beerNo
Blue Oak Model License 1.0blue-oakNo
Boost Software License 1.0boostNo
BSD 2-Clause Licensebsd-2No
BSD 3-Clause Licensebsd-3No
CC0 1.0cc0Yes
Eclipse Public License 1.0eplNo
European Union Public License 1.2 (EN)euplNo
GNU General Public License 2.0gpl-2Yes
GNU General Public License 3.0gpl-3Yes
ISC LicenseiscNo
GNU Lesser General Public License 2.1lgpl-2Yes
GNU Lesser General Public License 3.0lgpl-3Yes
MIT LicensemitNo
Mozilla Public License 2.0mplNo
Microsoft Public Licensems-plNo
Microsoft Reciprocal Licensems-rlNo
University of Illinois/NCSA Open Source LicenseuiucNo
UnlicenseunlicenseNo
Do What The Fuck You Want To Public LicensewtfNo

Don't see the license you want?
Open an issue and I'd be happy to add it.

To insert the full text of a license at the top of the file, enter :License('abbr'), where abbr refers to the abbreviation in the table.
Some licenses require that license stubs be inserted at the top of files.
(See the Stub column in the table.)
For applicable licenses, you can get the stub using :Stub('abbr').
Calling :Stub on licenses without an available stub causes an error.

Some licenses and stubs require a year, author, and/or email address.
This plugin automatically populates those for you!
The year always uses the current year, but to set your name and email address, add these lines to your .vimrc or equivalent:

let g:license_author = 'Rick Astley'
let g:license_email = 'rickroll@example.com'

Though, unless you happen to be Rick Astley, you should use your own information.
You don't need to set these values; if the variables aren't set, the author and email in the inserted license text will appear as {AUTHOR} and {EMAIL}, respectively.

Installation

If you don't have a preferred installation method, I recommend installing Vim Plug.
Then just add

Plug 'ararslan/license-to-vim'

to your .vimrc or equivalent and submit :source % then :PlugInstall.

License

Copyright (C) 2016, Alex Arslan. Distributed under the same terms as Vim itself. See :help license.

添加新评论