1
0
forked from aniani/vim

updated for version 7.0137

This commit is contained in:
Bram Moolenaar 2005-08-25 21:27:31 +00:00
parent 955295684b
commit 81f1ecbc4d
14 changed files with 7329 additions and 71 deletions

View File

@ -1,4 +1,4 @@
*spell.txt* For Vim version 7.0aa. Last change: 2005 Aug 24
*spell.txt* For Vim version 7.0aa. Last change: 2005 Aug 25
VIM REFERENCE MANUAL by Bram Moolenaar
@ -775,16 +775,16 @@ item can be used if more affixes are to be used. Possible values:
FLAG long use two-character flags
FLAG num use numbers, from 1 up to 65000
FLAG huh use one-character flags without A-Z and two-character
FLAG caplong use one-character flags without A-Z and two-character
flags that start with A-Z
With "FLAG num" the numbers in a list of affixes need to be separated with a
comma: "234,2143,1435". This method is inefficient, but useful if the file is
generated with a program.
When using "huh" the two-character flags all start with a capital: "Aa", "B1",
"BB", etc. This is useful to use one-character flags for the most common
items and two-character flags for uncommon items.
When using "caplong" the two-character flags all start with a capital: "Aa",
"B1", "BB", etc. This is useful to use one-character flags for the most
common items and two-character flags for uncommon items.
Note: When using utf-8 only characters up to 65000 may be used for flags.
@ -802,6 +802,17 @@ Example:
SFX F 0 in [^i]n # Spion > Spionin ~
SFX F 0 nen in # Bauerin > Bauerinnen ~
Apparently Myspell allows an affix name to appear more than once. Since this
might also be a mistake, Vim checks for an extra "S". The affix files for
Myspell that use this feature apparently have this flag. Example:
SFX a Y 1 S ~
SFX a 0 an . ~
SFX a Y 2 S ~
SFX a 0 en . ~
SFX a 0 on . ~
*spell-affix-rare*
An extra item for Vim is the "rare" flag. It must come after the other
fields, before a comment. When used then all words that use the affix will be

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.0aa. Last change: 2005 Aug 24
*todo.txt* For Vim version 7.0aa. Last change: 2005 Aug 25
VIM REFERENCE MANUAL by Bram Moolenaar
@ -31,16 +31,29 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
-------------------- Known bugs and current work -----------------------
Spelling:
- Bug: with 'nowrap' spell checking may start halfway a word.
- Use 'wrapscan' for "[s" and "]s"?
- Is there a way to avoid compound IDs taking two utf-8 bytes?
- Make COMPOUNDMIN 3 characters instead of 3 bytes.
- Check support of flags of two characters, numbers (comma separated) and HUH.
When using many compound flags, does regexp still work?
- Compound word is accepted if nr of words is <= COMPOUNDMAX OR nr of
syllables <= COMPOUNDSYLMAX. Specify AND in the affix file?
- ONLYINCOMPOUND -> NEEDCOMPOUND (also used for affix? or use "needcomp"
after affix)
- COMPOUNDMAX -> COMPOUNDWORDMAX?
- Support flags on a suffix. Used for second level affixes.
The flags may also be used for compounding. Default is an OR mechanism with
the flags of the word. Adding "compset" on the affixes means the compound
flags of the word are not used.
Instead of "SFX a 0 add/FLAGS ." we could use "SFX a 0 add . /FLAGS".
- Do we need a flag for the rule that when compounding is done the following
word doesn't have a capital after a word character, even for Onecap words?
@ -51,20 +64,15 @@ Spelling:
- Example with compounding dash is bad, gets in the way of setting
COMPOUNDMIN and COMPOUNDMAX to a reasonable value.
- PSEUDOROOT == NEEDAFFIX
- Make COMPOUNDMIN 3 characters instead of 3 bytes?
- COMPOUNDMAX -> COMPOUNDWORDMAX?
- ONLYINCOMPOUND -> NEEDCOMPOUND (also used for affix? or use "needcomp"
after affix)
- Use "comp" flag on affix to allow compounding for word that uses this
affix. However, also need to define which compound flag to be used.
"comp/m"? Alternative: use flags after add string.
- COMPOUNDROOT -> COMPOUNDED? For a word that already is a compound word
Or use COMPOUNDED2, COMPOUNDED3, etc.
- CIRCUMFIX: when a word uses a prefix marked with the CIRCUMFIX flag,
then the word must also have a suffix marked with the CIRCUMFIX flag.
It's a bit primitive, since only one flag is used, which doesn't allow
matching specific prefixes with suffixes.
Alternative:
PSFX {flag} {pchop} {padd} {pcond} {schop} {sadd}[/flags] {scond}
- Support two suffixes by adding "/flags" to add part of suffix.
We might not need this at all, you can use the NEEDAFFIX flag.
- When a suffix has more than one syllable, it may count as a word for
COMPOUNDMAX.
- Add flags to count extra syllables in a word. SYLLABLEADDONE

View File

@ -1,5 +1,5 @@
*** de_CH.orig.aff Mon Aug 15 22:45:43 2005
--- de_CH.aff Mon Aug 15 22:54:21 2005
*** de_CH.orig.aff Thu Aug 25 11:22:18 2005
--- de_CH.aff Thu Aug 25 11:22:18 2005
***************
*** 3,4 ****
--- 3,24 ----

View File

@ -22,9 +22,9 @@ SPELLDIR = ..
FILES = de_$*(REGIONS).aff de_$*(REGIONS).dic
ZIPFILE_DE = de_DE_comb.zip
ZIPFILE_19 = de_DE.zip
ZIPFILE_19 = de_OLDSPELL.zip
ZIPFILE_20 = de_DE_neu.zip
ZIPFILE_AT = de_AT.zip
ZIPFILE_AT = de_DE.zip
ZIPFILE_CH = de_CH.zip
ZIPFILES = $ZIPFILE_DE $ZIPFILE_19 $ZIPFILE_20 $ZIPFILE_AT $ZIPFILE_CH
@ -57,10 +57,13 @@ $SPELLDIR/de.utf-8.spl : $FILES
:cat README_de_CH.txt >> $target
#
# Fetching the files from OpenOffice.org.
# Fetching the files from the OpenOffice.org site.
# The OLDSPELL file comes from elsewhere
#
OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
DEDIR = http://www.j3e.de/myspell
:attr {fetch = $OODIR/%file%} $ZIPFILES
:attr {fetch = $DEDIR/%file%} $ZIPFILE_19
# 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.
@ -82,23 +85,12 @@ de_DE.aff de_DE.dic: {buildcheck=}
de_19.aff de_19.dic: {buildcheck=}
:assertpkg unzip patch
:fetch $ZIPFILE_19
# Move the other files out of the way.
@if os.path.exists("de_DE.aff"):
:move de_DE.aff de_DE_comb.aff
:move de_DE.dic de_DE_comb.dic
:move README_de_DE.txt README_de_DE_comb.txt
:sys $UNZIP $ZIPFILE_19
:delete $ZIPFILE_19
:delete {f} de_AT.dic
:move de_DE.aff de_19.aff
:move de_DE.dic de_19.dic
:move README_de_DE.txt README_de_19.txt
@if os.path.exists("de_DE_comb.aff"):
:move de_DE_comb.aff de_DE.aff
:move de_DE_comb.dic de_DE.dic
:move README_de_DE_comb.txt README_de_DE.txt
:move de_OLDSPELL.aff de_19.aff
:move de_OLDSPELL.dic de_19.dic
# there is no README file
:print There is no README file for the old spelling >!README_de_19.txt
@if not os.path.exists('de_19.orig.aff'):
:copy de_19.aff de_19.orig.aff
@if not os.path.exists('de_19.orig.dic'):
@ -121,16 +113,37 @@ de_20.aff de_20.dic: {buildcheck=}
@if os.path.exists('de_20.diff'):
:sys patch <de_20.diff
# It appears de_AT.dic is only an additional file for another word list. We
# guess it's the old spelling one and concatenate them. Complication is that
# de_AT.dic is missing a newline at the end.
de_AT.aff de_AT.dic: {buildcheck=} de_19.dic
# The de_AT.dic is included in de_DE.zip. We rename the files and concatenate
# them. Complication is that de_AT.dic is missing a newline at the end.
# And the de_DE.dic file is used for something else.
de_AT.aff de_AT.dic: {buildcheck=}
:assertpkg unzip patch
# Move de_DE files out of the way.
@if os.path.exists('de_DE.aff'):
:move de_DE.aff de_DE.temp.aff
@if os.path.exists('de_DE.dic'):
:move de_DE.dic de_DE.temp.dic
@if os.path.exists('README_de_DE.txt'):
:move README_de_DE.txt README_de_DE.temp.txt
:fetch $ZIPFILE_AT
:sys $UNZIP $ZIPFILE_AT
:delete $ZIPFILE_AT
:print >>de_AT.dic
:cat de_19.dic >>de_AT.dic
:cat de_DE.dic >>de_AT.dic
:delete de_DE.dic
:move de_DE.aff de_AT.aff
:move README_de_DE.txt README_de_AT.txt
@if os.path.exists('de_DE.temp.aff'):
:move de_DE.temp.aff de_DE.aff
@if os.path.exists('de_DE.temp.dic'):
:move de_DE.temp.dic de_DE.dic
@if os.path.exists('README_de_DE.temp.txt'):
:move README_de_DE.temp.txt README_de_DE.txt
@if not os.path.exists('de_AT.orig.aff'):
:copy de_AT.aff de_AT.orig.aff
@if not os.path.exists('de_AT.orig.dic'):
@ -172,25 +185,6 @@ diff:
check:
:print TODO!!!!
:assertpkg unzip diff
:fetch $ZIPFILE_DE
:mkdir tmp
:cd tmp
@try:
@import stat
:sys $UNZIP ../$ZIPFILE_DE
:move de_DE_comb.aff de_DE.aff
:move de_DE_comb.dic de_DE.dic
:sys {force} diff ../de_DE.orig.aff de_DE.aff >d
@if os.stat('d')[stat.ST_SIZE] > 0:
:copy de_DE.aff ../de_DE.new.aff
:sys {force} diff ../de_DE.orig.dic de_DE.dic >d
@if os.stat('d')[stat.ST_SIZE] > 0:
:copy de_DE.dic ../de_DE.new.dic
@finally:
:cd ..
:delete {r}{f}{q} tmp
:delete $ZIPFILE_DE
# vim: set sts=4 sw=4 :

View File

@ -0,0 +1,25 @@
*** es_ES.orig.aff Thu Aug 25 19:11:20 2005
--- es_ES.aff Thu Aug 25 19:12:47 2005
***************
*** 3,4 ****
--- 3,22 ----
+ FOL ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ
+ LOW ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ
+ UPP ßÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞÿ
+
+ SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿
+ SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep?
+
+ MAP 9
+ MAP aàáâãäå
+ MAP eèéêë
+ MAP iìíîï
+ MAP oòóôõö
+ MAP uùúûü
+ MAP nñ
+ MAP cç
+ MAP yÿý
+ MAP sß
+
SFX J Y 12

6961
runtime/spell/es/es_MX.diff Normal file

File diff suppressed because it is too large Load Diff

View File

@ -7,9 +7,241 @@
+
+ NOBREAK
*** th.orig.dic Tue Aug 23 22:54:10 2005
--- th.dic Tue Aug 23 22:54:17 2005
--- th.dic Thu Aug 25 15:00:09 2005
***************
*** 1 ****
--- 1,2 ----
+ 99999
***************
*** 458,460 ****
กระต๊อบ
! กระต่อม { กฺระต่อม }
กระต้อยตีวิด
--- 459,462 ----
กระต๊อบ
! กระต่อม
! กฺระต่อม
กระต้อยตีวิด
***************
*** 507,509 ****
กระทรวง
! กระทวย { กฺระทวย }
กระทอก
--- 509,512 ----
กระทรวง
! กระทวย
! กฺระทวย
กระทอก
***************
*** 575,577 ****
กระบาย
! กระบาล { กฺระบาน }
กระบิ
--- 578,581 ----
กระบาย
! กระบาล
! กฺระบาน
กระบิ
***************
*** 625,627 ****
กระเปาะ
! กระเปี้ย { กฺระเปี้ย }
กระแป้
--- 629,632 ----
กระเปาะ
! กระเปี้ย
! กฺระเปี้ย
กระแป้
***************
*** 653,655 ****
กระพา
! กระพาก { กฺระพาก }
กระพี้
--- 658,661 ----
กระพา
! กระพาก
! กฺระพาก
กระพี้
***************
*** 784,786 ****
กระแสง
! กระแสะ { กฺระแสะ }
กระโสง
--- 790,793 ----
กระแสง
! กระแสะ
! กฺระแสะ
กระโสง
***************
*** 824,826 ****
กระหัด
! กระหาง { กฺระหาง }
กระหาย
--- 831,834 ----
กระหัด
! กระหาง
! กฺระหาง
กระหาย
***************
*** 16104,16262 ****
ห้อม
- หอม0
-
-
- Q
- `
- q
- w
-
-
-
-
- ช
-
-
- ั
-
- ใ
-
- ๔
-
- 
-
- &
-
- <
-
- X
- f
-
- {
-
-
-
- ฏ
-
-
- ฯ
- ๅ
-
-
-
-
- 
-
-
- 8
-
-
- W
-
- k
-
-
-
-
-
-
-
-
-
- ะ
-
-
- ๓
-
-
-
-
-
- 9
- A
-
-
-
-
-
-
-
-
-
- ธ
-
-
-
-
-
-
- 
- #
-
-
-
-
-
- l
-
-
-
-
-
-
-
- ฟ
-
-
- ๎
-
-
-
-
-
-
-
-
-
-
-
-
-
- ธ
-
-
-
- ้
- ๚
-
-
- "
-
-
-
-
-
- j
-
-
-
-
-
-
-
-
-
-
- 
- "
- 0
-
- J
-
-
- t
-
-
-
-
-
เหมันต์
--- 16112,16113 ----

View File

@ -4810,7 +4810,7 @@ spell_back_to_badword()
{
pos_T tpos = curwin->w_cursor;
spell_bad_len = spell_move_to(BACKWARD, TRUE, TRUE);
spell_bad_len = spell_move_to(curwin, BACKWARD, TRUE, TRUE, NULL);
if (curwin->w_cursor.col != tpos.col)
start_arrow(&tpos);
}

View File

@ -13756,7 +13756,7 @@ f_spellbadword(argvars, rettv)
#ifdef FEAT_SYN_HL
/* Find the start and length of the badly spelled word. */
len = spell_move_to(FORWARD, TRUE, TRUE);
len = spell_move_to(curwin, FORWARD, TRUE, TRUE, NULL);
if (len != 0)
rettv->vval.v_string = vim_strnsave(ml_get_cursor(), len);
#endif
@ -14208,7 +14208,7 @@ f_synID(argvars, rettv)
if (!transerr && lnum >= 1 && lnum <= curbuf->b_ml.ml_line_count
&& col >= 0 && col < (long)STRLEN(ml_get(lnum)))
id = syn_get_id(lnum, (colnr_T)col, trans, NULL);
id = syn_get_id(curwin, lnum, (colnr_T)col, trans, NULL);
#endif
rettv->vval.v_number = id;

View File

@ -876,7 +876,7 @@ hardcopy_line(psettings, page_line, ppos)
*/
if (psettings->do_syntax)
{
id = syn_get_id(ppos->file_line, col, 1, NULL);
id = syn_get_id(curwin, ppos->file_line, col, 1, NULL);
if (id > 0)
id = syn_get_final_id(id);
else

View File

@ -1,6 +1,6 @@
/* spell.c */
int spell_check __ARGS((win_T *wp, char_u *ptr, int *attrp, int *capcol));
int spell_move_to __ARGS((int dir, int allwords, int curline));
int spell_move_to __ARGS((win_T *wp, int dir, int allwords, int curline, int *attrp));
void spell_cat_line __ARGS((char_u *buf, char_u *line, int maxlen));
char_u *did_set_spelllang __ARGS((buf_T *buf));
void spell_free_all __ARGS((void));
@ -17,6 +17,7 @@ void ex_spellrepall __ARGS((exarg_T *eap));
void spell_suggest_list __ARGS((garray_T *gap, char_u *word, int maxcount, int need_cap));
char_u *eval_soundfold __ARGS((char_u *word));
void ex_spelldump __ARGS((exarg_T *eap));
char_u *spell_to_word_end __ARGS((char_u *start, buf_T *buf));
int spell_word_start __ARGS((int startcol));
int expand_spelling __ARGS((linenr_T lnum, int col, char_u *pat, char_u ***matchp));
/* vim: set ft=c : */

View File

@ -2915,6 +2915,31 @@ win_line(wp, lnum, startrow, endrow)
/* When w_skipcol is non-zero, first line needs 'showbreak' */
if (wp->w_p_wrap)
need_showbreak = TRUE;
#endif
#ifdef FEAT_SYN_HL
/* When spell checking a word we need to figure out the start of the
* word and if it's badly spelled or not. */
if (has_spell)
{
int len;
pos = wp->w_cursor;
wp->w_cursor.lnum = lnum;
wp->w_cursor.col = ptr - line;
len = spell_move_to(wp, FORWARD, TRUE, TRUE, &spell_attr);
if (len == 0 || wp->w_cursor.col > ptr - line)
{
/* no bad word found at line start, don't check until end of a
* word */
spell_attr = 0;
word_end = spell_to_word_end(ptr, wp->w_buffer) - line + 1;
}
else
/* bad word found, use attributes until end of word */
word_end = wp->w_cursor.col + len + 1;
wp->w_cursor = pos;
}
#endif
}

View File

@ -5992,7 +5992,8 @@ get_syntax_name(xp, idx)
* Function called for expression evaluation: get syntax ID at file position.
*/
int
syn_get_id(lnum, col, trans, spellp)
syn_get_id(wp, lnum, col, trans, spellp)
win_T *wp;
long lnum;
colnr_T col;
int trans; /* remove transparancy */
@ -6000,10 +6001,10 @@ syn_get_id(lnum, col, trans, spellp)
{
/* When the position is not after the current position and in the same
* line of the same buffer, need to restart parsing. */
if (curwin->w_buffer != syn_buf
if (wp->w_buffer != syn_buf
|| lnum != current_lnum
|| col < current_col)
syntax_start(curwin, lnum);
syntax_start(wp, lnum);
(void)get_syntax_attr(col, spellp);

View File

@ -36,5 +36,5 @@
#define VIM_VERSION_NODOT "vim70aa"
#define VIM_VERSION_SHORT "7.0aa"
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 25)"
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 25, compiled "
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 26)"
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 26, compiled "