Ⅰ. 插件描述
Highlights trailing whitespace in red and provides :FixWhitespace to fix it.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'bronson/trailing-whitespace'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'bronson/trailing-whitespace'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'bronson/trailing-whitespace'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/bronson/vim-trailing-whitespace
Ⅳ. 文档说明
This plugin causes trailing whitespace to be highlighted in red.
To fix the whitespace errors, call :FixWhitespace. By default it
operates on the entire file. Pass a range (or use V to select some lines)
to restrict the portion of the file that gets fixed.
The repo is at http://github.com/bronson/vim-trailing-whitespace
Originally based on http://vim.wikia.com/wiki/Highlight_unwanted_spaces
License: cc-by-sa. The instructions this plugin is based on were
licensed cc-by-sa so, until a reason to force a different license appears,
we'll continue to use it.
A more complete alternative is at https://github.com/ntpeters/vim-better-whitespace