]> granicus.if.org Git - vim/commitdiff
updated for version 7.0099 v7.0099
authorBram Moolenaar <Bram@vim.org>
Fri, 1 Jul 2005 22:41:52 +0000 (22:41 +0000)
committerBram Moolenaar <Bram@vim.org>
Fri, 1 Jul 2005 22:41:52 +0000 (22:41 +0000)
runtime/doc/spell.txt
runtime/doc/todo.txt
src/edit.c
src/proto/spell.pro
src/syntax.c

index 1a9e64f290f13dd6fc35e446605741cd9e0902e6..0ca0e0b15d4dc032840595e5a0f3032a923cdb0a 100644 (file)
@@ -1,4 +1,4 @@
-*spell.txt*    For Vim version 7.0aa.  Last change: 2005 Jun 30
+*spell.txt*    For Vim version 7.0aa.  Last change: 2005 Jul 01
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -59,17 +59,28 @@ zg                  Add word under the cursor as a good word to
                        'spellfile'.  In Visual mode the selected characters
                        are added as a word (including white space!).
 
+                                                       *zG*
+zG                     Like "zg" but add the word to the internal word list.
+
                                                        *zw*
 zw                     Add word under the cursor as a wrong (bad) word to
                        'spellfile'.  In Visual mode the selected characters
                        are added as a word (including white space!).
 
+                                                       *zW*
+zW                     Like "zw" but add the word to the internal word list.
+
                                                        *:spe* *:spellgood*
 :spe[llgood] {word}    Add [word} as a good word to 'spellfile'.
 
+:spe[llgood]! {word}   Add [word} as a good word to the internal word list.
+
                                                        *:spellw* *:spellwrong*
 :spellw[rong] {word}   Add [word} as a wrong (bad) word to 'spellfile'.
 
+:spellw[rong]! {word}  Add [word} as a wrong (bad) word to the internal word
+                       list.
+
 After adding a word to 'spellfile' with the above commands its associated
 ".spl" file will automatically be updated and reloaded.  If you change
 'spellfile' manually you need to use the |:mkspell| command.  This sequence of
@@ -80,6 +91,10 @@ commands mostly works well: >
 
 More details about the 'spellfile' format below |spell-wordlist-format|.
 
+The internal word list is used for all buffers where 'spell' is set.  It is
+not stored, it is lost when you exit Vim.  It is also cleared when 'encoding'
+is set.
+
 
 Finding suggestions for bad words:
                                                        *z?*
@@ -381,8 +396,9 @@ The format of the word list is used |spell-wordlist-format|.  You should be
 able to read it with ":mkspell" to generate one .spl file that includes all
 the words.
 
-Only words for the current region are included.  No "/regions" line is
-generated.
+When all entries to 'spelllang' use the same regions or no regions at all then
+the region information is included in the dumped words.  Otherwise only words
+for the current region are included and no "/regions" line is generated.
 
 Comment lines with the name of the .spl file are used as a header above the
 words that were generated from that .spl file.
@@ -427,29 +443,26 @@ Additionally the following items are recognized:
   In an addition word list the region names should be equal to the main word
   list!
 
-- A line starting with "/?" specifies a word that should be marked as rare.
-
-- A line starting with "/!" specifies a word that should be marked as bad.
-
-- A line starting with "/=" specifies a word where case must match exactly.
-  A "?" or "!" may be following: "/=?" and "/=!".
-
-- Digits after "/" indicate the regions in which the word is valid.  If no
-  regions are specified the word is valid in all regions.
-
 - Other lines starting with '/' are reserved for future use.  The ones that
   are not recognized are ignored (but you do get a warning message).
 
+- A "/" may follow the word with the following items:
+    =          Case must match exactly.
+    ?          Rare word.
+    !          Bad (wrong) word.
+    digit      A region in which the word is valid.  If no regions are
+               specified the word is valid in all regions.
+
 Example:
 
        # This is an example word list          comment
        /encoding=latin1                        encoding of the file
        /regions=uscagb                         regions "us", "ca" and "gb"
        example                                 word for all regions
-       /1blah                                  word for region 1 "us"
-       /!vim                                   bad word
-       /?3Campbell                             rare word in region 3 "gb"
-       /='s mornings                           keep-case word
+       blah/12                                 word for regions "us" and "ca"
+       vim/!                                   bad word
+       Campbell/?3                             rare word in region 3 "gb"
+       's mornings/=                           keep-case word
 
 
 FORMAT WITH AFFIX COMPRESSION
index d5c6e771d2d76d81c148e36bdaf393d3e888b01f..b0ba0c0165cf7679b3b0a02eab89fc889a296e64 100644 (file)
@@ -1,4 +1,4 @@
-*todo.txt*      For Vim version 7.0aa.  Last change: 2005 Jun 30
+*todo.txt*      For Vim version 7.0aa.  Last change: 2005 Jul 01
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -96,34 +96,33 @@ Awaiting response:
 
 PLANNED FOR VERSION 7.0:
 
--   Add SPELLCHECKER, with support for many languages.
-  - Spell checking code todo's:
-    - ":spelldump" doesn't put region numbers in the list.
-    - Use "engspchk" from Charles Campbell for ideas (commands, rare words).
-    - Make "en-rare" spell file?  Ask Charles Campbell.
-    - 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>
-    - Update option window for 'verbosefile', 'spell', 'spellfile',
-      'spellsuggest' and 'spelllang'.
+- Spell checking todo's:
+    - When "zW" and "zG" are repeated with the same word it stops working
+    - More ideas:
+       - Support project word list?
+       - Check for Cap after punctuation "..." or char in ".!?"
     - Distribution: Need wordlists for many languages; "language pack"
       Put them on the ftp site, ready to download.  Include README for
       copyrights.
     - Work together with OpenOffice.org to update the wordlists.  (Adri
       Verhoef, Aad Nales)  Setup vim-spell maillist?
-    - Insert mode completion mechanism that uses the spell word lists.
     - Charles Campbell asks for method to add "contained" groups to
       existing syntax items (to add @Spell).
       Add ":syntax contains {pattern} add=@Spell" command?  A bit like ":syn
       cluster" but change the contains list directly for matching syntax
       items.
     - Install spell files with src/main.aap.
-    - Alternate Dutch word list at www.nederlandsewoorden.nl (use script to
-      obtain).  But new Myspell wordlist will come (Hagen)
+    Later:
+    - 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>
+    - Make "en-rare" spell file?  Ask Charles Campbell.
     - The English dictionaries for different regions are not consistent in
       their use of words with a dash.
-    Later:
+    - Alternate Dutch word list at www.nederlandsewoorden.nl (use script to
+      obtain).  But new Myspell wordlist will come (Hagen)
+    - Insert mode completion mechanism that uses the spell word lists.
     - Add hl groups to 'spelllang'?
        :set spelllang=en_us,en-rare/SpellRare,en-math/SpellMath
       More complicated: Regions with different languages?  E.g.  comments
@@ -133,6 +132,8 @@ PLANNED FOR VERSION 7.0:
       specify a word can only be at the start or end, or that only certain
       words combine.
 
+-   Support using "**" in filename for ":next", ":vimgrep", etc., so that a
+    directory tree can be searched.
 -   REFACTORING: The main() function is very long.  Move parts to separate
     functions, especially loops.  Ideas from Walter Briscoe (2003 Apr 3, 2004
     Feb 9).
@@ -140,8 +141,6 @@ PLANNED FOR VERSION 7.0:
 -   Improve the interface between the generic GUI code and the system-specific
     code.  Generic code handles text window with scrollbars, system-specific
     code menu, toolbar, etc.
--   Support using "**" in filename for ":next", ":vimgrep", etc., so that a
-    directory tree can be searched.
 -   Store messages to allow SCROLLING BACK for all commands.  And other "less"
     like commands.
 -   "INTELLISENSE".  First cleanup the Insert-mode completion.
index c91170215dcc08c189ff1facecfb32016fff567d..25d4b584c2ff4311410a9bc304e21797449d18ae 100644 (file)
@@ -2632,7 +2632,7 @@ ins_compl_next_buf(buf, flag)
 #ifdef FEAT_WINDOWS
        if (buf == curbuf)      /* first call for this flag/expansion */
            wp = curwin;
-       while ((wp = wp->w_next != NULL ? wp->w_next : firstwin) != curwin
+       while ((wp = (wp->w_next != NULL ? wp->w_next : firstwin)) != curwin
                && wp->w_buffer->b_scanned)
            ;
        buf = wp->w_buffer;
@@ -2644,7 +2644,7 @@ ins_compl_next_buf(buf, flag)
        /* 'b' (just loaded buffers), 'u' (just non-loaded buffers) or 'U'
         * (unlisted buffers)
         * When completing whole lines skip unloaded buffers. */
-       while ((buf = buf->b_next != NULL ? buf->b_next : firstbuf) != curbuf
+       while ((buf = (buf->b_next != NULL ? buf->b_next : firstbuf)) != curbuf
                && ((flag == 'U'
                        ? buf->b_p_bl
                        : (!buf->b_p_bl
index 91483b022543146c800d758a0461a28fa211d69c..91fcf7293223a3d5e61f477e4e78e1741732e8d5 100644 (file)
@@ -8,7 +8,7 @@ void spell_reload __ARGS((void));
 void put_bytes __ARGS((FILE *fd, long_u nr, int len));
 void ex_mkspell __ARGS((exarg_T *eap));
 void ex_spell __ARGS((exarg_T *eap));
-void spell_add_word __ARGS((char_u *word, int len, int bad));
+void spell_add_word __ARGS((char_u *word, int len, int bad, int temp));
 void init_spell_chartab __ARGS((void));
 int spell_check_sps __ARGS((void));
 void spell_suggest __ARGS((void));
index 313f6002de99499ac9cca1846542bcef67841a6b..7a94df71c524d2b6bb7a58ac9a3f77d0ff2cf5b9 100644 (file)
@@ -1182,7 +1182,7 @@ syn_stack_apply_changes(buf)
     prev = NULL;
     for (p = buf->b_sst_first; p != NULL; )
     {
-       if (p->sst_lnum + syn_buf->b_syn_sync_linebreaks > buf->b_mod_top)
+       if (p->sst_lnum + buf->b_syn_sync_linebreaks > buf->b_mod_top)
        {
            n = p->sst_lnum + buf->b_mod_xlines;
            if (n <= buf->b_mod_bot)