diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-01-12 23:22:24 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-01-12 23:22:24 +0000 |
commit | 4770d09abd866bb53d95895dc6a5c5fe7cccb619 (patch) | |
tree | b9ca6f4a66c7591a84cfe88fb21edb31db906a4e /runtime | |
parent | 1cbe5f739d4e75b5e16b85ae79ff0434a641b03d (diff) | |
download | vim-git-4770d09abd866bb53d95895dc6a5c5fe7cccb619.tar.gz |
updated for version 7.0179v7.0179
Diffstat (limited to 'runtime')
35 files changed, 1092 insertions, 182 deletions
diff --git a/runtime/autoload/syntaxcomplete.vim b/runtime/autoload/syntaxcomplete.vim new file mode 100644 index 000000000..367847c9b --- /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 <fishburn@ianywhere.com> +" 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 28edb4d4b..e83309a8d 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 72b3c295f..d12c1ea77 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 <F7> <C-\>eAppendSome()<CR> :func AppendSome() diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index 498833c5a..4d12d166c 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 7d7058201..4c527e1a1 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 0580891e2..d0fd793a2 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 6c5037c88..96a6c612d 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 f7db100cb..0a28038dc 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* <MouseUp> scroll three lines up *i_<MouseUp>* <S-MouseUp> scroll a full page up *i_<S-MouseUp>* 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: <CR> and <Enter>: Accept the currently selected match -<Up>: Select the previous match, as if CTRL-P was used -<Down>: Select the next match, as if CTRL-N was used +<Up>: Select the previous match, as if CTRL-P was used +<Down>: Select the next match, as if CTRL-N was used <PageUp>: Select a match several entries back <PageDown>: 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 "<!ENTITY" declarations - when used after "</" CTRL-X CTRL-O will close the last opened tag -Format of XML data file *xml-omni-datafile* +Format of XML data file *xml-omni-datafile* Vim distribution provides two data files as examples (xhtml10s.vim, xsl.vim) @@ -1105,7 +1124,7 @@ xsl.vim for example. Commands -:XMLns {name} [{namespace}] *:XMLns* +:XMLns {name} [{namespace}] *:XMLns* Vim has to know which data file should be used and with which namespace. For loading of data file and connecting data with prope namespace use |:XMLns| @@ -1118,24 +1137,24 @@ to use XML completion in .xsl files: > :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: > - <xsl:| + <xsl:| Will complete to appropriate XSL tag. @@ -1143,7 +1162,7 @@ File xmlcomplete.vim provides through |autoload| mechanism GetLastOpenTag function which can be used in XML files to get name of last open tag with (b:unaryTagsStack has to be defined): > - :echo xmlcomplete#GetLastOpenTag("b:unaryTagsStack") + :echo xmlcomplete#GetLastOpenTag("b:unaryTagsStack") diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 90ebe06eb..85155b439 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 "<SID>" 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 <SID>xx <SID>xx - :let s:sid = maparg("<SID>xx") - :unmap <SID>xx -And remove the trailing "xx". +use this function: > + function s:SID() + return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze_SID$') + endfun The "<SNR>" 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 c64b4540b..bb94867b3 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 dd95b6cc6..5570d7303 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, <EOL>). This can be changed with the 'iskeyword' option. +tabs, <EOL>). 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 e121a77c6..c6535366d 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 2cc592189..191a8d587 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* */\%<l* \%23l Matches in a specific line. -\%<23l Matches above a specific line. -\%>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 0049a5464..09eccb52e 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,18 +124,28 @@ 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]] List all errors that are valid |quickfix-valid|. diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index 687e5cff5..251fcc2b5 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 101e9b518..a2989d783 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 02a4ea016..2ded3f2eb 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 c2ec052d6..187a06e1b 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 745e4b789..542e6f133 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 include "macaroni", they are all allcap. + suggestion for "KG" to "kg" when it's keepcase. +- Autocommand event for when a spell file is missing. Allows making a plugin + that fetches the file over internet. Pattern == language. +- Using KEEPCASE flag still allows all-upper word, docs say it doesn't. + Don't allow it, because there is no other way to do this. +- Implement NOSUGGEST flag (used for obscene words). +- Implement NOSPLITSUGS. +- Rename COMPOUNDFLAGS to COMPOUNDPATTERN or COMPOUNDRULE? + Hunspell now uses COMPOUND with a count. +- Check out Hunspell 1.1.3. + what does MAXNGRAMSUGS do? + See announcement (Nemeth, 5 jan) + use "\/" instead of SLASH item? + is COMPLEXPREFIXES necessary now that we have flags for affixes? - Look into hungarian dictionary: - http://magyarispell.sourceforge.net/rc3-beta2.zip -- Support breakpoint character · 0xb7 and ignore it? + http://magyarispell.sourceforge.net/hu_HU-1.0.tar.gz +- Support flags on a suffix. Used for second level affixes, rare and + nocomp. The flags may also be used for compounding. Default is an OR + mechanism with the flags of the word. Adding "compset" on the affixes + means the compound flags of the word are not used. + Instead of "SFX a 0 add/FLAGS ." we could use "SFX a 0 add . /FLAGS" (or + support both). +- When compounding Hunspell doesn't allow affixes inside the compound word, + only before and after it. COMPOUNDPERMITFLAG can be used to allow it. + Check Myspell and Aspell if they also work this way. + Thus a word + suffix needs a flag that it can't be used with a following + compound, and word + prefix can't be after another word in a compound. +- Implement COMPOUNDFORBIDFLAG. +- Support breakpoint character · 0xb7 and ignore it? Makes it possible to use + same wordlist for hyphenation. 8 Alternate Dutch word list at www.nederlandsewoorden.nl (use script to obtain). But new Myspell wordlist will come (Hagen) - Finding suggestions with sound folding is slow. Somehow store the @@ -56,6 +112,9 @@ spelling: - Also use the spelling dictionary for dictionary completion. - Have "zg" and "zw" report the file that was modified. (Marvin Renich) - Add a command like "zg" that selects one of the files 'spellfile'. +- Add a "zug" command that undoes "zg"? Deletes the good word instead of + adding a bad word like "zw" would. Use "zuw" to undo "zw"? (Antonio + Colombo) GTK: get an X error while exiting quickly after starting (running the tests). Caused by new GTK library? @@ -66,6 +125,18 @@ Support saving and restoring session for X windows? It should work to do gui_x11_wm_protocol_handler() already takes care of the rest. global_event_filter() for GTK. +Is it easy to have an item in a pattern that matches with a mark location? +Similar to |/\%>l| and |/\%c|. (Benji Fisher) + +Patch to support lists and dicts for the Python interface. (G. Sumner Hayes, +Jan 12). Docs in a previous patch. +Use free_tv() instead of clear_tv() and vim_free(). + +Win32 installer: Default _vimrc contains absolute path to diff.exe. After +upgrading it becomes invalid. Fix it automatically somehow? Use $VIMRUNTIME +in the path instead of filling it the path? At least give a clear error +message. + In diff mode deleting lines is very slow. E.g., when diffing two .po files and then sourcing po/cleaup.vim. @@ -278,6 +349,7 @@ PLANNED FOR VERSION 7.0: 8 Support four composing/combining characters, needed for Hebrew. (Ron Aaron) Add the 'maxcombining' option to set the nr. of composing characters. At the same time support more colors (use two bytes when necessary). +8 "ga" should show all composing characters, also if there are more than 2. 8 Searching for a composing character by itself should work. Perhaps "." with a composing char should work too. - Add a few more things to 'diffopt': "horizontal", "vertical", @@ -368,6 +440,7 @@ Add gui_mch_browsedir() for Motif, Mac OS/X. Add extra list of file locations. A bit like the quickfix list, but there is one per window. Can be used with: :ltag list of matching tags, like :tselect +Patch from Yegappan Lakshmanan, Jan 9. Commands to use the location list: :lnext next location :lprevious :lNext previous location @@ -404,6 +477,11 @@ Add more tests for all new functionality in Vim 7. Especially new functions. Updated Ruby interface. (Ryan Paul) +'errorformat' docs are a bit unclear. Suggestions by Charles Campbell (2006 +Jan 6) +Add a flag to check for a match with the next item first? Helps for +continuation lines that may contain just about anything. + Awaiting updated patches: --- awaiting updated patch --- 8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible. @@ -1395,12 +1473,8 @@ Spell checking: - Compound word is accepted if nr of words is <= COMPOUNDMAX OR nr of syllables <= COMPOUNDSYLMAX. Specify using AND in the affix file? - COMPOUNDMAX -> COMPOUNDWORDMAX? -- Support flags on a suffix. Used for second level affixes. The flags may - also be used for compounding. Default is an OR mechanism with the flags - of the word. Adding "compset" on the affixes means the compound flags of - the word are not used. Instead of "SFX a 0 add/FLAGS ." we could use "SFX - a 0 add . /FLAGS" (or support both). -- NEEDCOMPOUND also used for affix? Or use "needcomp" after affix? +- NEEDCOMPOUND also used for affix? Or is this called ONLYINCOMPOUND now? + Or is ONLYINCOMPOUND only for inside a compound, not at start or end? - Do we need a flag for the rule that when compounding is done the following word doesn't have a capital after a word character, even for Onecap words? - New hunspell home page: http://hunspell.sourceforge.net/ @@ -1425,8 +1499,8 @@ Spell checking: - Add flags to count extra syllables in a word. SYLLABLEADD1 SYLLABLEADD2, etc.? Or make it possible to specify the syllable count of a word directly, e.g., after another slash: /abc/3 -- MORPHO item in affix file: ignore morphological fields after word and - affix. +- MORPHO item in affix file: ignore TAB and morphological field after + word/flags and affix. - Implement multiple flags for compound words and CMP item? Await comments from other spell checking authors. - Also see tklspell: http://tkltrans.sourceforge.net/ @@ -1487,8 +1561,8 @@ Folding: - 'foldmethod' "textobject": fold on sections and paragraph text objects. - Add 'hidecomment' option: don't display comments in /* */ and after //. Or is the conceal patch from Vince Negri a more generic solution? -- "zu": undo change in manual fold. "zU" redo change in manual fold. How to - implement this? +- "zuf": undo change in manual fold. "zUf" redo change in manual fold. How + to implement this? - "zJ" command: add the line or fold below the fold in the fold under the cursor. - 'foldmethod' "syntax": "fold=3": set fold level for a region. @@ -1525,7 +1599,6 @@ Multi-byte characters: 8 Should add test for using various commands with multi-byte characters. 8 'infercase' doesn't work with multi-byte characters. 8 toupper() function doesn't handle byte count changes. -8 "ga" should show all composing characters, also if there are more than 2. 7 When searching, should order of composing characters be ignored? 8 Should implement 'delcombine' for command line editing. 8 Detect overlong UTF-8 sequences and handle them like illegal bytes. @@ -2814,8 +2887,9 @@ Incsearch: Searching: -7 Add "g/" and "gb" to search for a pattern in the Visually selected text? +8 Add "g/" and "gb" to search for a pattern in the Visually selected text? "g?" is already used for rot13. + Can use "g/" in Normal mode, uses the '< to '> area. 8 Add a mechanism for recursiveness: "\@(([^()]*\@g[^()]*)\)". \@g stands for "go recursive here" and \@( \) marks the recursive part. Perl does it this way: diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index b4172ccb1..4cb9687cd 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 7.0aa. Last change: 2005 Oct 14 +*various.txt* For Vim version 7.0aa. Last change: 2006 Jan 08 VIM REFERENCE MANUAL by Bram Moolenaar @@ -321,6 +321,7 @@ B *+multi_byte* Korean and other languages |multibyte| *+multi_byte_ime* Win32 input method for multibyte chars |multibyte-ime| N *+multi_lang* non-English language support |multi-lang| m *+mzscheme* Mzscheme interface |mzscheme| +m *+mzscheme/dyn* Mzscheme interface |mzscheme-dynamic| |/dyn| m *+netbeans_intg* |netbeans| m *+ole* Win32 GUI only: |ole-interface| *+osfiletype* Support for the 'osfiletype' option and filetype diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt index 8518f8280..560b7ffa3 100644 --- a/runtime/doc/version7.txt +++ b/runtime/doc/version7.txt @@ -1,4 +1,4 @@ -*version7.txt* For Vim version 7.0aa. Last change: 2005 Dec 28 +*version7.txt* For Vim version 7.0aa. Last change: 2006 Jan 09 VIM REFERENCE MANUAL by Bram Moolenaar @@ -435,6 +435,9 @@ Win32: The ":winpos" command now also works in the console. (Vipin Aravind) |:cexpr| Read error messages from a Vim expression (Yegappan Lakshmanan). +|:caddexpr| Add error messages from a Vim expression to an + existing quickfix list. (Yegappan Lakshmanan). + Ex command modifiers: ~ @@ -919,6 +922,9 @@ without losing the last inserted text. The exists() function now supports checking for autocmd group definition and for supported autocommand events. (Yegappan Lakshmanan) +Allow using ":global" in the sandbox, it doesn't do anything harmful by +itself. + ============================================================================== COMPILE TIME CHANGES *compile-changes-7* @@ -1523,7 +1529,7 @@ string, because it may cause trouble in Insert mode. When evaluating an expression for CTRL-R = on the command line it was possible to open a new window, resulting in errors for incremental search, and many other nasty things were possible. Now evaluate the expression in the sandbox -to protect from unexpected behavior. +to protect from unexpected behavior. Same for CTRL-\ e. "d(" deleted the character under the cursor, while the documentation specified an exclusive motion. Vi also doesn't delete the character under the cursor. @@ -1533,4 +1539,10 @@ when it just fits in the window. In coladvance() don't stop at the window edge when filling with spaces and when in Insert mode. In mswin.vim avoid getting a beep from the "l" command. +Win32 GUI: When Alt-F4 is used to close the window and Cancel is selected in +the dialog then Vim would insert <M-F4> in the text. Now it's ignored. + +When ":silent! {cmd}" caused the swap file dialog, which isn't displayed, +there would still be a hit-enter prompt. + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/vi_diff.txt b/runtime/doc/vi_diff.txt index 76893e255..4fe7ff970 100644 --- a/runtime/doc/vi_diff.txt +++ b/runtime/doc/vi_diff.txt @@ -1,4 +1,4 @@ -*vi_diff.txt* For Vim version 7.0aa. Last change: 2005 Apr 01 +*vi_diff.txt* For Vim version 7.0aa. Last change: 2006 Jan 02 VIM REFERENCE MANUAL by Bram Moolenaar @@ -87,7 +87,9 @@ Length of an expanded string option Maximum display width Unix and Win32: 1024 characters, otherwise 255 characters Maximum lhs of a mapping 50 characters. -Number of highlighting different types: 223 +Number of different highlighting types: over 30000 +Range of a Number variable: -2147483648 to 2147483647 (more on 64 bit + systems) Information for undo and text in registers is kept in memory, thus when making (big) changes the amount of (virtual) memory available limits the number of diff --git a/runtime/filetype.vim b/runtime/filetype.vim index e2b1d1041..3a4d70ff9 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2005 Nov 23 +" Last Change: 2006 Jan 12 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -399,7 +399,7 @@ fun! s:FTent() setf dtd endfun -" Clipper (or FoxPro) +" Clipper (or FoxPro; could also be eviews) au BufNewFile,BufRead *.prg \ if exists("g:filetype_prg") | \ exe "setf " . g:filetype_prg | @@ -606,6 +606,9 @@ au BufNewFile,BufRead *.gpi setf gnuplot " GrADS scripts au BufNewFile,BufRead *.gs setf grads +" Gretl +au BufNewFile,BufRead *.gretl setf gretl + " Groovy au BufNewFile,BufRead *.groovy setf groovy diff --git a/runtime/makemenu.vim b/runtime/makemenu.vim index 4cb0ddfb9..3728041cc 100644 --- a/runtime/makemenu.vim +++ b/runtime/makemenu.vim @@ -1,6 +1,6 @@ " Script to define the syntax menu in synmenu.vim " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2005 Dec 01 +" Last Change: 2006 Jan 12 " This is used by "make menu" in the src directory. edit <sfile>:p:h/synmenu.vim @@ -186,7 +186,9 @@ SynMenu FG.Grub:grub SynMenu FG.GNU\ Server\ Pages:gsp SynMenu FG.GNUplot:gnuplot SynMenu FG.GrADS\ scripts:grads +SynMenu FG.Gretl:gretl SynMenu FG.Groff:groff +SynMenu FG.Groovy:groovy SynMenu FG.GTKrc:gtkrc SynMenu HIJK.Haskell.Haskell:haskell diff --git a/runtime/optwin.vim b/runtime/optwin.vim index 5c53b0560..67538dfb5 100644 --- a/runtime/optwin.vim +++ b/runtime/optwin.vim @@ -1,7 +1,7 @@ " These commands create the option window. " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2005 Oct 02 +" Last Change: 2006 Jan 13 " If there already is an option window, jump to that one. if bufwinnr("option-window") > 0 @@ -725,6 +725,8 @@ if has("digraphs") endif call append("$", "tildeop\tthe \"~\" command behaves like an operator") call <SID>BinOptionG("top", &top) +call append("$", "operatorfunc\tfunction called for the\"g@\" operator") +call <SID>OptionG("opfunc", &opfunc) call append("$", "showmatch\tWhen inserting a bracket, briefly jump to its match") call <SID>BinOptionG("sm", &sm) call append("$", "matchtime\ttenth of a second to show a match for 'showmatch'") diff --git a/runtime/spell/en.ascii.spl b/runtime/spell/en.ascii.spl Binary files differindex 10ed3b6a2..33cb8202a 100644 --- a/runtime/spell/en.ascii.spl +++ b/runtime/spell/en.ascii.spl diff --git a/runtime/spell/en.ascii.sug b/runtime/spell/en.ascii.sug Binary files differnew file mode 100644 index 000000000..a254ed27b --- /dev/null +++ b/runtime/spell/en.ascii.sug diff --git a/runtime/spell/en.latin1.spl b/runtime/spell/en.latin1.spl Binary files differindex fb522ea5a..68cade004 100644 --- a/runtime/spell/en.latin1.spl +++ b/runtime/spell/en.latin1.spl diff --git a/runtime/spell/en.latin1.sug b/runtime/spell/en.latin1.sug Binary files differnew file mode 100644 index 000000000..7aa6bb5fc --- /dev/null +++ b/runtime/spell/en.latin1.sug diff --git a/runtime/spell/en.utf-8.spl b/runtime/spell/en.utf-8.spl Binary files differindex 49ddd8ae2..b0dd947eb 100644 --- a/runtime/spell/en.utf-8.spl +++ b/runtime/spell/en.utf-8.spl diff --git a/runtime/spell/en.utf-8.sug b/runtime/spell/en.utf-8.sug Binary files differnew file mode 100644 index 000000000..62f59e531 --- /dev/null +++ b/runtime/spell/en.utf-8.sug diff --git a/runtime/syntax/eviews.vim b/runtime/syntax/eviews.vim new file mode 100644 index 000000000..911e1bedf --- /dev/null +++ b/runtime/syntax/eviews.vim @@ -0,0 +1,104 @@ +" Vim syntax file +" Language: Eviews (http://www.eviews.com) +" Maintainer: Vaidotas Zemlys <zemlys@gmail.com> +" Last Change: 2006 Jan 11 +" Filenames: *.prg +" URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/eviews.vim +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if version >= 600 + setlocal iskeyword=@,48-57,_,. +else + set iskeyword=@,48-57,_,. +endif + +syn case match + +" Comment +syn match eComment /\'.*/ + +" Constant +" string enclosed in double quotes +syn region eString start=/"/ skip=/\\\\\|\\"/ end=/"/ +" number with no fractional part or exponent +syn match eNumber /\d\+/ +" floating point number with integer and fractional parts and optional exponent +syn match eFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/ +" floating point number with no integer part and optional exponent +syn match eFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/ +" floating point number with no fractional part and optional exponent +syn match eFloat /\d\+[Ee][-+]\=\d\+/ + +" Identifier +" identifier with leading letter and optional following keyword characters +syn match eIdentifier /\a\k*/ + +" Eviews Programing Language +syn keyword eProgLang @date else endif @errorcount @evpath exitloop for if @isobject next poff pon return statusline step stop @temppath then @time to @toc wend while include call subroutine endsub and or + +" Eviews Objects, Views and Procedures +syn keyword eOVP alpha coef equation graph group link logl matrix model pool rowvector sample scalar series sspace sym system table text valmap var vector + + +" Standard Eviews Commands +syn keyword eStdCmd 3sls add addassign addinit addtext align alpha append arch archtest area arlm arma arroots auto axis bar bdstest binary block boxplot boxplotby bplabel cause ccopy cd cdfplot cellipse censored cfetch checkderivs chow clabel cleartext close coef coefcov coint comment control copy cor correl correlsq count cov create cross data datelabel dates db dbcopy dbcreate dbdelete dbopen dbpack dbrebuild dbrename dbrepair decomp define delete derivs describe displayname do draw driconvert drop dtable ec edftest endog eqs equation errbar exclude exit expand fetch fill fiml fit forecast freeze freq frml garch genr gmm grads graph group hconvert hfetch hilo hist hlabel hpf impulse jbera kdensity kerfit label laglen legend line linefit link linkto load logit logl ls makecoint makederivs makeendog makefilter makegarch makegrads makegraph makegroup makelimits makemodel makeregs makeresids makesignals makestates makestats makesystem map matrix means merge metafile ml model msg name nnfit open options ordered output override pageappend pagecontract pagecopy pagecreate pagedelete pageload pagerename pagesave pageselect pagestack pagestruct pageunstack param pcomp pie pool predict print probit program qqplot qstats range read rename representations resample reset residcor residcov resids results rls rndint rndseed rowvector run sample save scalar scale scat scatmat scenario seas seasplot series set setbpelem setcell setcolwidth setconvert setelem setfillcolor setfont setformat setheight setindent setjust setline setlines setmerge settextcolor setwidth sheet show signalgraphs smooth smpl solve solveopt sort spec spike sspace statby statefinal stategraphs stateinit stats statusline stomna store structure sur svar sym system table template testadd testbtw testby testdrop testexog testfit testlags teststat text tic toc trace tramoseats tsls unlink update updatecoefs uroot usage valmap var vars vector wald wfcreate wfopen wfsave wfselect white wls workfile write wtsls x11 x12 xy xyline xypair + +" Constant Identifier +syn match eConstant /\!\k*/ +" String Identifier +syn match eStringId /%\k*/ +" Command Identifier +syn match eCommand /@\k*/ + +" Special +syn match eDelimiter /[,;:]/ + +" Error +syn region eRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError +syn region eRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError +syn region eRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError +syn match eError /[)\]}]/ +syn match eBraceError /[)}]/ contained +syn match eCurlyError /[)\]]/ contained +syn match eParenError /[\]}]/ contained + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_r_syn_inits") + if version < 508 + let did_r_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + HiLink eComment Comment + HiLink eConstant Identifier + HiLink eStringId Identifier + HiLink eCommand Type + HiLink eString String + HiLink eNumber Number + HiLink eBoolean Boolean + HiLink eFloat Float + HiLink eConditional Conditional + HiLink eProgLang Statement + HiLink eOVP Statement + HiLink eStdCmd Statement + HiLink eIdentifier Normal + HiLink eDelimiter Delimiter + HiLink eError Error + HiLink eBraceError Error + HiLink eCurlyError Error + HiLink eParenError Error + delcommand HiLink +endif + +let b:current_syntax="eviews" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/gretl.vim b/runtime/syntax/gretl.vim new file mode 100644 index 000000000..9999ff0f4 --- /dev/null +++ b/runtime/syntax/gretl.vim @@ -0,0 +1,102 @@ +" Vim syntax file +" Language: gretl (http://gretl.sf.net) +" Maintainer: Vaidotas Zemlys <zemlys@gmail.com> +" Last Change: 2006 Jan 6 +" Filenames: *.inp *.gretl +" URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/gretl.vim +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if version >= 600 + setlocal iskeyword=@,48-57,_,. +else + set iskeyword=@,48-57,_,. +endif + +syn case match + +" Constant +" string enclosed in double quotes +syn region gString start=/"/ skip=/\\\\\|\\"/ end=/"/ +" number with no fractional part or exponent +syn match gNumber /\d\+/ +" floating point number with integer and fractional parts and optional exponent +syn match gFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/ +" floating point number with no integer part and optional exponent +syn match gFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/ +" floating point number with no fractional part and optional exponent +syn match gFloat /\d\+[Ee][-+]\=\d\+/ + +" Gretl commands +syn keyword gCommands add addobs addto adf append ar arch arma break boxplot chow coeffsum coint coint2 corc corr corrgm criteria critical cusum data delete diff else end endif endloop eqnprint equation estimate fcast fcasterr fit freq function funcerr garch genr gnuplot graph hausman hccm help hilu hsk hurst if import include info kpss label labels lad lags ldiff leverage lmtest logistic logit logs loop mahal meantest mle modeltab mpols multiply nls nulldata ols omit omitfrom open outfile panel pca pergm plot poisson pooled print printf probit pvalue pwe quit remember rename reset restrict rhodiff rmplot run runs scatters sdiff set setobs setmiss shell sim smpl spearman square store summary system tabprint testuhat tobit transpos tsls var varlist vartest vecm vif wls + +"Gretl genr functions +syn keyword gGenrFunc log exp sin cos tan atan diff ldiff sdiff mean sd min max sort int ln coeff abs rho sqrt sum nobs firstobs lastobs normal uniform stderr cum missing ok misszero corr vcv var sst cov median zeromiss pvalue critical obsnum mpow dnorm cnorm gamma lngamma resample hpfilt bkfilt fracdiff varnum isvector islist nelem + +" Identifier +" identifier with leading letter and optional following keyword characters +syn match gIdentifier /\a\k*/ + +" Variable with leading $ +syn match gVariable /\$\k*/ +" Arrow +syn match gArrow /<-/ + +" Special +syn match gDelimiter /[,;:]/ + +" Error +syn region gRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError,gBCstart,gBCend +syn region gRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError +syn region gRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError +syn match gError /[)\]}]/ +syn match gBraceError /[)}]/ contained +syn match gCurlyError /[)\]]/ contained +syn match gParenError /[\]}]/ contained + +" Comment +syn match gComment /#.*/ +syn match gBCstart /(\*/ +syn match gBCend /\*)/ + +syn region gBlockComment matchgroup=gCommentStart start="(\*" end="\*)" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_r_syn_inits") + if version < 508 + let did_r_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + HiLink gComment Comment + HiLink gCommentStart Comment + HiLink gBlockComment Comment + HiLink gString String + HiLink gNumber Number + HiLink gBoolean Boolean + HiLink gFloat Float + HiLink gCommands Repeat + HiLink gGenrFunc Type + HiLink gDelimiter Delimiter + HiLink gError Error + HiLink gBraceError Error + HiLink gCurlyError Error + HiLink gParenError Error + HiLink gIdentifier Normal + HiLink gVariable Identifier + HiLink gArrow Repeat + delcommand HiLink +endif + +let b:current_syntax="gretl" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/r.vim b/runtime/syntax/r.vim index c2ecca4ef..8432c208e 100644 --- a/runtime/syntax/r.vim +++ b/runtime/syntax/r.vim @@ -1,9 +1,13 @@ " Vim syntax file " Language: R (GNU S) -" Maintainer: Tom Payne <tom@tompayne.org> -" Last Change: 2003 May 11 -" Filenames: *.r -" URL: http://www.tompayne.org/vim/syntax/r.vim +" Maintainer: Vaidotas Zemlys <zemlys@gmail.com> +" Last Change: 2006 January 12 +" Filenames: *.R *.Rout *.r *.Rhistory *.Rt *.Rout.save *.Rout.fail +" URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/r.vim + +" First maintainer Tom Payne <tom@tompayne.org> +" Modified to make syntax less colourful and added the highlighting of +" R assignment arrow " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -54,9 +58,10 @@ syn keyword rConstant LETTERS letters month.ab month.name pi syn keyword rConstant NULL syn keyword rBoolean FALSE TRUE syn keyword rNumber NA +syn match rArrow /<\{1,2}-/ " Type -syn keyword rType array category character complex double function integer list logical matrix numeric vector +syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame " Special syn match rDelimiter /[,;:]/ @@ -89,8 +94,9 @@ if version >= 508 || !exists("did_r_syn_inits") HiLink rStatement Statement HiLink rConditional Conditional HiLink rRepeat Repeat - HiLink rIdentifier Identifier - HiLink rType Type + HiLink rIdentifier Normal + HiLink rArrow Statement + HiLink rType Type HiLink rDelimiter Delimiter HiLink rError Error HiLink rBraceError Error @@ -102,3 +108,4 @@ endif let b:current_syntax="r" " vim: ts=8 sw=2 + diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 52ca8ae1b..21715b7ba 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Vim 7.0 script " Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> -" Last Change: December 09, 2005 -" Version: 7.0-21 +" Last Change: Jan 09, 2006 +" Version: 7.0-22 " Automatically generated keyword lists: {{{1 " Quit when a syntax file was already loaded {{{2 @@ -175,7 +175,7 @@ endif syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentString syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString -syn region vimCommentString contained oneline start='\S\s\+"'ms=s+1 end='"' +syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"' " Environment Variables: {{{2 " ===================== @@ -422,7 +422,7 @@ syn match vimHiBang contained "!" skipwhite nextgroup=@vimHighlightCluster syn match vimHiGroup contained "\i\+" syn case ignore -syn keyword vimHiAttrib contained none bold inverse italic reverse standout underline +syn keyword vimHiAttrib contained none bold inverse italic reverse standout underline undercurl syn keyword vimFgBgAttrib contained none bg background fg foreground syn case match syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib @@ -450,7 +450,7 @@ syn match vimHiCTerm contained "\ccterm="he=e-1 nextgroup=vimHiAttribList syn match vimHiCtermFgBg contained "\ccterm[fb]g="he=e-1 nextgroup=vimNumber,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError syn match vimHiGui contained "\cgui="he=e-1 nextgroup=vimHiAttribList syn match vimHiGuiFont contained "\cfont="he=e-1 nextgroup=vimHiFontname -syn match vimHiGuiFgBg contained "\cgui[fb]g="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib +syn match vimHiGuiFgBg contained "\cgui\%([fb]g\|sp\)="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib syn match vimHiTermcap contained "\S\+" contains=vimNotation " Highlight: clear {{{2 |