Ⅰ. 插件描述
Robert KellyIV's vim plugin to delete duplicate lines / delete blank lines.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'duff/ddldbl-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'duff/ddldbl-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'duff/ddldbl-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/duff/vim-ddldbl
Ⅳ. 文档说明
description
This is just a normal ol plugin; NOT ftplugin (there really should be a plugin option in the type field when adding a new script... hint hint :) )
This is a quick/simple implimtation to delete duplicate lines (:DDL) and delete blank lines (:DBL)
Both commands can take a range and DEFAULT TO THE ENTIRE FILE.
Both of these commands delete lines so be carefull!
:DBL (delete blank lines) is little more than a command front end to a :g command.
:DDL (delete duplicate lines) opens folds, starts at th top of the range and goes down. For each duplicate line found it is :delete
End result is you can select a portion of a file and quickily and easily delete blank lines and or delete duplicate lines.
install details
Install:
Drop the file into your PLUGIN folder (not ftplugin!)
Uninstall:
Simply remove the file.
To Test drive:
Just install and :DDL &&|| :DBL some test file. Uninstall if desired.