diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-08-23 21:02:42 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-08-23 21:02:42 +0000 |
commit | 6f16eb817ba8b32c012e910e83bad98f1fe17f05 (patch) | |
tree | 9e21f9e8f0426644aa7abf3a8d622ade73c0a881 /runtime | |
parent | 7862282f2edc76533c5c0dcf49b57bf747a30ebc (diff) |
updated for version 7.0135
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 5 | ||||
-rw-r--r-- | runtime/doc/options.txt | 9 | ||||
-rw-r--r-- | runtime/doc/spell.txt | 81 | ||||
-rw-r--r-- | runtime/spell/th/main.aap | 66 | ||||
-rw-r--r-- | runtime/spell/yi/yi.diff | 2 |
5 files changed, 128 insertions, 35 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index c18959678d..b412734e6f 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.0aa. Last change: 2005 Aug 11 +*eval.txt* For Vim version 7.0aa. Last change: 2005 Aug 23 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2013,11 +2013,12 @@ cscope_connection([{num} , {dbpath} [, {prepend}]]) < cursor({lnum}, {col}) *cursor()* Positions the cursor at the column {col} in the line {lnum}. + The first column is one. Does not change the jumplist. If {lnum} is greater than the number of lines in the buffer, the cursor will be positioned at the last line in the buffer. If {lnum} is zero, the cursor will stay in the current line. - If {col} is greater than the number of characters in the line, + If {col} is greater than the number of bytes in the line, the cursor will be positioned at the last character in the line. If {col} is zero, the cursor will stay in the current column. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 802ae999c7..6a3e697202 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.0aa. Last change: 2005 Aug 21 +*options.txt* For Vim version 7.0aa. Last change: 2005 Aug 23 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1200,9 +1200,10 @@ A jump table for the options with a short description can be found at |Q_op|. these words, separated by a comma: internal Use internal case mapping functions, the current locale does not change the case mapping. This only - matters when 'encoding' is a Unicode encoding. When - "internal" is omitted, the towupper() and towlower() - system library functions are used when available. + matters when 'encoding' is a Unicode encoding, + "latin1" or "iso-8859-15". When "internal" is + omitted, the towupper() and towlower() system library + functions are used when available. keepascii For the ASCII characters (0x00 to 0x7f) use the US case mapping, the current locale is not effective. This probably only matters for Turkish. diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt index 04b3132499..2a859a9d7d 100644 --- a/runtime/doc/spell.txt +++ b/runtime/doc/spell.txt @@ -1,4 +1,4 @@ -*spell.txt* For Vim version 7.0aa. Last change: 2005 Aug 22 +*spell.txt* For Vim version 7.0aa. Last change: 2005 Aug 23 VIM REFERENCE MANUAL by Bram Moolenaar @@ -145,7 +145,8 @@ z? For the word under/after the cursor suggest correctly different). When a word was replaced the redo command "." will repeat the word replacement. This works like "ciw", - the good word and <Esc>. + the good word and <Esc>. This does NOT work for Thai + and other languages without spaces between words. *:spellr* *:spellrepall* *E752* *E753* :spellr[epall] Repeat the replacement done by |z?| for all matches @@ -435,8 +436,7 @@ then Vim will try to guess. into one en.spl file. Up to eight regions can be combined. *E754* *755* The REP and SAL items of the first .aff file where - they appear are used. |spell-affix-REP| - |spell-affix-SAL| + they appear are used. |spell-REP| |spell-SAL| This command uses a lot of memory, required to find the optimal word tree (Polish, Italian and Hungarian @@ -602,15 +602,6 @@ used to modify the basic words to get the full word list. This significantly reduces the number of words, especially for a language like Polish. This is called affix compression. -The format for the affix and word list files is mostly identical to what -Myspell uses (the spell checker of Mozilla and OpenOffice.org). A description -can be found here: - http://lingucomponent.openoffice.org/affix.readme ~ -Note that affixes are case sensitive, this isn't obvious from the description. - -Vim supports a few extras. Hopefully Myspell will support these too some day. -See |spell-affix-vim|. - The basic word list and the affix file are combined and turned into a binary spell file. All the preprocessing has been done, thus this file loads fast. The binary spell file format is described in the source code (src/spell.c). @@ -620,6 +611,19 @@ The preprocessing also allows us to take the Myspell language files and modify them before the Vim word list is made. The tools for this can be found in the "src/spell" directory. +The format for the affix and word list files is based on what Myspell uses +(the spell checker of Mozilla and OpenOffice.org). A description can be found +here: + http://lingucomponent.openoffice.org/affix.readme ~ +Note that affixes are case sensitive, this isn't obvious from the description. + +Vim does not use the TRY item, it is ignored. For making suggestions the +possible characters in the words are used. + +Vim supports quite a few extras. They are described below |spell-affix-vim|. +Attempts have been made to keep this compatible with other spell checkers, so +that the same files can be used. + WORD LIST FORMAT *spell-dic-format* @@ -635,6 +639,7 @@ A very short example, with line numbers: 8 bedel/P 9 kado/1 10 cadeau/2 + 11 TCP,IP The first line contains the number of words. Vim ignores it, but you do get an error message if it's not there. *E760* @@ -659,7 +664,7 @@ The word with all upper-case characters will always be OK. AlS AlS ALS als Als ALs aLs aLS The KEP affix ID can be used to specifically match a word with identical case -only, see below |spell-affix-KEP|. +only, see below |spell-KEP|. Note in line 5 to 7 that non-word characters are used. You can include any character in a word. When checking the text a word still only matches @@ -671,6 +676,11 @@ letters that indicate the affixes that can be used with this word. These are specified with SFX and PFX lines in the .aff file. See the Myspell documentation. +In line 12 the word "TCP/IP" is defined. Since the slash has a special +meaning the comma is used instead. This is defined with the SLASH item in the +affix file, see |spell-SLASH|. Note that without this SLASH item the +word will be "TCP,IP". + *spell-affix-vim* A flag that Vim adds and is not in Myspell is the flag defined with KEP in the affix file. This has the meaning that case matters. This can be used if the @@ -701,8 +711,8 @@ word characters (as specified with ENC). This is because the system where ":mkspell" is used may not support a locale with this encoding and isalpha() won't work. For example when using "cp1250" on Unix. - *E761* *E762* *spell-affix-FOL* - *spell-affix-LOW* *spell-affix-UPP* + *E761* *E762* *spell-FOL* + *spell-LOW* *spell-UPP* Three lines in the affix file are needed. Simplistic example: FOL áëñ ~ @@ -722,6 +732,10 @@ The "UPP" line specifies the characters with upper-case. That is, a character is upper-case where it's different from the character at the same position in "FOL". +An exception is made for the German sharp s ß. The upper-case version is +"SS". In the FOL/LOW/UPP lines it should be included, so that it's recognized +as a word character, but use the ß character in all three. + ASCII characters should be omitted, Vim always handles these in the same way. When the encoding is UTF-8 no word characters need to be specified. @@ -754,7 +768,7 @@ These characters are defined with MIDWORD in the .aff file: AFFIXES - *spell-affix-PFX* *spell-affix-SFX* + *spell-PFX* *spell-SFX* The usual PFX (prefix) and SFX (suffix) lines are supported (see the Myspell documentation or the Aspell manual: http://aspell.net/man-html/Affix-Compression.html). @@ -793,7 +807,7 @@ Example: This allows for "wordutil" and "wordutils" but not "wordutilize". - *spell-affix-PFXPOSTPONE* + *spell-PFXPOSTPONE* When an affix file has very many prefixes that apply to many words it's not possible to build the whole word list in memory. This applies to Hebrew (a list with all words is over a Gbyte). In that case applying prefixes must be @@ -809,7 +823,7 @@ but in lower case. Thus when the chop string is used to allow the following word to start with an upper case letter. -WORDS WITH A SLASH *spell-affix-SLASH* +WORDS WITH A SLASH *spell-SLASH* The slash is used in the .dic file to separate the basic word from the affix letters that can be used. Unfortunately, this means you cannot use a slash in @@ -824,7 +838,7 @@ Of course, the letter used should itself not appear in any word! The letter must be ASCII, thus a single byte. -KEEP-CASE WORDS *spell-affix-KEP* +KEEP-CASE WORDS *spell-KEP* In the affix file a KEP line can be used to define the affix name used for keep-case words. Example: @@ -834,7 +848,7 @@ keep-case words. Example: See above for an example |spell-affix-vim|. -RARE WORDS *spell-affix-RAR* +RARE WORDS *spell-RAR* In the affix file a RAR line can be used to define the affix name used for rare words. Example: @@ -847,7 +861,7 @@ a typing mistake anyway. When the same word is found as good it won't be highlighted as rare. -BAD WORDS *spell-affix-BAD* +BAD WORDS *spell-BAD* In the affix file a BAD line can be used to define the affix name used for bad words. Example: @@ -862,14 +876,14 @@ This can be used to exclude words that would otherwise be good. For example Once a word has been marked as bad it won't be undone by encountering the same word as good. - *spell-affix-NEEDAFFIX* + *spell-NEEDAFFIX* The NEEDAFFIX flag is used to require that a word is used with an affix. The word itself is not a good word. Example: NEEDAFFIX + ~ -COMPOUND WORDS *spell-affix-compound* +COMPOUND WORDS *spell-compound* A compound word is a longer word made by concatenating words that appear in the .dic file. To specify which words may be concatenated a character is @@ -988,6 +1002,17 @@ Above another way to restrict compounding was mentioned above: adding "nocomp" after an affix causes all words that are made with that affix not be be used for compounding. |spell-affix-nocomp| + +UNLIMITED COMPOUNDING *spell-NOBREAK* + +For some languages, such as Thai, there is no space in between words. This +looks like all words are compounded. To specify this use the NOBREAK item in +the affix file, without arguments: + NOBREAK ~ + +Vim will try to figure out where one word ends and a next starts. When there +are spelling mistakes this may not be quite right. + >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< NOTE: The following has not been implemented yet, because there are no word lists that support this. @@ -1028,7 +1053,7 @@ lists that support this. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -REPLACEMENTS *spell-affix-REP* +REPLACEMENTS *spell-REP* In the affix file REP items can be used to define common mistakes. This is used to make spelling suggestions. The items define the "from" text and the @@ -1046,7 +1071,7 @@ anyway. You can include whole words if you want to, but you might want to use the "file:" item in 'spellsuggest' instead. -SIMILAR CHARACTERS *spell-affix-MAP* +SIMILAR CHARACTERS *spell-MAP* In the affix file MAP items can be used to define letters that are very much alike. This is mostly used for a letter with different accents. This is used @@ -1062,7 +1087,7 @@ Each letter must appear in only one of the MAP items. It's a bit more efficient if the first letter is ASCII or at least one without accents. -SOUND-A-LIKE *spell-affix-SAL* +SOUND-A-LIKE *spell-SAL* In the affix file SAL items can be used to define the sounds-a-like mechanism to be used. The main items define the "from" text and the "to" replacement. @@ -1086,7 +1111,7 @@ There are a few special items: "1" has the same meaning as "true". Any other value means "false". -SIMPLE SOUNDFOLDING *spell-affix-SOFOFROM* *spell-affix-SOFOTO* +SIMPLE SOUNDFOLDING *spell-SOFOFROM* *spell-SOFOTO* The SAL mechanism is complex and slow. A simpler mechanism is mapping all characters to another character, mapping similar sounding characters to the diff --git a/runtime/spell/th/main.aap b/runtime/spell/th/main.aap new file mode 100644 index 0000000000..e2ec6606d8 --- /dev/null +++ b/runtime/spell/th/main.aap @@ -0,0 +1,66 @@ +# Aap recipe for Thai Vim spell files. + +# Use a freshly compiled Vim if it exists. +@if os.path.exists('../../../src/vim'): + VIM = ../../../src/vim +@else: + :progsearch VIM vim + +SPELLDIR = .. +FILES = th.aff th.dic + +all: $SPELLDIR/th.utf-8.spl ../README_th.txt + +$SPELLDIR/th.utf-8.spl : $FILES + :sys $VIM -u NONE -e -c "set enc=utf-8" + -c "mkspell! $SPELLDIR/th th" -c q + +../README_th.txt: README_th.txt + :copy $source $target + +# +# Fetching the files from http://sesrc.th.net +# +HTTPDIR = http://seasrc.th.net/dict +ZIPNAME = th_18057.zip +FNAME = TH_18057.TXT + +:attr {fetch = $HTTPDIR/%file%} $ZIPNAME + +# The files don't depend on the .zip file so that we can delete it. +# Only download the zip file if the targets don't exist. +# This is a bit tricky, since the file name includes the date. +# +# We get a plain list of Thai words and make the .dic file from that. The .aff +# file is made from scratch. +th.aff th.dic: {buildcheck=} + :assertpkg unzip iconv + :fetch $ZIPNAME + :sys unzip $ZIPNAME + :sys {force} iconv -c -f TIS-620 -t UTF-8 <$FNAME >th.dic + :delete $ZIPNAME $FNAME + + :delete {force} th.aff + :touch {force} th.aff + @if not os.path.exists('th.orig.aff'): + :touch {force} th.orig.aff + @if not os.path.exists('th.orig.dic'): + :copy th.dic th.orig.dic + @if os.path.exists('th.diff'): + :sys patch <th.diff + + +# Generate diff files, so that others can get the OpenOffice files and apply +# the diffs to get the Vim versions. + +diff: + :assertpkg diff + :sys {force} diff -N -a -C 1 th.orig.aff th.aff >th.diff + :sys {force} diff -a -C 1 th.orig.dic th.dic >>th.diff + + +# Check for updated spell files. When there are changes the +# ".new.aff" and ".new.dic" files are left behind for manual inspection. + +check: + :print Sorry, not supported. diff --git a/runtime/spell/yi/yi.diff b/runtime/spell/yi/yi.diff index 6db3f0104e..d14a5926c8 100644 --- a/runtime/spell/yi/yi.diff +++ b/runtime/spell/yi/yi.diff @@ -6,7 +6,7 @@ + 999999 ×’×¨×•× ×˜×¢×œ×¢×ž×¢× ×˜ דזש×Ö¸×‘×¢× ×“×™×§×¡ -*** /dev/null Fri Aug 19 23:01:14 2005 +*** /dev/null Tue Aug 23 22:51:11 2005 --- yi.aff Mon Aug 15 23:06:00 2005 *************** *** 0 **** |