Permalink
Browse files

updated for version 7.0067

  • Loading branch information...
1 parent 6224948 commit e88fb375eb3c6d954ef8958b41211318f85d4a0f vimboss committed Apr 17, 2005
View
@@ -682,6 +682,10 @@ LANG_GEN = \
runtime/tutor/tutor.ru.* \
runtime/tutor/tutor.zh.* \
runtime/spell/README.txt \
+
+# generic language files, binary
+LANG_GEN_BIN = \
+ runtime/spell/en.ascii.spl \
runtime/spell/en.latin1.spl \
runtime/spell/en.utf-8.spl \
View
@@ -1,4 +1,4 @@
-*spell.txt* For Vim version 7.0aa. Last change: 2005 Apr 15
+*spell.txt* For Vim version 7.0aa. Last change: 2005 Apr 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -75,23 +75,24 @@ Vim searches for spell files in the "spell" subdirectory of the directories in
-XXX optional addition
EEE the value of 'encoding'
-Exception: Vim uses "latin1" when 'encoding' is "iso-8859-15". The euro sign
-doesn't matter for spelling.
+Exceptions:
+- Vim uses "latin1" when 'encoding' is "iso-8859-15". The euro sign doesn't
+ matter for spelling.
+- When no spell file for 'encoding' is found "ascii" is tried. This only
+ works for languages where nearly all words are ASCII, such as English. It
+ helps when 'encoding' is not "latin1", such as iso-8859-2, and English text
+ is being edited.
Spelling for EBCDIC is currently not supported.
A spell file might not be available in the current 'encoding'. See
|spell-mkspell| about how to create a spell file. Converting a spell file
-with "iconv" will NOT work.
-
-If a spell file only uses ASCII characters the encoding can be omitted. This
-is useful for English: "en.spl" The file with encoding is checked first, thus
-you could have one with encoding that includes words with non-ASCII characters
-and use the ASCII file as a fall-back.
+with "iconv" will NOT work!
*E758* *E759*
When loading a spell file Vim checks that it is properly formatted. If you
-get an error the file may be truncated, modified or for another Vim version.
+get an error the file may be truncated, modified or intended for another Vim
+version.
WORDS
@@ -126,9 +127,14 @@ uses. Myspell is used by OpenOffice.org and Mozilla. You should be able to
find them here:
http://lingucomponent.openoffice.org/spell_dic.html
-:mksp[ell] {outname} {inname} ... *:mksp* *:mkspell*
+:mksp[ell] [-ascii] {outname} {inname} ... *:mksp* *:mkspell*
Generate spell file {outname}.spl from Myspell files
{inname}.aff and {inname}.dic.
+ When the [-ascii] argument is present, words with
+ non-ascii characters are skipped. The resulting file
+ ends in "ascii.spl". Otherwise the resulting file
+ ends in "ENC.spl", where ENC is the value of
+ 'encoding'.
Multiple {inname} arguments can be given to combine
regions into one Vim spell file. Example: >
:mkspell ~/.vim/spell/en /tmp/en_US /tmp/en_CA /tmp/en_AU
View
@@ -5111,7 +5111,6 @@ hebrew hebrew.txt /*hebrew*
hebrew.txt hebrew.txt /*hebrew.txt*
help various.txt /*help*
help-context help.txt /*help-context*
-help-tags tags 1
help-translated various.txt /*help-translated*
help-xterm-window various.txt /*help-xterm-window*
help.txt help.txt /*help.txt*
View
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.0aa. Last change: 2005 Apr 15
+*todo.txt* For Vim version 7.0aa. Last change: 2005 Apr 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -98,7 +98,14 @@ PLANNED FOR VERSION 7.0:
- Add SPELLCHECKER, with support for many languages.
- Use "engspchk" from Charles Campbell for ideas.
- Spell checking code todo's:
- - BWF_ADDS and BWF_ADDSM for more than 256, only one byte for count.
+ - For French, prefixes with single quotes result in many additions.
+ How to do this more efficiently? Both storing and checking.
+ Put addition up to end of word also in hashtab, so that "s'aaa"
+ is found by "'aaa", s-bbb by "-bbb", etc. Put rest in table (search
+ longest match).
+ - use BWF_ADDS and BWF_ADDSM for more than 256, only one byte for count.
+ - Implement user and project word lists. Commands to add words and to
+ mark words as wrong.
- Case folding only works when locale is set properly.
E.g., when C locale is active then 'enc' is "latin1" but �ngstr�m
isn't seen as a ONECAP.
@@ -107,29 +114,21 @@ PLANNED FOR VERSION 7.0:
Put the character tables in the .aff file?
- Implement = flag in .dic: KEEPCASE for lower case word.
's morgens/= does not match 'S morgens
- - Merge en_US, en_CA, en_AU, etc.
- Implement compound words?
- - Make matching additions faster somehow?
- - More efficient way to store additions?
- remove fw_prefix and fw_suffix, use fw_len (word length) and put
prefixes and suffixes right after it.
- Make "en-rare" spell file.
Convention: use en_US (language_region) and en-rare (language-field)
- - Need to check for affixes of zero length?
- - specify word characters in .aff file?
+ Add hl groups to 'spelllang'?
+ :set spelllang=en_us,en-rare/SpellRare,en-math/SpellMath
- Polish: Anio and Hanio are wrong words, even though Myspell allows
them. Problem with not ignoring case in conditions.
- - Put addition up to end of word also in hashtab, so that "s'aaa"
- is found by "'aaa", s-bbb by "-bbb", etc. Put rest in table (search
- longest match).
- - Rare words: use another dictionary. Add hl groups to 'spelllang'?
- :set spelllang=en_us,en.rare/SpellRare,en.math/SpellMath
- References MySpell library (in OpenOffice.org).
http://spellchecker.mozdev.org/source.html
http://whiteboard.openoffice.org/source/browse/whiteboard/lingucomponent/source/spellcheck/myspell/
author: Kevin Hendricks <kevin.hendricks@sympatico.ca>
- Alternative: use aspell library.
- ispell is replaced by aspell, thus forget about it.
+ ispell is replaced by aspell, thus forget about ispell.
- More complicated: Regions with different languages? E.g. comments in
English, strings in German (po file).
- Commands required:
@@ -139,11 +138,13 @@ PLANNED FOR VERSION 7.0:
[s move to previous spell error [S also rare word
]s move to next spell error ]S also rare word
(only "]s" is currently implemented)
+ Make this work like displaying, check @Spell in syntax.
+ Support a count.
- Update option window for 'spell' and 'spelllang'.
- Use an external program like aspell for suggestions to correct the
- spelling? Or include the myspell/spell code in Vim?
+ spelling? Or include the myspell suggestion code in Vim?
- Distribution: Need wordlists for many languages; "language pack"
- - Work together with OpenOffic.org to update the wordlists. (Adri
+ - Work together with OpenOffice.org to update the wordlists. (Adri
Verhoef, Aad Nales)
- Support for approximate-regexps will help with finding similar words
(agrep http://www.tgries.de/agrep/).
View
@@ -1,4 +1,4 @@
-*version7.txt* For Vim version 7.0aa. Last change: 2005 Apr 05
+*version7.txt* For Vim version 7.0aa. Last change: 2005 Apr 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1042,4 +1042,7 @@ an error message when the argument isn't recognized.
In gui_mch_draw_string() in gui_w32.c "unibuflen" wasn't static, resulting in
reallocating the buffer every time. (Alexei Alexandrov)
+When using a Python "atexit" function it was not invoked when Vim exits. Now
+call Py_Finalize() for that. (Ugo Di Girolamo)
+
vim:tw=78:ts=8:ft=help:norl:
@@ -1,7 +1,8 @@
" Menu Translations: German / Deutsch
-" Maintainer: Johannes Zellner <johannes@zellner.org>
-" Originally By: Marcin Dalecki <martin@dalecki.de>
-" Last Change: Sat, 20 Apr 2002 19:02:42 CEST
+" Maintainer: Georg Dahn <gorgyd@yahoo.co.uk>
+" Originally By: Marcin Dalecki <dalecki@cs.net.pl>
+" Johannes Zellner <johannes@zellner.org>
+" Last Change: Sun, 17 Apr 2005 18:28:58 CEST
" vim:set foldmethod=marker tabstop=8:
" Quit when menu translations have already been done.
@@ -44,7 +45,8 @@ menutrans &Copy<Tab>"+y &Kopieren<Tab>"+y
menutrans &Paste<Tab>"+gP Ein&fügen<Tab>"+gP
menutrans Put\ &Before<Tab>[p Da&vor\ Einfügen<Tab>[p
menutrans Put\ &After<Tab>]p Da&nach\ Einfügen<Tab>]p
-menutrans &Select\ all<Tab>ggVG Alles\ &Markieren<Tab>ggVG
+menutrans &Delete<Tab>x &Löschen<Tab>x
+menutrans &Select\ All<Tab>ggVG Alles\ &Markieren<Tab>ggVG
menutrans &Find\.\.\. &Suchen\.\.\.
menutrans Find\ and\ Rep&lace\.\.\. Suchen\ und\ &Ersetzen\.\.\.
@@ -156,6 +158,7 @@ menutrans Conve&rt\ back<Tab>:%!xxd\ -r Zur
" {{{ SYNTAX / SYNTAX
menutrans &Syntax &Syntax
+menutrans &Show\ filetypes\ in\ menu Dateitypen\ an&zeigen
menutrans Set\ '&syntax'\ only Nur\ '&syntax'\ Setzen
menutrans Set\ '&filetype'\ too Auch\ '&filetype'\ Setzen
menutrans &Off &Aus
View
Binary file not shown.
View
Binary file not shown.
View
@@ -2,7 +2,7 @@
" Language: Makefile
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
" URL: http://www.fleiner.com/vim/syntax/make.vim
-" Last Change: 2004 Apr 30
+" Last Change: 2005 Apr 17
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -67,9 +67,9 @@ syn match makeStatement contained "(\(subst\|addprefix\|addsuffix\|basename\|cal
" Comment
if exists("make_microsoft")
- syn match makeComment "#.*" contains=makeTodo
+ syn match makeComment "#.*" contains=makeTodo,@Spell
else
- syn region makeComment start="#" end="^$" end="[^\\]$" keepend contains=makeTodo
+ syn region makeComment start="#" end="^$" end="[^\\]$" keepend contains=makeTodo,@Spell
syn match makeComment "#$"
endif
syn keyword makeTodo TODO FIXME XXX contained
View
@@ -370,6 +370,8 @@ CClink = $(CC)
# PYTHON
# Uncomment this when you want to include the Python interface.
+# NOTE: This may cause threading to be enabled, which has side effects (such
+# as using different libraries and debugging becomes more difficult).
#CONF_OPT_PYTHON = --enable-pythoninterp
# TCL
@@ -1810,7 +1812,11 @@ installtutor: $(DEST_VIM) $(DEST_RT) $(DEST_TUTOR)
# Install the spell files, if they exist.
installspell: $(DEST_VIM) $(DEST_RT) $(DEST_SPELL)
- if test -f $(SPELLSOURCE)/en.spl; then \
+ if test -f $(SPELLSOURCE)/en.latin1.spl; then \
+ $(INSTALL_DATA) $(SPELLSOURCE)/*.spl $(DEST_SPELL); \
+ chmod $(HELPMOD) $(DEST_SPELL)/*.spl; \
+ fi
+ if test -f $(SPELLSOURCE)/en.utf-8.spl; then \
$(INSTALL_DATA) $(SPELLSOURCE)/*.spl $(DEST_SPELL); \
chmod $(HELPMOD) $(DEST_SPELL)/*.spl; \
fi
View
@@ -1297,7 +1297,7 @@ EXTERN char_u e_invexpr2[] INIT(=N_("E15: Invalid expression: %s"));
#endif
EXTERN char_u e_invrange[] INIT(=N_("E16: Invalid range"));
EXTERN char_u e_invcmd[] INIT(=N_("E476: Invalid command"));
-#ifdef UNIX
+#if defined(UNIX) || (defined(FEAT_SYN_HL) && defined(FEAT_MBYTE))
EXTERN char_u e_isadir2[] INIT(=N_("E17: \"%s\" is a directory"));
#endif
#ifdef FEAT_LIBCALL
View
@@ -32,15 +32,18 @@
#if defined(FEAT_EVAL) || defined(FEAT_SYN_HL) || defined(PROTO)
#if 0
-# define HT_DEBUG /* extra checks for table consistency */
+# define HT_DEBUG /* extra checks for table consistency and statistics */
+
+static long hash_count_lookup = 0; /* count number of hashtab lookups */
+static long hash_count_perturb = 0; /* count number of "misses" */
#endif
/* Magic value for algorithm that walks through the array. */
#define PERTURB_SHIFT 5
static int hash_may_resize __ARGS((hashtab_T *ht, int minitems));
-#if defined(FEAT_SYN_HL) || defined(PROTO)
+#if 0 /* currently not used */
/*
* Create an empty hash table.
* Returns NULL when out of memory.
@@ -112,6 +115,10 @@ hash_lookup(ht, key, hash)
hashitem_T *hi;
int idx;
+#ifdef HT_DEBUG
+ ++hash_count_lookup;
+#endif
+
/*
* Quickly handle the most common situations:
* - return if there is no item at all
@@ -141,6 +148,9 @@ hash_lookup(ht, key, hash)
*/
for (perturb = hash; ; perturb >>= PERTURB_SHIFT)
{
+#ifdef HT_DEBUG
+ ++hash_count_perturb; /* count a "miss" for hashtab lookup */
+#endif
idx = (idx << 2) + idx + perturb + 1;
hi = &ht->ht_array[idx & ht->ht_mask];
if (hi->hi_key == NULL)
@@ -155,6 +165,23 @@ hash_lookup(ht, key, hash)
}
/*
+ * Print the efficiency of hashtable lookups.
+ * Useful when trying different hash algorithms.
+ * Called when exiting.
+ */
+ void
+hash_debug_results()
+{
+#ifdef HT_DEBUG
+ fprintf(stderr, "\r\n\r\n\r\n\r\n");
+ fprintf(stderr, "Number of hashtable lookups: %ld\r\n", hash_count_lookup);
+ fprintf(stderr, "Number of perturb loops: %ld\r\n", hash_count_perturb);
+ fprintf(stderr, "Percentage of perturb loops: %ld%%\r\n",
+ hash_count_perturb * 100 / hash_count_lookup);
+#endif
+}
+
+/*
* Add item with key "key" to hashtable "ht".
* Returns FAIL when out of memory or the key is already present.
*/
@@ -332,7 +359,7 @@ hash_may_resize(ht, minitems)
else
{
/* Use specified size. */
- if (minitems < ht->ht_used) /* just in case... */
+ if ((long_u)minitems < ht->ht_used) /* just in case... */
minitems = ht->ht_used;
minsize = minitems * 3 / 2; /* array is up to 2/3 full */
}
@@ -420,16 +447,28 @@ hash_may_resize(ht, minitems)
}
/*
- * Get the hash number for a key. Uses the ElfHash algorithm, which is
- * supposed to have an even distribution (suggested by Charles Campbell).
+ * Get the hash number for a key.
+ * If you think you know a better hash function: Compile with HT_DEBUG set and
+ * run a script that uses hashtables a lot. Vim will then print statistics
+ * when exiting. Try that with the current hash algorithm and yours. The
+ * lower the percentage the better.
*/
hash_T
hash_hash(key)
char_u *key;
{
- hash_T hash = 0;
+ hash_T hash;
+ char_u *p;
+
+ if ((hash = *key) == 0)
+ return (hash_T)0; /* Empty keys are not allowed, but we don't
+ want to crash if we get one. */
+ p = key + 1;
+
+#if 0
+ /* ElfHash algorithm, which is supposed to have an even distribution.
+ * Suggested by Charles Campbell. */
hash_T g;
- char_u *p = key;
while (*p != NUL)
{
@@ -438,6 +477,13 @@ hash_hash(key)
if (g != 0)
hash ^= g >> 24; /* xor g's high 4 bits into hash */
}
+#else
+
+ /* A simplistic algorithm that appears to do very well.
+ * Suggested by George Reilly. */
+ while (*p != NUL)
+ hash = hash * 101 + *p++;
+#endif
return hash;
}
Oops, something went wrong.

0 comments on commit e88fb37

Please sign in to comment.