From 44bfbe0fdd70a76f5c8340424893272a4a92cc59 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Thu, 18 Dec 2014 17:33:27 +0100 Subject: [spell] files. --- spell/check_locales.vim | 21 +++++++++++++++++++++ spell/cleanadd.vim | 32 ++++++++++++++++++++++++++++++++ spell/de.utf-8.spl | Bin 0 -> 2388148 bytes spell/de.utf-8.sug | Bin 0 -> 7989986 bytes spell/en.ascii.spl | Bin 0 -> 568018 bytes spell/en.ascii.sug | Bin 0 -> 555651 bytes spell/en.latin1.spl | Bin 0 -> 570117 bytes spell/en.latin1.sug | Bin 0 -> 556476 bytes spell/en.utf-8.spl | Bin 0 -> 570548 bytes spell/en.utf-8.sug | Bin 0 -> 556476 bytes spell/fixdup.vim | 27 +++++++++++++++++++++++++++ spell/fr.utf-8.spl | Bin 0 -> 571626 bytes spell/fr.utf-8.sug | Bin 0 -> 2324314 bytes spell/he.vim | 10 ++++++++++ spell/spell.vim | 4 ++++ spell/yi.vim | 10 ++++++++++ 16 files changed, 104 insertions(+) create mode 100644 spell/check_locales.vim create mode 100644 spell/cleanadd.vim create mode 100644 spell/de.utf-8.spl create mode 100644 spell/de.utf-8.sug create mode 100644 spell/en.ascii.spl create mode 100644 spell/en.ascii.sug create mode 100644 spell/en.latin1.spl create mode 100644 spell/en.latin1.sug create mode 100644 spell/en.utf-8.spl create mode 100644 spell/en.utf-8.sug create mode 100644 spell/fixdup.vim create mode 100644 spell/fr.utf-8.spl create mode 100644 spell/fr.utf-8.sug create mode 100644 spell/he.vim create mode 100644 spell/spell.vim create mode 100644 spell/yi.vim diff --git a/spell/check_locales.vim b/spell/check_locales.vim new file mode 100644 index 0000000..fe7be93 --- /dev/null +++ b/spell/check_locales.vim @@ -0,0 +1,21 @@ +" Script to check if all the locales used in spell files are available. + +grep /sys env LANG/ */main.aap +let not_supported = [] +for item in getqflist() + let lang = substitute(item.text, '.*LANG=\(\S\+\).*', '\1', '') + try + exe 'lang ' . lang + catch /E197/ + call add(not_supported, lang) + endtry +endfor + +if len(not_supported) > 0 + echo "Unsupported languages:" + for l in not_supported + echo l + endfor +else + echo "Everything appears to be OK" +endif diff --git a/spell/cleanadd.vim b/spell/cleanadd.vim new file mode 100644 index 0000000..6dc0692 --- /dev/null +++ b/spell/cleanadd.vim @@ -0,0 +1,32 @@ +" Vim script to clean the ll.xxxxx.add files of commented out entries +" Author: Antonio Colombo, Bram Moolenaar +" Last Update: 2008 Jun 3 + +" Time in seconds after last time an ll.xxxxx.add file was updated +" Default is one second. +" If you invoke this script often set it to something bigger, e.g. 60 * 60 +" (one hour) +if !exists("g:spell_clean_limit") + let g:spell_clean_limit = 1 +endif + +" Loop over all the runtime/spell/*.add files. +" Delete all comment lines, except the ones starting with ##. +for s:fname in split(globpath(&rtp, "spell/*.add"), "\n") + if filewritable(s:fname) && localtime() - getftime(s:fname) > g:spell_clean_limit + if exists('*fnameescape') + let s:f = fnameescape(s:fname) + else + let s:f = escape(s:fname, ' \|<') + endif + silent exe "tab split " . s:f + echo "Processing" s:f + silent! g/^#[^#]/d + silent update + close + unlet s:f + endif +endfor +unlet s:fname + +echo "Done" diff --git a/spell/de.utf-8.spl b/spell/de.utf-8.spl new file mode 100644 index 0000000..493e487 Binary files /dev/null and b/spell/de.utf-8.spl differ diff --git a/spell/de.utf-8.sug b/spell/de.utf-8.sug new file mode 100644 index 0000000..e72c63a Binary files /dev/null and b/spell/de.utf-8.sug differ diff --git a/spell/en.ascii.spl b/spell/en.ascii.spl new file mode 100644 index 0000000..b0735c6 Binary files /dev/null and b/spell/en.ascii.spl differ diff --git a/spell/en.ascii.sug b/spell/en.ascii.sug new file mode 100644 index 0000000..cede5c7 Binary files /dev/null and b/spell/en.ascii.sug differ diff --git a/spell/en.latin1.spl b/spell/en.latin1.spl new file mode 100644 index 0000000..d24b790 Binary files /dev/null and b/spell/en.latin1.spl differ diff --git a/spell/en.latin1.sug b/spell/en.latin1.sug new file mode 100644 index 0000000..e4800bf Binary files /dev/null and b/spell/en.latin1.sug differ diff --git a/spell/en.utf-8.spl b/spell/en.utf-8.spl new file mode 100644 index 0000000..1a39de1 Binary files /dev/null and b/spell/en.utf-8.spl differ diff --git a/spell/en.utf-8.sug b/spell/en.utf-8.sug new file mode 100644 index 0000000..1add0c6 Binary files /dev/null and b/spell/en.utf-8.sug differ diff --git a/spell/fixdup.vim b/spell/fixdup.vim new file mode 100644 index 0000000..0dd532d --- /dev/null +++ b/spell/fixdup.vim @@ -0,0 +1,27 @@ +" 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 diff --git a/spell/fr.utf-8.spl b/spell/fr.utf-8.spl new file mode 100644 index 0000000..b045682 Binary files /dev/null and b/spell/fr.utf-8.spl differ diff --git a/spell/fr.utf-8.sug b/spell/fr.utf-8.sug new file mode 100644 index 0000000..1a6a54d Binary files /dev/null and b/spell/fr.utf-8.sug differ diff --git a/spell/he.vim b/spell/he.vim new file mode 100644 index 0000000..76f52c4 --- /dev/null +++ b/spell/he.vim @@ -0,0 +1,10 @@ +" For Hebrew capitals should not be checked. But only change the +" 'spellcapcheck' option when it is not at its default value. +let s:spc = &l:spc +setlocal spc& +if s:spc == &l:spc + setlocal spc= +else + let &l:spc = s:spc +endif +unlet s:spc diff --git a/spell/spell.vim b/spell/spell.vim new file mode 100644 index 0000000..375b088 --- /dev/null +++ b/spell/spell.vim @@ -0,0 +1,4 @@ +" Settings for when generating spellfiles. +" +" Assume we have 2 Gbyte RAM available. +set mkspellmem=1800000,6000,1600 diff --git a/spell/yi.vim b/spell/yi.vim new file mode 100644 index 0000000..c08cf8c --- /dev/null +++ b/spell/yi.vim @@ -0,0 +1,10 @@ +" For Yiddish capitals should not be checked. But only change the +" 'spellcapcheck' option when it is not at its default value. +let s:spc = &l:spc +setlocal spc& +if s:spc == &l:spc + setlocal spc= +else + let &l:spc = s:spc +endif +unlet s:spc -- cgit v1.2.3