Ⅰ. 插件描述
Compute checksums on files or linesⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/checksum-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/checksum-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/checksum-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/checksum.vim
Ⅳ. 文档说明
Compute MD5 or SHA1 checksum of entire file or range of lines.
Store checksum in buffer variable or in user-specified
register. Uses external programs to compute checksums;
currently supports GNU md5sum, GNU sha1sum, and OpenSSL.
If you are a Windows user, you should install GNU CoreUtils
for Windows
(http://gnuwin32.sourceforge.net/downlinks/coreutils.php)
or Win32 OpenSSL
(http://www.slproweb.com/products/Win32OpenSSL.html)
Usage:
:{range}Md5 [register] - displays MD5 checksum for given range
of lines (default is entire file) and stores in b:md5sum and
the register named as an argument.
:{range}Sha1 [register] - displays SHA1 checksum for given
range of lines (default is entire file) and stores in
b:sha1sum and the register named as an argument.
<Leader>md - displays MD5 checksum for entire file or visual
selection and stores in b:md5sum
<Leader>sh - displays SHA1 checksum for entire file or visual
selection and stores in b:sha1sum