uniq.vim : Emulations of the 'uniq' utility in Vim script
script karma |
Rating 22/7,
Downloaded by 1346 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Steve Hall |
|
script type |
utility |
|
description |
This script provides several examples of the Unix "uniq" utility emulated entirely with Vim script, found during some brief research through the Vim list archives. Like the original uniq, each requires the selected lines "uniq-ed" to already be sorted so that duplicates are adjacent.
Note that there are generally two approches here. The first uses the getline() function to examine adjacent lines and is used by the first two examples. A second approach is illustrated by the last three examples which use a single global or substitution command to accomplish the same purpose.
We share this compilation in hopes that it might be helpful. The actual origins of each section are documented below. Use at your own risk!
|
|
install details |
Please read the code to understand each example's usage. Drop into your plugin folders to have the various commands and functions available.
|
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.223.162.245
|