Ⅰ. 插件描述
A script to converting tabs to spaces and auto save with remove spaces in end of lineⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'dongweiming/vary-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'dongweiming/vary-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'dongweiming/vary-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/dongweiming/vary.vim
Ⅳ. 文档说明
vary.vim
A script to converting tabs to spaces and auto save with remove spaces in end of line
Install
Note: I recommend using Tim Pope's pathogen plugin to install this.
See vim-pathogen. If you've installed
pathogen properly you can install Vary with the following commands.
$ cd ~/.vim/bundle
$ git clone https://github.com/dongweiming/vary.vimIf you do not use some kind of plug-in management tools, you can use the following
methods to install.
$ mkdir ~/.vim/{plugin,doc} -p
$ git clone https://github.com/dongweiming/vary.vim
$ mv vary.vim/doc/vary.txt ~/.vim/docUsage
You need to set the following two types of variables to ~/.vimrc:
set tabstop=4 #<tab> inserts 4 spaces
let g:auto_striptrail = "python,ruby" # Set want to automatically remove
#trailing spaces language types, the default is 'python'
let g:auto_striptab = "python,ruby,cpp" # Set automatically converted
#into spaces <tab> type of language