Mercurial > vim
view runtime/spell/fixdup.vim @ 26321:a74dd2014b04 v8.2.3691
patch 8.2.3691: build failure with small features
Commit: https://github.com/vim/vim/commit/f566666e888685b6442a0e7f34c73ba56f6db49a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Nov 28 21:33:36 2021 +0000
patch 8.2.3691: build failure with small features
Problem: Build failure with small features.
Solution: Add #ifdef. (Dominique Pell?)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 28 Nov 2021 22:45:05 +0100 |
parents | 7cfe57329284 |
children |
line wrap: on
line source
" Vim script to fix duplicate words in a .dic file vim: set ft=vim: " " Usage: Edit the .dic file and source this script. let deleted = 0 " Start below the word count. let lnum = 2 while lnum <= line('$') let word = getline(lnum) if word !~ '/' if search('^' . word . '/', 'w') != 0 let deleted += 1 exe lnum . "d" continue " don't increment lnum, it's already at the next word endif endif if lnum%1000 == 0 echon "\r Processing line ".lnum. printf(" [ %02d%%]", lnum*100/line('$')) endif let lnum += 1 endwhile if deleted == 0 echomsg "No duplicate words found" elseif deleted == 1 echomsg "Deleted 1 duplicate word" else echomsg printf("Deleted %d duplicate words", deleted) endif