Server : Apache System : Linux host44.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64 User : vapecompany ( 2719) PHP Version : 7.4.33 Disable Function : NONE Directory : /proc/thread-self/root/usr/share/vim/vim80/spell/ |
Upload File : |
" 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