From 4770d09abd866bb53d95895dc6a5c5fe7cccb619 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 12 Jan 2006 23:22:24 +0000 Subject: updated for version 7.0179 --- runtime/autoload/syntaxcomplete.vim | 179 +++++++++++++++ runtime/doc/autocmd.txt | 8 +- runtime/doc/cmdline.txt | 4 +- runtime/doc/develop.txt | 84 ++++++- runtime/doc/eval.txt | 9 +- runtime/doc/if_mzsch.txt | 21 +- runtime/doc/index.txt | 5 +- runtime/doc/insert.txt | 49 ++-- runtime/doc/map.txt | 11 +- runtime/doc/message.txt | 5 +- runtime/doc/motion.txt | 7 +- runtime/doc/options.txt | 9 +- runtime/doc/pattern.txt | 16 +- runtime/doc/quickfix.txt | 30 ++- runtime/doc/quickref.txt | 6 +- runtime/doc/spell.txt | 436 +++++++++++++++++++++++++++++------- runtime/doc/syntax.txt | 4 +- runtime/doc/tags | 4 +- runtime/doc/todo.txt | 110 +++++++-- runtime/doc/various.txt | 3 +- runtime/doc/version7.txt | 16 +- runtime/doc/vi_diff.txt | 6 +- runtime/filetype.vim | 7 +- runtime/makemenu.vim | 4 +- runtime/optwin.vim | 4 +- runtime/spell/en.ascii.spl | Bin 566667 -> 567989 bytes runtime/spell/en.ascii.sug | Bin 0 -> 555631 bytes runtime/spell/en.latin1.spl | Bin 568766 -> 570088 bytes runtime/spell/en.latin1.sug | Bin 0 -> 556457 bytes runtime/spell/en.utf-8.spl | Bin 569197 -> 570519 bytes runtime/spell/en.utf-8.sug | Bin 0 -> 556527 bytes runtime/syntax/eviews.vim | 104 +++++++++ runtime/syntax/gretl.vim | 102 +++++++++ runtime/syntax/r.vim | 21 +- runtime/syntax/vim.vim | 10 +- 35 files changed, 1092 insertions(+), 182 deletions(-) create mode 100644 runtime/autoload/syntaxcomplete.vim create mode 100644 runtime/spell/en.ascii.sug create mode 100644 runtime/spell/en.latin1.sug create mode 100644 runtime/spell/en.utf-8.sug create mode 100644 runtime/syntax/eviews.vim create mode 100644 runtime/syntax/gretl.vim (limited to 'runtime') diff --git a/runtime/autoload/syntaxcomplete.vim b/runtime/autoload/syntaxcomplete.vim new file mode 100644 index 0000000000..367847c9b5 --- /dev/null +++ b/runtime/autoload/syntaxcomplete.vim @@ -0,0 +1,179 @@ +" Vim completion script +" Language: All languages, uses existing syntax highlighting rules +" Maintainer: David Fishburn +" Version: 1.0 +" Last Change: Sun Jan 08 2006 10:17:51 PM + +" Set completion with CTRL-X CTRL-O to autoloaded function. +if exists('&ofu') + setlocal ofu=syntaxcomplete#Complete +endif + +if exists('g:loaded_syntax_completion') + finish +endif +let g:loaded_syntax_completion = 1 + +" This script will build a completion list based on the syntax +" elements defined by the files in $VIMRUNTIME/syntax. + +let s:syn_remove_words = 'match,matchgroup=,contains,'. + \ 'links to,start=,end=,nextgroup=' + +let s:cache_name = [] +let s:cache_list = [] + +" This function is used for the 'omnifunc' option. +function! syntaxcomplete#Complete(findstart, base) + + if a:findstart + " Locate the start of the item, including "." + let line = getline('.') + let start = col('.') - 1 + let lastword = -1 + while start > 0 + if line[start - 1] =~ '\w' + let start -= 1 + elseif line[start - 1] =~ '\.' + " The user must be specifying a column name + if lastword == -1 + let lastword = start + endif + let start -= 1 + let b:sql_compl_type = 'column' + else + break + endif + endwhile + + " Return the column of the last word, which is going to be changed. + " Remember the text that comes before it in s:prepended. + if lastword == -1 + let s:prepended = '' + return start + endif + let s:prepended = strpart(line, start, lastword - start) + return lastword + endif + + let base = s:prepended . a:base + + let list_idx = index(s:cache_name, &filetype, 0, &ignorecase) + if list_idx > -1 + let compl_list = s:cache_list[list_idx] + else + let compl_list = s:SyntaxList() + let s:cache_name = add( s:cache_name, &filetype ) + let s:cache_list = add( s:cache_list, compl_list ) + endif + + " Return list of matches. + + if base =~ '\w' + let compstr = join(compl_list, ' ') + let compstr = substitute(compstr, '\<\%('.base.'\)\@!\w\+\s*', '', 'g') + let compl_list = split(compstr, '\s\+') + endif + + return compl_list +endfunc + +function! s:SyntaxList() + let saveL = @l + + " Loop through all the syntax groupnames, and build a + " syntax file which contains these names. This can + " work generically for any filetype that does not already + " have a plugin defined. + " This ASSUMES the syntax groupname BEGINS with the name + " of the filetype. From my casual viewing of the vim7\sytax + " directory. + redir @l + silent! exec 'syntax list ' + redir END + + let syntax_groups = @l + let @l = saveL + + if syntax_groups =~ 'E28' + \ || syntax_groups =~ 'E411' + \ || syntax_groups =~ 'E415' + \ || syntax_groups =~ 'No sytax items' + return -1 + endif + + " Abort names - match, links to, matchgroup=, start=, contains=, contained, + " cluster=, nextgroup=, end= + let next_group_regex = '\n' . + \ '\zs'.&filetype.'\w\+\ze'. + \ '\s\+xxx\s\+'. + \ '\<\('. + \ substitute(s:syn_remove_words, ',', '\\|', 'g'). + \ '\)\@!' + let syn_list = '' + let index = 0 + let index = match(syntax_groups, next_group_regex, index) + + + while index > 0 + let group_name = matchstr( syntax_groups, '\w\+', index ) + + let extra_syn_list = s:SyntaxGroupItems(group_name) + + let syn_list = syn_list . extra_syn_list . "\n" + + let index = index + strlen(group_name) + let index = match(syntax_groups, next_group_regex, index) + endwhile + + return sort(split(syn_list)) +endfunction + +function! s:SyntaxGroupItems( group_name ) + let saveL = @l + + " Generate (based on the syntax highlight rules) a list of + " the Statements, functions, keywords and so on available + " If this needs updating, the syntax\sql.vim file should be + " updated + redir @l + silent! exec 'syntax list ' . a:group_name + redir END + + if @l !~ 'E28' + " let syn_list = substitute( @l, '^.*xxx\s*\%(contained\s*\)\?', "", '' ) + let syn_list = substitute( @l, '^.*xxx\s*', "", '' ) + + " We only want the words for the lines begining with + " containedin, but there could be other items. + + " Tried to remove all lines that do not begin with contained + " but this does not work in all cases since you can have + " contained nextgroup=... + " So this will strip off the ending of lines with known + " keywords. + let syn_list = substitute( syn_list, '\<\('. + \ substitute( + \ escape( s:syn_remove_words, '\\/.*$^~[]') + \ , ',', '\\|', 'g'). + \ '\).\{-}\%($\|'."\n".'\)' + \ , "\n", 'g' ) + + " Now strip off the newline + blank space + contained + let syn_list = substitute( syn_list, '\%(^\|\n\)\@<=\s*\<\('. + \ 'contained\)' + \ , "", 'g' ) + + " There are a number of items which have non-word characters in + " them, *'T_F1'*. vim.vim is one such file. + " This will replace non-word characters with spaces. + let syn_list = substitute( syn_list, '[^0-9A-Za-z_ ]', ' ', 'g' ) + else + let syn_list = '' + endif + + let @l = saveL + + return syn_list +endfunction + diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 28edb4d4bb..e83309a8d9 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 7.0aa. Last change: 2005 Dec 18 +*autocmd.txt* For Vim version 7.0aa. Last change: 2006 Jan 08 VIM REFERENCE MANUAL by Bram Moolenaar @@ -330,7 +330,7 @@ BufEnter After entering a buffer. Useful for setting *BufFilePost* BufFilePost After changing the name of the current buffer with the ":file" or ":saveas" command. - *BufReadCmd* + *BufFilePre* BufFilePre Before changing the name of the current buffer with the ":file" or ":saveas" command. *BufHidden* @@ -368,10 +368,10 @@ BufRead or BufReadPost When starting to edit a new buffer, after This does NOT work for ":r file". Not used when the file doesn't exist. Also used after successfully recovering a file. - *BufReadPre* *E200* *E201* + *BufReadCmd* BufReadCmd Before starting to edit a new buffer. Should read the file into the buffer. |Cmd-event| - *BufFilePre* + *BufReadPre* *E200* *E201* BufReadPre When starting to edit a new buffer, before reading the file into the buffer. Not used if the file doesn't exist. diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index 72b3c295fe..d12c1ea779 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -1,4 +1,4 @@ -*cmdline.txt* For Vim version 7.0aa. Last change: 2005 Dec 27 +*cmdline.txt* For Vim version 7.0aa. Last change: 2005 Dec 30 VIM REFERENCE MANUAL by Bram Moolenaar @@ -198,6 +198,8 @@ CTRL-\ e {expr} *c_CTRL-\_e* The cursor position is unchanged, except when the cursor was at the end of the line, then it stays at the end. |setcmdpos()| can be used to set the cursor position. + The |sandbox| is used for evaluating the expression to avoid + nasty side effects. Example: > :cmap eAppendSome() :func AppendSome() diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index 498833c5a7..4d12d166c0 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -1,4 +1,4 @@ -*develop.txt* For Vim version 7.0aa. Last change: 2005 Sep 01 +*develop.txt* For Vim version 7.0aa. Last change: 2006 Jan 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -382,8 +382,8 @@ checking engine in Vim, for various reasons: them separately from Vim. That's mostly not impossible, but a drawback. - Performance: A few tests showed that it's possible to check spelling on the fly (while redrawing), just like syntax highlighting. But the mechanisms - used by other code are much slower. Myspell uses a simplistic hashtable, - for example. + used by other code are much slower. Myspell uses a hashtable, for example. + The affix compression that most spell checkers use makes it slower too. - For using an external program like aspell a communication mechanism would have to be setup. That's complicated to do in a portable way (Unix-only would be relatively simple, but that's not good enough). And performance @@ -399,14 +399,88 @@ checking engine in Vim, for various reasons: another program or library would be acceptable. But the word lists probably differ, the suggestions may be wrong words. + +Spelling suggestions *develop-spell-suggestions* + +For making suggestions there are two basic mechanisms: +1. Try changing the bad word a little bit and check for a match with a good + word. Or go through the list of good words, change them a little bit and + check for a match with the bad word. The changes are deleting a character, + inserting a character, swapping two characters, etc. +2. Perform soundfolding on both the bad word and the good words and then find + matches, possibly with a few changes like with the first mechanism. + +The first is good for finding typing mistakes. After experimenting with +hashtables and looking at solutions from other spell checkers the conclusion +was that a trie (a kind of tree structure) is ideal for this. Both for +reducing memory use and being able to try sensible changes. For example, when +inserting a character only characters that lead to good words need to be +tried. Other mechanisms (with hashtables) need to try all possible letters at +every position in the word. Also, a hashtable has the requirement that word +boundaries are identified separately, while a trie does not require this. +That makes the mechanism a lot simpler. + +Soundfolding is useful when someone knows how the words sounds but doesn't +know how it is spelled. For example, the word "dictionary" might be written +as "daktonerie". The number of changes that the first method would need to +try is very big, it's hard to find the good word that way. After soundfolding +the words become "tktnr" and "tkxnry", these differ by only two letters. + +To find words by their soundfolded equivalent (soundalike word) we need a list +of all soundfolded words. A few experiments have been done to find out what +the best method is. Alternatives: +1. Do the sound folding on the fly when looking for suggestions. This means + walking through the trie of good words, soundfolding each word and + checking how different it is from the bad word. This is very efficient for + memory use, but takes a long time. On a fast PC it takes a couple of + seconds for English, which can be acceptable for interactive use. But for + some languages it takes more than ten seconds (e.g., German, Catalan), + which is unacceptable slow. For batch processing (automatic corrections) + it's to slow for all languages. +2. Use a trie for the soundfolded words, so that searching can be done just + like how it works without soundfolding. This requires remembering a list + of good words for each soundfolded word. This makes finding matches very + fast but requires quite a lot of memory, in the order of 1 to 10 Mbyte. + For some languages more than the original word list. +3. Like the second alternative, but reduce the amount of memory by using affix + compression and store only the soundfolded basic word. This is what Aspell + does. Disadvantage is that affixes need to be stripped from the bad word + before soundfolding it, which means that mistakes at the start and/or end + of the word will cause the mechanism to fail. Also, this becomes slow when + the bad word is quite different from the good word. + +The choice made is to use the second mechanism and use a separate file. This +way a user with sufficient memory can get very good suggestions while a user +who is short of memory or just wants the spell checking and no suggestions +doesn't use so much memory. + + +Word frequency + +For sorting suggestions it helps to know which words are common. In theory we +could store a word frequency with the word in the dictionary. However, this +requires storing a count per word. That degrades word tree compression a lot. +And maintaining the word frequency for all languages will be a heavy task. +Also, it would be nice to prefer words that are already in the text. This way +the words that appear in the specific text are preferred for suggestions. + +What has been implemented is to count words that have been seen during +displaying. A hashtable is used to quickly find the word count. The count is +initialized from words listed in COMMON items in the affix file, so that it +also works when starting a new file. + +This isn't ideal, because the longer Vim is running the higher the counts +become. But in practice it is a noticable improvement over not using the word +count. + ============================================================================== 4. Assumptions *design-assumptions* Size of variables: char 8 bit signed char_u 8 bit unsigned -int 16, 32 or 64 bit signed -unsigned 16, 32 or 64 bit unsigned +int 32 or 64 bit signed (16 might be possible with limited features) +unsigned 32 or 64 bit unsigned (16 as with ints) long 32 or 64 bit signed, can hold a pointer Note that some compilers cannot handle long lines or strings. The C89 diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 7d70582016..4c527e1a12 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 Dec 27 +*eval.txt* For Vim version 7.0aa. Last change: 2006 Jan 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1419,7 +1419,7 @@ v:swapchoice |SwapExists| autocommands can set this to the selected choice no SwapExists autocommand. The default is empty. *v:swapcommand* *swapcommand-variable* -v:swapcommand Normal mode ommand to be executed after a file has been +v:swapcommand Normal mode command to be executed after a file has been opened. Can be used for a |SwapExists| autocommand to have another Vim open the file and jump to the right place. For example, when jumping to a tag the value is ":tag tagname\r". @@ -4381,6 +4381,10 @@ system({expr} [, {input}]) *system()* *E677* The resulting error code can be found in |v:shell_error|. This function will fail in |restricted-mode|. + + Note that any wrong value in the options mentioned above may + make the function fail. It has also been reported to fail + when using a security agent application. Unlike ":!cmd" there is no automatic check for changed files. Use |:checktime| to force a check. @@ -6814,6 +6818,7 @@ These items are not allowed in the sandbox: - executing a shell command - reading or writing a file - jumping to another buffer or editing a file + - executing Python, Perl, etc. commands This is not guaranteed 100% secure, but it should block most attacks. *:san* *:sandbox* diff --git a/runtime/doc/if_mzsch.txt b/runtime/doc/if_mzsch.txt index 0580891e24..d0fd793a26 100644 --- a/runtime/doc/if_mzsch.txt +++ b/runtime/doc/if_mzsch.txt @@ -1,4 +1,4 @@ -*if_mzsch.txt* For Vim version 7.0aa. Last change: 2005 May 08 +*if_mzsch.txt* For Vim version 7.0aa. Last change: 2006 Jan 05 VIM REFERENCE MANUAL by Sergey Khorev @@ -10,6 +10,7 @@ The MzScheme Interface to Vim *mzscheme* *MzScheme* 2. Examples |mzscheme-examples| 3. Threads |mzscheme-threads| 4. The Vim access procedures |mzscheme-vim| +5. Dynamic loading |mzscheme-dynamic| {Vi does not have any of these commands} @@ -243,5 +244,23 @@ Windows *mzscheme-window* a pair (linenr . column). (set-cursor (line . col) [window]) Set cursor position. +============================================================================== +5. Dynamic loading *mzscheme-dynamic* + +On MS-Windows the MzScheme libraries can be loaded dynamically. The |:version| +output then includes |+mzscheme/dyn|. + +This means that Vim will search for the MzScheme DLL files only when needed. +When you don't use the MzScheme interface you don't need them, thus you can +use Vim without these DLL files. + +To use the MzScheme interface the MzScheme DLLs must be in your search path. +In a console window type "path" to see what directories are used. + +The names of the DLLs must match the MzScheme version Vim was compiled with. +For MzScheme version 209 they will be "libmzsch209_000.dll" and +"libmzgc209_000.dll". To know for sure edit "gvim.exe" and search for +"libmzsch\d\d\d_\d\d\d\.dll\c". + ====================================================================== vim:tw=78:ts=8:sts=4:ft=help:norl: diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 6c5037c882..96a6c612dd 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1,4 +1,4 @@ -*index.txt* For Vim version 7.0aa. Last change: 2005 Dec 23 +*index.txt* For Vim version 7.0aa. Last change: 2006 Jan 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1069,7 +1069,8 @@ The commands are sorted on the non-optional part of their name. |:cNfile| :cNf[ile] go to last error in previous file |:cabbrev| :ca[bbrev] like ":abbreviate" but for Command-line mode |:cabclear| :cabc[lear] clear all abbreviations for Command-line mode -|:caddfile| :cad[dfile] add error message to current quickfix list +|:caddexpr| :cad[dexpr] add errors from expr +|:caddfile| :caddf[ile] add error message to current quickfix list |:call| :cal[l] call a function |:catch| :cat[ch] part of a :try command |:cbuffer| :cb[uffer] parse error messages and jump to first error diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index f7db100cbb..0a28038dc2 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 7.0aa. Last change: 2005 Dec 28 +*insert.txt* For Vim version 7.0aa. Last change: 2006 Jan 08 VIM REFERENCE MANUAL by Bram Moolenaar @@ -354,7 +354,7 @@ CTRL-G CTRL-J cursor one line down, insert start column *i_CTRL-G_CTRL-J* scroll three lines up *i_* scroll a full page up *i_* CTRL-O execute one command, return to Insert mode *i_CTRL-O* -CTRL-\ CTRL-O like CTRL-O but don't move the cursor *i_CTRL-\_CTRL-O* +CTRL-\ CTRL-O like CTRL-O but don't move the cursor *i_CTRL-\_CTRL-O* CTRL-L when 'insertmode' is set: go to Normal mode *i_CTRL-L* CTRL-G u break undo sequence, start new change *i_CTRL-G_u* ----------------------------------------------------------------------- @@ -963,8 +963,8 @@ The menu is used when: While the menu is displayed these keys have a special meaning: and : Accept the currently selected match -: Select the previous match, as if CTRL-P was used -: Select the next match, as if CTRL-N was used +: Select the previous match, as if CTRL-P was used +: Select the next match, as if CTRL-N was used : Select a match several entries back : Select a match several entries further @@ -1010,14 +1010,14 @@ When the same structure name appears in multiple places all possible members are included. -CSS *ft-css-omni* +CSS *ft-css-omni* Complete properties and their appropriate values according to CSS 2.1 specification. -(X)HTML *ft-html-omni* - *ft-xhtml-omni* +(X)HTML *ft-html-omni* + *ft-xhtml-omni* CTRL-X CTRL-O provides completion of various elements of (X)HTML files. It is designed to support writing of XHTML 1.0 Strict files but will @@ -1040,7 +1040,26 @@ Note: When used first time completion menu will be shown with little delay - this is time needed for loading of data file. -XML *ft-xml-omni* +SYNTAX *ft-syntax-omni* + +This uses the current syntax highlighting for completion. It can be used for +any filetype and provides a minimal language-sensitive completion. + +To enable code completion do: > + source $VIMRUNTIME/autoload/syntaxcomplete.vim + +You can automate this by placing this in your vimrc (after any ":filetype" +command): > + autocmd Filetype * + \ if exists('&ofu') && &ofu == "" | + \ source $VIMRUNTIME/autoload/syntaxcomplete.vim | + \ endif + +The above will set completion to this script only if a proper one does not +already exist for that filetype. + + +XML *ft-xml-omni* Vim 7 provides mechanism to context aware completion of XML files. It depends on special |xml-omni-datafile| and two commands: |:XMLns| and |:XMLent|. @@ -1056,7 +1075,7 @@ Features are: with " :XMLns xsl xsl -:XMLent {name} *:XMLent* +:XMLent {name} *:XMLent* By default entities will be completed from data file of default namespace. XMLent command should be used in case when there is no default namespace: > - :XMLent xhtml10s + :XMLent xhtml10s Usage While used in situation (after declarations from previous part, | is cursor position): > - <| + <| Will complete to appropriate XHTML tag, and in this situation: > - - :echo xmlcomplete#GetLastOpenTag("b:unaryTagsStack") + :echo xmlcomplete#GetLastOpenTag("b:unaryTagsStack") diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 90ebe06ebc..85155b439d 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 7.0aa. Last change: 2005 Dec 17 +*map.txt* For Vim version 7.0aa. Last change: 2006 Jan 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -946,11 +946,10 @@ local function or uses a local mapping. Otherwise, using "" outside of a script context is an error. If you need to get the script number to use in a complicated script, you can -use this trick: > - :map xx xx - :let s:sid = maparg("xx") - :unmap xx -And remove the trailing "xx". +use this function: > + function s:SID() + return matchstr(expand(''), '\zs\d\+\ze_SID$') + endfun The "" will be shown when listing functions and mappings. This is useful to find out what they are defined to. diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt index c64b4540be..bb94867b3f 100644 --- a/runtime/doc/message.txt +++ b/runtime/doc/message.txt @@ -1,4 +1,4 @@ -*message.txt* For Vim version 7.0aa. Last change: 2005 Oct 10 +*message.txt* For Vim version 7.0aa. Last change: 2006 Jan 08 VIM REFERENCE MANUAL by Bram Moolenaar @@ -19,7 +19,8 @@ The ":messages" command can be used to view previously given messages. This is especially useful when messages have been overwritten or truncated. This depends on the 'shortmess' option. -The number of remembered messages is fixed at 20. +The number of remembered messages is fixed at 20 for the tiny version and 100 +for other versions. *g<* The "g<" command can be used to see the last page of previous command output. diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt index dd95b6cc65..5570d7303f 100644 --- a/runtime/doc/motion.txt +++ b/runtime/doc/motion.txt @@ -1,4 +1,4 @@ -*motion.txt* For Vim version 7.0aa. Last change: 2005 Dec 12 +*motion.txt* For Vim version 7.0aa. Last change: 2006 Jan 02 VIM REFERENCE MANUAL by Bram Moolenaar @@ -386,10 +386,11 @@ These commands move over words or WORDS. *word* A word consists of a sequence of letters, digits and underscores, or a sequence of other non-blank characters, separated with white space (spaces, -tabs, ). This can be changed with the 'iskeyword' option. +tabs, ). This can be changed with the 'iskeyword' option. An empty line +is also considered to be a word. *WORD* A WORD consists of a sequence of non-blank characters, separated with white -space. An empty line is also considered to be a word and a WORD. +space. An empty line is also considered to be a WORD. A sequence of folded lines is counted for one word of a single character. "w" and "W", "e" and "E" move to the start/end of the first word or WORD after diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index e121a77c6e..c6535366dc 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 Dec 29 +*options.txt* For Vim version 7.0aa. Last change: 2006 Jan 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -4597,12 +4597,12 @@ A jump table for the options with a short description can be found at |Q_op|. This defines what bases Vim will consider for numbers when using the CTRL-A and CTRL-X commands for adding to and subtracting from a number respectively; see |CTRL-A| for more info on these commands. - alpha if included, single alphabetical characters will be + alpha If included, single alphabetical characters will be incremented or decremented. This is useful for a list with a letter index a), b), etc. - octal if included, numbers that start with a zero will be considered + octal If included, numbers that start with a zero will be considered to be octal. Example: Using CTRL-A on "007" results in "010". - hex if included, numbers starting with "0x" or "0X" will be + hex If included, numbers starting with "0x" or "0X" will be considered to be hexadecimal. Example: Using CTRL-X on "0x100" results in "0x0ff". Numbers which simply begin with a digit in the range 1-9 are always @@ -6050,6 +6050,7 @@ A jump table for the options with a short description can be found at |Q_op|. a S Argument list status as in default title. ({current} of {max}) Empty if the argument file count is zero or one. { NF Evaluate expression between '{' and '}' and substitute result. + Note that there is no '%' before the closing '}'. ( - Start of item group. Can be used for setting the width and alignment of a section. Must be followed by %) somewhere. ) - End of item group. No width fields allowed. diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index 2cc5921894..191a8d587c 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1,4 +1,4 @@ -*pattern.txt* For Vim version 7.0aa. Last change: 2005 Sep 12 +*pattern.txt* For Vim version 7.0aa. Last change: 2006 Jan 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -256,9 +256,13 @@ switched off by setting the 's' flag in the 'shortmess' option. The highlight method 'w' is used for this message (default: standout). *search-range* -You cannot limit the search command "/" to a certain range of lines. A trick -to do this anyway is to use the ":substitute" command with the 'c' flag. -Example: > +You can limit the search command "/" to a certain range of lines by including +\%>l items. For example, to match the word "limit" below line 199 and above +line 300: > + /\%>199l\%<300llimit +Also see |/\%>l|. + +Another way is to use the ":substitute" command with the 'c' flag. Example: > :.,300s/Pattern//gc This command will search from the cursor position until line 300 for "Pattern". At the match, you will be asked to type a character. Type 'q' to @@ -800,8 +804,8 @@ $ At end of pattern or in front of "\|" or "\)" ("|" or ")" after "\v"): */\%l* */\%>l* */\%23l Matches below a specific line. +\%<23l Matches above a specific line (lower line number). +\%>23l Matches below a specific line (higher line number). These three can be used to match specific lines in a buffer. The "23" can be any line number. The first line is 1. {not in Vi} WARNING: When inserting or deleting lines Vim does not automatically diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 0049a5464f..09eccb52e3 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 7.0aa. Last change: 2005 Sep 27 +*quickfix.txt* For Vim version 7.0aa. Last change: 2006 Jan 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -110,8 +110,8 @@ The following quickfix commands can be used: Read the error file. Just like ":cfile" but don't jump to the first error. - *:cad* *:caddfile* -:cad[dfile] [errorfile] Read the error file and add the errors from the + *:caddf* *:caddfile* +:caddf[ile] [errorfile] Read the error file and add the errors from the errorfile to the current quickfix list. If a quickfix list is not present, then a new list is created. @@ -124,17 +124,27 @@ The following quickfix commands can be used: Otherwise all lines in the buffer are used. *:cex* *:cexpr* -:cex[pr][!] {expr} Create a quickfix list using the result of {expr}. - If {expr} is a String, then each new-line terminated - line in the String is processed using 'errorformat' - and the result is added to the quickfix list. - If {expr} is a List, then each String item in the list - is processed and added to the quickfix list. - Non String items in the List are ignored. See |:cc| +:cex[pr][!] {expr} Create a quickfix list using the result of {expr} and + jump to the first error. If {expr} is a String, then + each new-line terminated line in the String is + processed using 'errorformat' and the result is added + to the quickfix list. If {expr} is a List, then each + String item in the list is processed and added to the + quickfix list. Non String items in the List are + ignored. See |:cc| for [!]. Examples: > :cexpr system('grep -n xyz *') :cexpr getline(1, '$') +< + *:cad* *:caddexpr* +:cad[dexpr][!] {expr} Evaluate {expr} and add the resulting lines to the + current quickfix list. If a quickfix list is not + present, then a new list is created. The current + cursor position will not be changed. See |:cexpr| for + more information. + Example: > + :g/mypattern/caddexpr expand("%") . ":" . line(".") . ":" . getline(".") < *:cl* *:clist* :cl[ist] [from] [, [to]] diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index 687e5cff5c..251fcc2b5b 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -1,4 +1,4 @@ -*quickref.txt* For Vim version 7.0aa. Last change: 2005 Dec 12 +*quickref.txt* For Vim version 7.0aa. Last change: 2006 Jan 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -938,7 +938,9 @@ Short explanation of each option: *option-list* |:clist| :cl list all errors |:cfile| :cf read errors from the file 'errorfile' |:cgetfile| :cg like :cfile but don't jump to the first error -|:caddfile| :cad add errors from the error file to the current +|:caddfile| :caddf add errors from the error file to the current + quickfix list +|:caddexpr| :cad add errors from an expression to the current quickfix list |:cbuffer| :cb read errors from text in a buffer |:cexpr| :cex read errors from an expression diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt index 101e9b518b..a2989d7830 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 Dec 29 +*spell.txt* For Vim version 7.0aa. Last change: 2006 Jan 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -172,6 +172,12 @@ When there is a line break right after a sentence the highlighting of the next line may be postponed. Use |CTRL-L| when needed. Also see |set-spc-auto| for how it can be set automatically when 'spelllang' is set. +Vim counts the number of times a good word is encountered. This is used to +sort the suggestions: words that have been seen before get a small bonus, +words that have been seen often get a bigger bonus. The COMMON item in the +affix file can be used to define common words, so that this mechanism also +works in a new or short file |spell-COMMON|. + ============================================================================== 2. Remarks on spell checking *spell-remarks* @@ -296,6 +302,11 @@ 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! + *spell-sug-file* +If there is a file with exactly the same name as the ".spl" file but ending in +".sug", that file will be used for giving better suggestions. It isn't loaded +before suggestions are made to reduce memory use. + *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 intended for another Vim @@ -531,6 +542,11 @@ used spelling files, use this command: Note: For some languages the result may be enormous, causing Vim to run out of memory. +:spelld[ump]! Like ":spelldump" and include the word count. This is + the number of times the word was found while + updating the screen. Words that are in COMMON items + get a starting count of 10. + 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. @@ -569,13 +585,16 @@ Additionally the following items are recognized: - Empty and blank lines are ignored. + # comment ~ - Lines starting with a # are ignored (comment lines). + /encoding=utf-8 ~ - A line starting with "/encoding=", before any word, specifies the encoding of the file. After the second '=' comes an encoding name. This tells Vim to setup conversion from the specified encoding to 'encoding'. Thus you can use one word list for several target encodings. + /regions=usca ~ - A line starting with "/regions=" specifies the region names that are supported. Each region name must be two ASCII letters. The first one is region 1. Thus "/regions=usca" has region 1 "us" and region 2 "ca". @@ -583,7 +602,8 @@ Additionally the following items are recognized: list! - Other lines starting with '/' are reserved for future use. The ones that - are not recognized are ignored (but you do get a warning message). + are not recognized are ignored. You do get a warning message, so that you + know something won't work. - A "/" may follow the word with the following items: = Case must match exactly. @@ -608,17 +628,18 @@ accepted. This is different from a word with mixed case that is automatically marked as keep-case, those words may appear in all upper-case letters. -FORMAT WITH AFFIX COMPRESSION +FORMAT WITH .AFF and .DIC FILES -There are two files: the basic word list and an affix file. The affixes are +There are two files: the basic word list and an affix file. The affix file +specifies settings for the language and can contain affixes. The affixes are 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 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). -But only developers need to know about it. +The basic word list and the affix file are combined with the ":mkspell" +command and results in 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). But only developers need to know about it. 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 @@ -630,39 +651,47 @@ 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. +that the same files can often be used. One other project that offers more +than Myspell is Hunspell ( http://hunspell.sf.net ). WORD LIST FORMAT *spell-dic-format* -A very short example, with line numbers: - - 1 1234 - 2 aan - 3 Als - 4 Etten-Leur - 5 et al. - 6 's-Gravenhage - 7 's-Gravenhaags - 8 bedel/P - 9 kado/1 - 10 cadeau/2 - 11 TCP,IP +A short example, with line numbers: + + 1 1234 ~ + 2 aan ~ + 3 Als ~ + 4 Etten-Leur ~ + 5 et al. ~ + 6 's-Gravenhage ~ + 7 's-Gravenhaags ~ + 8 # word that differs between regions ~ + 9 kado/1 ~ + 10 cadeau/2 ~ + 11 TCP,IP ~ + 12 /the S affix may add a 's' ~ + 13 bedel/S ~ The first line contains the number of words. Vim ignores it, but you do get an error message if it's not there. *E760* -What follows is one word per line. There should be no white space before or -after the word. After the word there is an optional slash and flags. Most of -these flags are 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. Vim allows using other flag types with the FLAG item -in the affix file |spell-FLAG|. +What follows is one word per line. White space at the end of the line is +ignored, all other white space matters. The encoding is specified in the +affix file |spell-SET|. + +Comment lines start with '#' or '/'. See the example lines 8 and 12. Note +that putting a comment after a word is NOT allowed: + + someword # comment that causes an error! ~ + +After the word there is an optional slash and flags. Most of these flags are +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 |spell-SFX| and +|spell-PFX|. Vim allows using other flag types with the FLAG item in the +affix file |spell-FLAG|. When the word only has lower-case letters it will also match with the word starting with an upper-case letter. @@ -672,7 +701,7 @@ is required at this position. The same word with a lower-case letter at this position will not match. When some of the other letters are upper-case it will not match either. -The word with all upper-case characters will always be OK. +The word with all upper-case characters will always be OK, word list matches does not match ~ als als Als ALS ALs AlS aLs aLS @@ -683,46 +712,57 @@ The word with all upper-case characters will always be OK. The KEEPCASE affix ID can be used to specifically match a word with identical case only, see below |spell-KEEPCASE|. -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 -when it appears with a non-word character before and after it. For Myspell a -word starting with a non-word character probably won't work. +Note: in line 5 to 7 non-word characters are used. You can include any +character in a word. When checking the text a word still only matches when it +appears with a non-word character before and after it. For Myspell a word +starting with a non-word character probably won't work. 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". +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 KEEPCASE -in the affix file. This has the meaning that case matters. This can be used -if the word does not have the first letter in upper case at the start of a -sentence. Example (assuming that = was used for KEEPCASE): - word list matches does not match ~ - 's morgens/= 's morgens 'S morgens 's Morgens 'S MORGENS - 's Morgens 's Morgens 'S MORGENS 'S morgens 's morgens +AFFIX FILE FORMAT *spell-aff-format* *spell-affix-vim* -The flag can also be used to avoid that the word matches when it is in all -upper-case letters. + *spell-affix-comment* +Comment lines in the .aff file start with a '#': + + # comment line ~ +With some items it's also possible to put a comment after it, but this isn't +supported in general. + + +ENCODING *spell-SET* + +The affix file can be in any encoding that is supported by "iconv". However, +in some cases the current locale should also be set properly at the time +|:mkspell| is invoked. Adding FOL/LOW/UPP lines removes this requirement +|spell-FOL|. + +The encoding should be specified before anything where the encoding matters. +The encoding applies both to the affix file and the dictionary file. It is +done with a SET line: + + SET utf-8 ~ + +The encoding can be different from the value of the 'encoding' option at the +time ":mkspell" is used. Vim will then convert everything to 'encoding' and +generate a spell file for 'encoding'. If some of the used characters to not +fit in 'encoding' you will get an error message. *spell-affix-mbyte* -The basic word list is normally in an 8-bit encoding, which is mentioned in -the affix file. The affix file must always be in the same encoding as the -word list. This is compatible with Myspell. For Vim the encoding may also be -something else, any encoding that "iconv" supports. The "SET" line must -specify the name of the encoding. When using a multi-byte encoding it's -possible to use more different affixes (but Myspell doesn't support that, thus -you may not want to use it anyway). +When using a multi-byte encoding it's possible to use more different affix +flags. But Myspell doesn't support that, thus you may not want to use it +anyway. For compatibility use an 8-bit encoding. CHARACTER TABLES *spell-affix-chars* When using an 8-bit encoding the affix file should define what characters are -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. - +word characters. 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-FOL* *spell-LOW* *spell-UPP* Three lines in the affix file are needed. Simplistic example: @@ -774,7 +814,7 @@ the word. This is needed to detect a spelling error such as they'are. That should be they're, but since "they" and "are" are words themselves that would go unnoticed. -These characters are defined with MIDWORD in the .aff file: +These characters are defined with MIDWORD in the .aff file. Example: MIDWORD '- ~ @@ -808,9 +848,58 @@ 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). -Note that Myspell ignores any extra text after the relevant info. Vim -requires this text to start with a "#" so that mistakes don't go unnoticed. -Example: +Summary: + SFX L Y 2 ~ + SFX L 0 re [^x] ~ + SFX L 0 ro x ~ + +The first line is a header and has four fields: + SFX {flag} {combine} {count} + +{flag} The name used for the suffix. Mostly it's a single letter, + but other characters can be used, see |spell-FLAG|. + +{combine} Can be 'Y' or 'N'. When 'Y' then the word plus suffix can + also have a prefix. When 'N' then a prefix is not allowed. + +{count} The number of lines following. If this is wrong you will get + an error message. + +For PFX the fields are exactly the same. + +The basic format for the following lines is: + SFX {flag} {strip} {add} {condition} + +{flag} Must be the same as the {flag} used in the first line. + +{strip} Characters removed from the basic word. There is no check if + the characters are actually there, only the length is used (in + bytes). This better match the {condition}, otherwise strange + things may happen. If the {strip} length is equal to or + longer than the basic word the suffix won't be used. + When {strip} is 0 (zero) then nothing is stripped. + +{add} Characters added to the basic word, after removing {strip}. + +{condition} A simplistic pattern. Only when this matches with a basic + word will the suffix be used for that word. This is normally + for using one suffix letter with different {add} and {strip} + fields for words with different endings. + When {condition} is a . (dot) there is no condition. + The pattern may contain: + - Literal characters. + - A set of characters in []. [abc] matches a, b and c. + A dash is allowed for a range [a-c], but this is + Vim-specific. + - A set of characters that starts with a ^, meaning the + complement of the specified characters. [^abc] matches any + character but a, b and c. + +For PFX the fields are the same, but the {strip}, {add} and {condition} apply +to the start of the word. + +Note: Myspell ignores any extra text after the relevant info. Vim requires +this text to start with a "#" so that mistakes don't go unnoticed. Example: SFX F 0 in [^i]n # Spion > Spionin ~ SFX F 0 nen in # Bauerin > Bauerinnen ~ @@ -826,16 +915,49 @@ Myspell that use this feature apparently have this flag. Example: SFX a 0 en . ~ SFX a 0 on . ~ + +AFFIX FLAGS *spell-affix-flags* + +This is a feature that comes from Hunspell: The affix may specify flags. This +works similar to flags specified on a basic word. The flags apply to the +basic word plus the affix. Example: + + SFX S Y 1 ~ + SFX S 0 s . ~ + + SFX A Y 1 ~ + SFX A 0 able/S . ~ + +When the dictionary file contains "drink/AS" then these words are possible: + + drink + drinks uses S suffix + drinkable uses A suffix + drinkables uses A suffix and then S suffix + +Generally the flags of the suffix are added to the flags of the basic word, +both are used for the word plus suffix. But the flags of the basic word are +only used once for affixes, except that both one prefix and one suffix can be +used when both support combining. + +Specifically, the affix flags can be used for: +- Affixes on affixes, as in the example above. +- Making the word with the affix rare, by using the |spell-RARE| flag. +- Exclude the word with the affix from compounding, by using the + |spell-COMPOUNDFORBIDFLAG| flag. + +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +OLD STUFF *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 -marked as rare words. Example: +marked as rare words. Examples: PFX F 0 nene . rare ~ SFX F 0 oin n rare # hardly ever used ~ -However, if the word also appears as a good word in another way it won't be -marked as rare. +However, if the word also appears as a good word in another way (e.g., in +another region) it won't be marked as rare. *spell-affix-nocomp* Another extra item for Vim is the "nocomp" flag. It must come after the other @@ -852,6 +974,7 @@ Example: util/ac ~ This allows for "wordutil" and "wordutils" but not "wordutilize". +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- *spell-PFXPOSTPONE* When an affix file has very many prefixes that apply to many words it's not @@ -891,7 +1014,16 @@ for keep-case words. Example: KEEPCASE = ~ -See above for an example |spell-affix-vim|. +This flag is not supported by Myspell. It has the meaning that case matters. +This can be used if the word does not have the first letter in upper case at +the start of a sentence. Example: + + word list matches does not match ~ + 's morgens/= 's morgens 'S morgens 's Morgens 'S MORGENS + 's Morgens 's Morgens 'S MORGENS 'S morgens 's morgens + +The flag can also be used to avoid that the word matches when it is in all +upper-case letters. RARE WORDS *spell-RARE* @@ -922,18 +1054,15 @@ 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. +The flag also applies to the word with affixes, thus this can be used to mark +a whole bunch of related words as bad. + *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: +word itself is not a good word (unless there is an empty affix). Example: NEEDAFFIX + ~ - *spell-NEEDCOMPOUND* -The NEEDCOMPOUND flag is used to require that a word is used as part of a -compound word The word itself is not a good word. Example: - - NEEDCOMPOUND & ~ - COMPOUND WORDS *spell-compound* @@ -944,8 +1073,8 @@ call this character a flag here. Obviously these flags must be different from any affix IDs used. *spell-COMPOUNDFLAG* -The Myspell compatible method uses one flag, specified with COMPOUNDFLAG. -All words with this flag combine in any order. This means there is no control +The Myspell compatible method uses one flag, specified with COMPOUNDFLAG. All +words with this flag combine in any order. This means there is no control over which word comes first. Example: COMPOUNDFLAG c ~ @@ -1006,6 +1135,12 @@ A specific example: Allow a compound to be made of two words and a dash: This allows for the word "start-end", but not "startend". + *spell-NEEDCOMPOUND* +The NEEDCOMPOUND flag is used to require that a word is used as part of a +compound word. The word itself is not a good word. Example: + + NEEDCOMPOUND & ~ + *spell-COMPOUNDMIN* The minimal character length of a word used for compounding is specified with COMPOUNDMIN. Example: @@ -1037,6 +1172,17 @@ If both COMPOUNDMAX and COMPOUNDSYLMAX are defined, a compound word is accepted if it fits one of the criteria, thus is either made from up to COMPOUNDMAX words or contains up to COMPOUNDSYLMAX syllables. + *spell-COMPOUNDFORBIDFLAG* +The COMPOUNDFORBIDFLAG specifies a flag that can be used on an affix. It +means that the word plus affix cannot be used in a compound word. +NOT IMPLEMENTED YET. + + *spell-COMPOUNDPERMITFLAG* +The COMPOUNDPERMITFLAG specifies a flag that can be used on an affix. It +means that the word plus affix can also be used in a compound word in a way +where the affix ends up halfway the word. +NOT IMPLEMENTED YET. + *spell-SYLLABLE* The SYLLABLE item defines characters or character sequences that are used to count the number of syllables in a word. Example: @@ -1105,6 +1251,30 @@ lists that support this. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< + *spell-COMMON* +Common words can be specified with the COMMON item. This will give better +suggestions when editing a short file. Example: + + COMMON the of to and a in is it you that he was for on are ~ + +The words must be separated by white space, up to 25 per line. +When multiple regions are specified in a ":mkspell" command the common words +for all regions are combined and used for all regions. + + *spell-NOSPLITSUGS* +This item indicates that suggestions for splitting a word will not appear: + + NOSPLITSUGS ~ + + *spell-NOSUGGEST* +The flag specified with NOSUGGEST can be used for words that will not be +suggested. Can be used for obscene words. + + NOSUGGEST % ~ + +NOT IMPLEMENTED YET. + + REPLACEMENTS *spell-REP* In the affix file REP items can be used to define common mistakes. This is @@ -1118,7 +1288,7 @@ used to make spelling suggestions. The items define the "from" text and the REP ch k ~ The first line specifies the number of REP lines following. Vim ignores the -number, but it must be there. +number, but it must be there (for compatibility with Myspell). Don't include simple one-character replacements or swaps. Vim will try these anyway. You can include whole words if you want to, but you might want to use @@ -1146,6 +1316,17 @@ 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. +.SUG FILE *spell-NOSUGFILE* + +When soundfolding is specified in the affix file then ":mkspell" will normally +p ~ ~roduce a .sug file next to the .spl file. This used to find suggestions by +their sound-a-like form quickly. At the cost of a lot of memory. + +To avoid producing a .sug file use this item in the affix file: + + NOSUGFILE ~ + + SOUND-A-LIKE *spell-SAL* In the affix file SAL items can be used to define the sounds-a-like mechanism @@ -1197,4 +1378,105 @@ You can use the |soundfold()| function to try out the results. Or set the 'verbose' option to see the score in the output of the |z=| command. +UNSUPPORTED ITEMS *spell-affix-not-supported* + +These items appear in the affix file of other spell checkers. In Vim they are +ignored, not supported or defined in another way. + +ACCENT (Hunspell) *spell-ACCENT* + Use MAP instead. |spell-MAP| + +CHECKCOMPOUNDCASE (Hunspell) *spell-CHECKCOMPOUNDCASE* + Disallow uppercase letters at compound word boundaries. + Not supported. + +CHECKCOMPOUNDDUP (Hunspell) *spell-CHECKCOMPOUNDDUP* + Disallow using the same word twice in a compound. Not + supported. + +CHECKCOMPOUNDREP (Hunspell) *spell-CHECKCOMPOUNDREP* + Something about using REP items and compound words. Not + supported. + +CHECKCOMPOUNDTRIPLE (Hunspell) *spell-CHECKCOMPOUNDTRIPLE* + Forbid three identical characters when compounding. Not + supported. + +CHECKCOMPOUNDPATTERN (Hunspell) *spell-CHECKCOMPOUNDPATTERN* + Forbid compounding when patterns match. Not supported. + +CIRCUMFIX (Hunspell) *spell-CIRCUMFIX* + This means a prefix and suffix must be added at the same time. + Instead only specify the suffix, and give the that suffix two + flags: The required prefix and the NEEDAFFIX flag. + |spell-NEEDAFFIX| + +COMPLEXPREFIXES (Hunspell) *spell-COMPLEXPREFIXES* + Enables using two prefixes. Not supported. + +COMPOUNDBEGIN (Hunspell) *spell-COMPOUNDBEGIN* + Use COMPOUNDFLAGS instead. |spell-COMPOUNDFLAGS| + +COMPOUNDEND (Hunspell) *spell-COMPOUNDEND* + Use COMPOUNDFLAGS instead. |spell-COMPOUNDFLAGS| + +COMPOUNDMIDDLE (Hunspell) *spell-COMPOUNDMIDDLE* + Use COMPOUNDFLAGS instead. |spell-COMPOUNDFLAGS| + +COMPOUNDROOT (Hunspell) *spell-COMPOUNDROOT* + Flag for words in the dictionary that are already a compound. + Vim doesn't use it. + +COMPOUNDSYLLABLE (Hunspell) *spell-COMPOUNDSYLLABLE* + Use SYLLABLE and COMPOUNDSYLMAX instead. |spell-SYLLABLE| + |spell-COMPOUNDSYLMAX| + +COMPOUNDWORDMAX (Hunspell) *spell-COMPOUNDWORDMAX* + Use COMPOUNDMAX instead. |spell-COMPOUNDMAX| + +FORBIDDENWORD (Hunspell) *spell-FORBIDDENWORD* + Use BAD instead. |spell-BAD| + +HOME (Hunspell) *spell-HOME* + Specifies the website for the language. Not supported. + +LANG (Hunspell) *spell-LANG* + This specifies language-specific behavior. This actually + moves part of the language knowledge into the program, + therefore Vim does not support it. Each language property + must be specified separately. + +LEMMA_PRESENT (Hunspell) *spell-LEMMA_PRESENT* + Only needed for mprphological analysis. + +MAXNGRAMSUGS (Hunspell) *spell-MAXNGRAMSUGS* + Not supported. + +NAME (Hunspell) *spell-NAME* + Specifies the name of the language. Not supported. + +ONLYINCOMPOUND (Hunspell) *spell-ONLYINCOMPOUND* + Use NEEDCOMPOUND instead. |spell-NEEDCOMPOUND| + +PSEUDOROOT (Hunspell) *spell-PSEUDOROOT* + Use NEEDAFFIX instead. |spell-NEEDAFFIX| + +SUGSWITHDOTS (Hunspell) *spell-SUGSWITHDOTS* + Adds dots to suggestions. Vim doesn't need this. + +SYLLABLENUM (Hunspell) *spell-SYLLABLENUM* + Not supported. + +TRY (Myspell, Hunspell, others) *spell-TRY* + Vim does not use the TRY item, it is ignored. For making + suggestions the actual characters in the words are used. + +VERSION (Hunspell) *spell-VERSION* + Specifies the version for the language. Not supported. + +WORDCHARS (Hunspell) *spell-WORDCHARS* + Used to recognize words. Vim doesn't need it, because there + is no need to separate words before checking them (using a + trie instead of a hashtable). + vim:tw=78:sw=4:ts=8:ft=help:norl: diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 02a4ea016c..2ded3f2eb4 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.0aa. Last change: 2005 Nov 30 +*syntax.txt* For Vim version 7.0aa. Last change: 2005 Dec 31 VIM REFERENCE MANUAL by Bram Moolenaar @@ -3245,7 +3245,7 @@ A more complicated Example: > < abcfoostringbarabc mmmmmmmmmmm match - ssrrrreee highlight start/region/end ("Foo", "Exa" and "Bar") + sssrrreee highlight start/region/end ("Foo", "Exa" and "Bar") Leading context *:syn-lc* *:syn-leading* *:syn-context* diff --git a/runtime/doc/tags b/runtime/doc/tags index c2ec052d68..187a06e1bf 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -1782,7 +1782,9 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :cabbrev map.txt /*:cabbrev* :cabc map.txt /*:cabc* :cabclear map.txt /*:cabclear* -:cad quickfix.txt /*:cad* +:cadde quickfix.txt /*:cadde* +:caddexpr quickfix.txt /*:caddexpr* +:caddf quickfix.txt /*:caddf* :caddfile quickfix.txt /*:caddfile* :cal eval.txt /*:cal* :call eval.txt /*:call* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 745e4b7899..542e6f133e 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.0aa. Last change: 2005 Dec 29 +*todo.txt* For Vim version 7.0aa. Last change: 2006 Jan 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -30,25 +30,81 @@ be worked on, but only if you sponsor Vim development. See |sponsor|. *known-bugs* -------------------- Known bugs and current work ----------------------- +Find E999 and hand out numbers. + +Compress list of word numbers: sort them, computer differences, store as utf-8 +bytes. + +Undo bug: Gerald Lai Jan 3. + +Syntax HL: when region start has an offset that happens to be after the end of +the line then strange things happen. (Brett Stahlman Dec 31) + +Add Python complete script (Aaron Griffin) + +Evaluating CTRL-R = in the sandbox causes trouble (G. Sumner Hayes). Can the +rules for the commandline window be used? + +Evaluate 'balloonexpr' in the sandbox only when it was set from an unsafe +place (e.g., modeline)? Patch from Sumner Hayes, Jan 12. Also use for other +options? + +":saveas asdf.c" should set 'filetype' to c when it's empty. Also for ":w +asdf.c" when it sets the buffer filename. + ccomplete: +- When using page-up/page-down in menu it sometimes jumps more than a page. - When an option is set: In completion mode and the user types (identifier) characters, advance to the first match instead of removing the popup menu. If there is no match remove the selection. (Yegappan Lakshmanan) - Complete the longest common match instead of the first match? For all kinds of completions? Configurable? -- Window resize when poup is displayed +- Window resize when poup is displayed. - When completing something that is a structure, add the "." or "->" right away. How to figure out if it's a pointer or not? - When a typedef or struct is local to a file only use it in that file? +- Extra info for each entry to show in a tooltip kind of thing. +- Special mappings for when the popup menu is visible? Would allow for making + a specific selection (e.g, methods vs variables). +- Provide a function to popup the menu, so that an insert mode mapping can + start it (with a specific selection). - !_TAG_FILE_FORMAT and it's ilk are listed in the global completions Can't reproduce it right now... spelling: -- Hunspell has NOSUGGEST flag (use for obscene words?) -- Check out Hunspell 1.1.2. +- NL woordenlijst naar Adri sturen. +- Include script to cleanup a .add file. (Antonio Colombo, Jan 9) +- suggestions for "macARONI" doesn't