-*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
'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
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?*
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.
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
-*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
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
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).
- 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.
#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;
/* '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
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));
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)