From 9f140581e08b255697a4d824ac57559a04c416e0 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 6 Feb 2011 20:37:35 +0100 Subject: misc updates Signed-off-by: Florian Pritz --- vim/vim-7.2/spell/fixdup.vim | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 vim/vim-7.2/spell/fixdup.vim (limited to 'vim/vim-7.2/spell/fixdup.vim') diff --git a/vim/vim-7.2/spell/fixdup.vim b/vim/vim-7.2/spell/fixdup.vim deleted file mode 100644 index 0dd532d..0000000 --- a/vim/vim-7.2/spell/fixdup.vim +++ /dev/null @@ -1,27 +0,0 @@ -" 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 - 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 -- cgit v1.2.3-24-g4f1b