strip_trailing_whitespace.vim


Ⅰ. 插件描述

Strip trailing whitespace exactly the way this author wants

Ⅱ. 基本信息

创建日期:  2018-05-31
使用用户:  0
Github星:  0
插件作者:  Tom Ryder

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone 

Ⅳ. 文档说明

This plugin provides a user command with the author's approach to stripping trailing whitespace from an entire buffer, including removing empty or whitespace-only lines at the end of the buffer, without making command noise and without moving the cursor from its current position.

This is a very commonly written and implemented plugin, but I wrote my own because I could not find a plugin that did this in exactly the way I wanted:

  • Accept an optional range
  • Strip trailing lines as well as trailing spaces
  • Report what was changed, accurately
  • Work with even very old Vim (>=6.0)
  • Work with a single undo
  • Don't move the cursor
  • Don't change the search pattern
  • Don't define an autocmd
  • Don't force a key mapping
  • Don't define a global function

https://sanctum.geek.nz/cgit/vim-strip-trailing-whitespace.git

添加新评论