summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-04-15 21:00:38 +0000
committerBram Moolenaar <Bram@vim.org>2005-04-15 21:00:38 +0000
commit402d2fea7025356c7abcb891017a1b7ddf99cbbf (patch)
tree83c5973b6316912331d4a4c070996d7888097e5c
parent4499d2ee58db42e4ec59bb2c2dbb5eeca2313e8b (diff)
downloadvim-git-402d2fea7025356c7abcb891017a1b7ddf99cbbf.tar.gz
updated for version 7.0066
-rw-r--r--runtime/compiler/ant.vim8
-rw-r--r--runtime/doc/Makefile40
-rw-r--r--runtime/doc/change.txt10
-rw-r--r--runtime/doc/debugger.txt36
-rw-r--r--runtime/doc/develop.txt30
-rw-r--r--runtime/doc/editing.txt29
-rw-r--r--runtime/doc/eval.txt42
-rw-r--r--runtime/doc/evim-fr.UTF-8.156
-rw-r--r--runtime/doc/fold.txt4
-rw-r--r--runtime/doc/gui.txt26
-rw-r--r--runtime/doc/gui_w16.txt30
-rw-r--r--runtime/doc/gui_w32.txt28
-rw-r--r--runtime/doc/gui_x11.txt4
-rw-r--r--runtime/doc/hangulin.txt24
-rw-r--r--runtime/doc/if_cscop.txt10
-rw-r--r--runtime/doc/if_ole.txt24
-rw-r--r--runtime/doc/if_perl.txt10
-rw-r--r--runtime/doc/if_pyth.txt46
-rw-r--r--runtime/doc/if_ruby.txt12
-rw-r--r--runtime/doc/if_sniff.txt8
-rw-r--r--runtime/doc/if_tcl.txt12
-rw-r--r--runtime/doc/indent.txt32
-rw-r--r--runtime/doc/index.txt4
-rw-r--r--runtime/doc/insert.txt10
-rw-r--r--runtime/doc/map.txt46
-rw-r--r--runtime/doc/mbyte.txt16
-rw-r--r--runtime/doc/motion.txt6
-rw-r--r--runtime/doc/netbeans.txt92
-rw-r--r--runtime/doc/options.txt15
-rw-r--r--runtime/doc/os_390.txt78
-rw-r--r--runtime/doc/os_beos.txt90
-rw-r--r--runtime/doc/os_mac.txt6
-rw-r--r--runtime/doc/os_mint.txt8
-rw-r--r--runtime/doc/os_msdos.txt32
-rw-r--r--runtime/doc/os_os2.txt26
-rw-r--r--runtime/doc/os_qnx.txt8
-rw-r--r--runtime/doc/os_risc.txt72
-rw-r--r--runtime/doc/os_vms.txt166
-rw-r--r--runtime/doc/pi_netrw.txt10
-rw-r--r--runtime/doc/print.txt6
-rw-r--r--runtime/doc/quickref.txt4
-rw-r--r--runtime/doc/rileft.txt4
-rw-r--r--runtime/doc/russian.txt14
-rw-r--r--runtime/doc/sign.txt16
-rw-r--r--runtime/doc/tags19
-rw-r--r--runtime/doc/tips.txt18
-rw-r--r--runtime/doc/usr_02.txt6
-rw-r--r--runtime/doc/usr_03.txt4
-rw-r--r--runtime/doc/usr_08.txt4
-rw-r--r--runtime/doc/usr_09.txt4
-rw-r--r--runtime/doc/usr_10.txt4
-rw-r--r--runtime/doc/usr_21.txt6
-rw-r--r--runtime/doc/usr_22.txt6
-rw-r--r--runtime/doc/usr_24.txt4
-rw-r--r--runtime/doc/usr_25.txt4
-rw-r--r--runtime/doc/usr_42.txt4
-rw-r--r--runtime/doc/usr_44.txt4
-rw-r--r--runtime/doc/version5.txt34
-rw-r--r--runtime/doc/version6.txt22
-rw-r--r--runtime/doc/vimdiff-fr.153
-rw-r--r--runtime/doc/vimdiff-fr.UTF-8.153
-rw-r--r--runtime/doc/vimdiff.man58
-rw-r--r--runtime/doc/vimtutor-fr.155
-rw-r--r--runtime/doc/vimtutor-fr.UTF-8.155
-rw-r--r--runtime/doc/visual.txt21
-rw-r--r--runtime/doc/xxd-fr.1395
-rw-r--r--runtime/spell/README.txt935
-rw-r--r--runtime/spell/en.utf-8.splbin0 -> 1196398 bytes
-rw-r--r--runtime/syntax/cs.vim4
-rw-r--r--runtime/syntax/objc.vim6
-rw-r--r--runtime/syntax/xml.vim8
-rw-r--r--src/Makefile25
-rw-r--r--src/charset.c23
-rw-r--r--src/ex_docmd.c20
-rw-r--r--src/fileio.c5
-rw-r--r--src/gui.c13
-rw-r--r--src/gui_kde_x11.cc12
-rw-r--r--src/gui_w32.c4
-rw-r--r--src/macros.h2
-rw-r--r--src/mbyte.c5
-rw-r--r--src/misc2.c3
-rw-r--r--src/normal.c25
-rw-r--r--src/os_unix.c2
-rw-r--r--src/quickfix.c9
-rw-r--r--src/regexp.c92
-rw-r--r--src/screen.c4
-rw-r--r--src/spell.c4025
-rw-r--r--src/tag.c8
-rw-r--r--src/version.h4
89 files changed, 6389 insertions, 928 deletions
diff --git a/runtime/compiler/ant.vim b/runtime/compiler/ant.vim
index 51cd93185..0605c69fa 100644
--- a/runtime/compiler/ant.vim
+++ b/runtime/compiler/ant.vim
@@ -1,7 +1,7 @@
" Vim Compiler File
" Compiler: ant
" Maintainer: Johannes Zellner <johannes@zellner.org>
-" Last Change: Tue, 27 Apr 2004 15:01:45 CEST
+" Last Change: Mi, 13 Apr 2005 22:50:07 CEST
if exists("current_compiler")
finish
@@ -21,15 +21,15 @@ CompilerSet makeprg=ant
" ant with jikes +E, which assumes the following
" two property lines in your 'build.xml':
"
-" <property name = "build.compiler" value = "jikes"/>
-" <property name = "build.compiler.emacs" value = "true"/>
+" <property name = "build.compiler" value = "jikes"/>
+" <property name = "build.compiler.emacs" value = "true"/>
"
" second line:
" ant with javac
"
" note that this will work also for tasks like [wtkbuild]
"
-setlocal errorformat=\ %#[%.%#]\ %#%f:%l:%v:%*\\d:%*\\d:\ %t%[%^:]%#:%m,
+CompilerSet errorformat=\ %#[%.%#]\ %#%f:%l:%v:%*\\d:%*\\d:\ %t%[%^:]%#:%m,
\%A\ %#[%.%#]\ %f:%l:\ %m,%-Z\ %#[%.%#]\ %p^,%C\ %#[%.%#]\ %#%m
" ,%-C%.%#
diff --git a/runtime/doc/Makefile b/runtime/doc/Makefile
index 1c2959de5..3aef1ca97 100644
--- a/runtime/doc/Makefile
+++ b/runtime/doc/Makefile
@@ -257,6 +257,11 @@ HTMLS = \
workshop.html
CONVERTED = \
+ vim-fr.UTF-8.1 \
+ evim-fr.UTF-8.1 \
+ vimdiff-fr.UTF-8.1 \
+ vimtutor-fr.UTF-8.1 \
+ xxd-fr.UTF-8.1 \
vim-it.UTF-8.1 \
evim-it.UTF-8.1 \
vimdiff-it.UTF-8.1 \
@@ -380,32 +385,47 @@ os_risc.txt:
os_win32.txt:
touch os_win32.txt
+vim-fr.UTF-8.1: vim-fr.1
+ iconv -f latin1 -t utf-8 $< >$@
+
+evim-fr.UTF-8.1: evim-fr.1
+ iconv -f latin1 -t utf-8 $< >$@
+
+vimdiff-fr.UTF-8.1: vimdiff-fr.1
+ iconv -f latin1 -t utf-8 $< >$@
+
+vimtutor-fr.UTF-8.1: vimtutor-fr.1
+ iconv -f latin1 -t utf-8 $< >$@
+
+xxd-fr.UTF-8.1: xxd-fr.1
+ iconv -f latin1 -t utf-8 $< >$@
+
vim-it.UTF-8.1: vim-it.1
- iconv -f latin1 -t utf-8 $> >$@
+ iconv -f latin1 -t utf-8 $< >$@
evim-it.UTF-8.1: evim-it.1
- iconv -f latin1 -t utf-8 $> >$@
+ iconv -f latin1 -t utf-8 $< >$@
vimdiff-it.UTF-8.1: vimdiff-it.1
- iconv -f latin1 -t utf-8 $> >$@
+ iconv -f latin1 -t utf-8 $< >$@
vimtutor-it.UTF-8.1: vimtutor-it.1
- iconv -f latin1 -t utf-8 $> >$@
+ iconv -f latin1 -t utf-8 $< >$@
xxd-it.UTF-8.1: xxd-it.1
- iconv -f latin1 -t utf-8 $> >$@
+ iconv -f latin1 -t utf-8 $< >$@
vim-ru.UTF-8.1: vim-ru.1
- iconv -f KOI8-R -t utf-8 $> >$@
+ iconv -f KOI8-R -t utf-8 $< >$@
evim-ru.UTF-8.1: evim-ru.1
- iconv -f KOI8-R -t utf-8 $> >$@
+ iconv -f KOI8-R -t utf-8 $< >$@
vimdiff-ru.UTF-8.1: vimdiff-ru.1
- iconv -f KOI8-R -t utf-8 $> >$@
+ iconv -f KOI8-R -t utf-8 $< >$@
vimtutor-ru.UTF-8.1: vimtutor-ru.1
- iconv -f KOI8-R -t utf-8 $> >$@
+ iconv -f KOI8-R -t utf-8 $< >$@
xxd-ru.UTF-8.1: xxd-ru.1
- iconv -f KOI8-R -t utf-8 $> >$@
+ iconv -f KOI8-R -t utf-8 $< >$@
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index 7a58cd88c..c507ccd4a 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -1,4 +1,4 @@
-*change.txt* For Vim version 7.0aa. Last change: 2005 Mar 16
+*change.txt* For Vim version 7.0aa. Last change: 2005 Apr 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -915,6 +915,8 @@ inside of strings can change! Also see 'softtabstop' option. >
current line). This always works |linewise|, thus
this command can be used to put a yanked block as new
lines.
+ The cursor is left on the first non-blank in the last
+ new line.
The register can also be '=' followed by an optional
expression. The expression continues until the end of
the command. You need to escape the '|' and '"'
@@ -964,9 +966,9 @@ When using a put command like |p| or |P| in Visual mode, Vim will try to
replace the selected text with the contents of the register. Whether this
works well depends on the type of selection and the type of the text in the
register. With blockwise selection it also depends on the size of the block
-and whether the corners are on an existing character. (implementation detail:
+and whether the corners are on an existing character. (Implementation detail:
it actually works by first putting the register after the selection and then
-deleting the selection).
+deleting the selection.)
*blockwise-register*
If you use a blockwise Visual mode command to get the text into the register,
@@ -1417,7 +1419,7 @@ If the 'comments' option includes "/*", "*" and/or "*/", then Vim has some
built in stuff to treat these types of comments a bit more cleverly.
Opening a new line before or after "/*" or "*/" (with 'r' or 'o' present in
'formatoptions') gives the correct start of the line automatically. The same
-happens with formatting and auto-wrapping. Opening a line after a line
+happens with formatting and auto-wrapping. Opening a line after a line
starting with "/*" or "*" and containing "*/", will cause no comment leader to
be inserted, and the indent of the new line is taken from the line containing
the start of the comment.
diff --git a/runtime/doc/debugger.txt b/runtime/doc/debugger.txt
index 4e4f1c06a..566b83a84 100644
--- a/runtime/doc/debugger.txt
+++ b/runtime/doc/debugger.txt
@@ -1,4 +1,4 @@
-*debugger.txt* For Vim version 7.0aa. Last change: 2005 Mar 07
+*debugger.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Gordon Prieur
@@ -27,19 +27,19 @@ Environment (IDE):
These features were added specifically for use in the Motif version of gvim.
However, the |alt-input| and |debug-highlight| were written to be usable in
-both vim and gvim. Some of the other features could be used in the non-GUI
-vim with slight modifications. However, I did not do this nor did I test the
+both vim and gvim. Some of the other features could be used in the non-GUI
+vim with slight modifications. However, I did not do this nor did I test the
reliability of building for vim or non Motif GUI versions.
1.1 Alternate Command Input *alt-input*
For Vim to work with a debugger there must be at least an input connection
-with a debugger or external tool. In many cases there will also be an output
+with a debugger or external tool. In many cases there will also be an output
connection but this isn't absolutely necessary.
The purpose of the input connection is to let the external debugger send
-commands to Vim. The commands sent by the debugger should give the debugger
+commands to Vim. The commands sent by the debugger should give the debugger
enough control to display the current debug environment and state.
The current implementation is based on the X Toolkit dispatch loop and the
@@ -49,15 +49,15 @@ XtAddInput() function call.
1.2 Debug Signs *debug-signs*
Many debuggers mark specific lines by placing a small sign or color highlight
-on the line. The |:sign| command lets the debugger set this graphic mark. Some
+on the line. The |:sign| command lets the debugger set this graphic mark. Some
examples where this feature would be used would be a debugger showing an arrow
-representing the Program Counter (PC) of the program being debugged. Another
-example would be a small stop sign for a line with a breakpoint. These visible
+representing the Program Counter (PC) of the program being debugged. Another
+example would be a small stop sign for a line with a breakpoint. These visible
highlights let the user keep track of certain parts of the state of the
debugger.
-This feature can be used with more than debuggers, too. An IPE can use a sign
-to highlight build errors, searched text, or other things. The sign feature
+This feature can be used with more than debuggers, too. An IPE can use a sign
+to highlight build errors, searched text, or other things. The sign feature
can also work together with the |debug-highlight| to ensure the mark is
highly visible.
@@ -66,17 +66,17 @@ Debug signs are defined and placed using the |:sign| command.
1.3 Debug Source Highlight *debug-highlight*
-This feature allows a line to have a predominant highlight. The highlight is
-intended to make a specific line stand out. The highlight could be made to
+This feature allows a line to have a predominant highlight. The highlight is
+intended to make a specific line stand out. The highlight could be made to
work for both vim and gvim, whereas the debug sign is, in most cases, limited
-to gvim. The one exception to this is Sun Microsystem's dtterm. The dtterm
+to gvim. The one exception to this is Sun Microsystem's dtterm. The dtterm
from Sun has a "sign gutter" for showing signs.
1.4 Message Footer *gui-footer*
-The message footer can be used to display messages from a debugger or IPE. It
-can also be used to display menu and toolbar tips. The footer area is at the
+The message footer can be used to display messages from a debugger or IPE. It
+can also be used to display menu and toolbar tips. The footer area is at the
bottom of the GUI window, below the line used to display colon commands.
The display of the footer is controlled by the 'guioptions' letter 'F'.
@@ -85,7 +85,7 @@ The display of the footer is controlled by the 'guioptions' letter 'F'.
1.5 Balloon Evaluation *balloon-eval*
This feature allows a debugger, or other external tool, to display dynamic
-information based on where the mouse is pointing. The purpose of this feature
+information based on where the mouse is pointing. The purpose of this feature
was to allow Sun's Visual WorkShop debugger to display expression evaluations.
However, the feature was implemented in as general a manner as possible and
could be used for displaying other information as well.
@@ -111,7 +111,7 @@ completely user definable.
2. Vim Compile Options *debugger-compilation*
The debugger features were added explicitly for use with Sun's Visual
-WorkShop Integrated Programming Environment (ipe). However, they were done
+WorkShop Integrated Programming Environment (ipe). However, they were done
in as generic a manner as possible so that integration with other debuggers
could also use some or all of the tools used with Sun's ipe.
@@ -123,7 +123,7 @@ The following compile time preprocessor variables control the features:
Message Footer FEAT_FOOTER
Balloon Evaluation FEAT_BEVAL
-The first integration with a full IPE/IDE was with Sun Visual WorkShop. To
+The first integration with a full IPE/IDE was with Sun Visual WorkShop. To
compile a gvim which interfaces with VWS set the following flag, which sets
all the above flags:
diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt
index 6e4f4e35a..bc8b0e8c0 100644
--- a/runtime/doc/develop.txt
+++ b/runtime/doc/develop.txt
@@ -1,4 +1,4 @@
-*develop.txt* For Vim version 7.0aa. Last change: 2004 Jan 17
+*develop.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -366,7 +366,33 @@ window View on a buffer. There can be several windows in Vim,
fit in the shell.
-To be continued...
+Spell checking *develop-spell*
+
+When spell checking was going to be added to Vim a survey was done over the
+available spell checking libraries and programs. Unfortunately, the result
+was that none of them provided sufficient capabilities to be used as the spell
+checking engine in Vim, for various reasons:
+
+- Missing support for multi-byte encodings. At least UTF-8 must be supported,
+ so that more than one language can be used in the same file.
+- For the programs and libraries: Using them as-is would require installing
+ them separately from Vim. That's 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.
+- For a 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 will become a problem
+ (lots of process switching involved).
+- Missing support for words with non-word characters, such as "Etten-Leur" and
+ "et al.", would require marking the pieces of them OK, lowering the
+ reliability.
+- Missing support for regions or dialects. Makes it difficult to accept
+ all English words and highlight non-Canadian words differently.
+- Missing support for rare words. Many words are correct but hardly ever used
+ and could be a misspelled often-used word.
+
==============================================================================
4. Assumptions *design-assumptions*
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt
index 3fb4e54de..8ae870a5a 100644
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -1,4 +1,4 @@
-*editing.txt* For Vim version 7.0aa. Last change: 2005 Feb 14
+*editing.txt* For Vim version 7.0aa. Last change: 2005 Apr 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -46,7 +46,7 @@ However, the alternate file name is not changed when |:keepalt| is used.
name. {not in Vi}
All file names are remembered in the buffer list. When you enter a file name,
-for editing (e.g., with ":e filename") or writing (e.g., with ":w file name"),
+for editing (e.g., with ":e filename") or writing (e.g., with ":w filename"),
the file name is added to the list. You can use the buffer list to remember
which files you edited and to quickly switch from one file to another (e.g.,
to copy text) with the |CTRL-^| command. First type the number of the file
@@ -57,7 +57,7 @@ CTRL-G or *CTRL-G* *:f* *:fi* *:file*
:f[ile] Prints the current file name (as typed), the
cursor position (unless the 'ruler' option is set),
and the file status (readonly, modified, read errors,
- new file). See the 'shortmess' option about how tho
+ new file). See the 'shortmess' option about how to
make this message shorter. {Vi does not include
column number}
@@ -910,8 +910,8 @@ if the system allows it (the directory must be writable).
*write-fail*
If the writing of the new file fails, you have to be careful not to lose
your changes AND the original file. If there is no backup file and writing
-the new file failed, you have already lost the original file! DON'T EXIT VIM
-UNTIL YOU WRITE OUT THE FILE! If a backup was made, it is put back in place
+the new file failed, you have already lost the original file! DON'T EXIT VIM
+UNTIL YOU WRITE OUT THE FILE! If a backup was made, it is put back in place
of the original file (if possible). If you exit Vim, and lose the changes
you made, the original file will mostly still be there. If putting back the
original file fails, there will be an error message telling you that you
@@ -1391,6 +1391,11 @@ It is also possible that you modified the file yourself, from another edit
session or with another command (e.g., a filter command). Then you will know
which version of the file you want to keep.
+There is one situation where you get the message while there is nothing wrong:
+On a Win32 system on the day daylight saving time starts. There is something
+in the Win32 libraries that confuses Vim about the hour time difference. The
+problem goes away the next day.
+
==============================================================================
11. File Searching *file-searching*
@@ -1401,7 +1406,7 @@ options. There are three different types of searching:
1) Downward search:
Downward search uses the wildcards '*', '**' and possibly others
- supported by your operating system. '*' and '**' are handled inside Vim, so
+ supported by your operating system. '*' and '**' are handled inside Vim, so
they work on all operating systems.
The usage of '*' is quite simple: It matches 0 or more characters.
@@ -1435,10 +1440,10 @@ options. There are three different types of searching:
2) Upward search:
Here you can give a directory and then search the directory tree upward for
- a file. You could give stop-directories to limit the upward search. The
+ a file. You could give stop-directories to limit the upward search. The
stop-directories are appended to the path (for the 'path' option) or to
- the filename (for the 'tags' option) with a ';'. If you want several
- stop-directories separate them with ';'. If you want no stop-directory
+ the filename (for the 'tags' option) with a ';'. If you want several
+ stop-directories separate them with ';'. If you want no stop-directory
("search upward till the root directory) just use ';'. >
/usr/include/sys;/usr
< will search in: >
@@ -1457,7 +1462,7 @@ options. There are three different types of searching:
/u/user_x/work/include
/u/user_x/include
-3) Combined up/downward search
+3) Combined up/downward search:
If Vim's current path is /u/user_x/work/release and you do >
set path=**;/u/user_x
< and then search for a file with |gf| the file is searched in: >
@@ -1465,10 +1470,10 @@ options. There are three different types of searching:
/u/user_x/work/**
/u/user_x/**
<
- BE CAREFUL! This might consume a lot of time, as the search of
+ BE CAREFUL! This might consume a lot of time, as the search of
'/u/user_x/**' includes '/u/user_x/work/**' and
'/u/user_x/work/release/**'. So '/u/user_x/work/release/**' is searched
- three and '/u/user_x/work/**' is searched two times.
+ three times and '/u/user_x/work/**' is searched twice.
In the above example you might want to set path to: >
:set path=**,/u/user_x/**
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index dc260b9f0..a0e446fcb 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 Mar 26
+*eval.txt* For Vim version 7.0aa. Last change: 2005 Apr 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1412,7 +1412,7 @@ v:warningmsg Last given warning message. It's allowed to set this variable.
See |function-list| for a list grouped by what the function is used for.
-(Use CTRL-] on the function name to jump to the full explanation)
+(Use CTRL-] on the function name to jump to the full explanation.)
USAGE RESULT DESCRIPTION ~
@@ -1620,7 +1620,7 @@ writefile({list}, {fname} [, {binary}])
add({list}, {expr}) *add()*
Append the item {expr} to List {list}. Returns the resulting
- List. Examples: >
+ List. Examples: >
:let alist = add([1, 2, 3], item)
:call add(mylist, "woodstock")
< Note that when {expr} is a List it is appended as a single
@@ -1809,6 +1809,7 @@ char2nr({expr}) *char2nr()*
< The current 'encoding' is used. Example for "utf-8": >
char2nr("á") returns 225
char2nr("á"[0]) returns 195
+< nr2char() does the opposite.
cindent({lnum}) *cindent()*
Get the amount of indent for line {lnum} according the C
@@ -2551,10 +2552,10 @@ getqflist() *getqflist()*
getreg([{regname}]) *getreg()*
The result is a String, which is the contents of register
- {regname}. Example: >
+ {regname}. Example: >
:let cliptext = getreg('*')
< getreg('=') returns the last evaluated value of the expression
- register. (For use in maps).
+ register. (For use in maps.)
If {regname} is not specified, |v:register| is used.
@@ -2677,7 +2678,7 @@ histadd({history}, {item}) *histadd()*
< This function is not available in the |sandbox|.
histdel({history} [, {item}]) *histdel()*
- Clear {history}, ie. delete all its entries. See |hist-names|
+ Clear {history}, i.e. delete all its entries. See |hist-names|
for the possible values of {history}.
If the parameter {item} is given as String, this is seen
@@ -2753,7 +2754,7 @@ hlID({name}) The result is a Number, which is the ID of the highlight group
hostname() *hostname()*
The result is a String, which is the name of the machine on
- which Vim is currently running. Machine names greater than
+ which Vim is currently running. Machine names greater than
256 characters long are truncated.
iconv({expr}, {from}, {to}) *iconv()*
@@ -2873,7 +2874,7 @@ insert({list}, {item} [, {idx}]) *insert()*
{idx}. If {idx} is zero it goes before the first item, just
like omitting {idx}. A negative {idx} is also possible, see
|list-index|. -1 inserts just before the last item.
- Returns the resulting List. Examples: >
+ Returns the resulting List. Examples: >
:let mylist = insert([2, 3, 5], 1)
:call insert(mylist, 4, -1)
:call insert(mylist, 6, len(mylist))
@@ -3131,7 +3132,7 @@ match({expr}, {pat}[, {start}[, {count}]]) *match()*
If {start} is given, the search starts from byte index
{start} in a String or item {start} in a List.
The result, however, is still the index counted from the
- first character/item. Example: >
+ first character/item. Example: >
:echo match("testing", "ing", 2)
< result is again "4". >
:echo match("testing", "ing", 4)
@@ -3405,7 +3406,7 @@ repeat({expr}, {count}) *repeat()*
:let seperator = repeat('-', 80)
< When {count} is zero or negative the result is empty.
When {expr} is a List the result is {expr} concatenated
- {count} times. Example: >
+ {count} times. Example: >
:let longlist = repeat(['a', 'b'], 3)
< Results in ['a', 'b', 'a', 'b', 'a', 'b'].
@@ -3544,7 +3545,7 @@ server2client( {clientid}, {string}) *server2client()*
{only available when compiled with the |+clientserver| feature}
Note:
This id has to be stored before the next command can be
- received. Ie. before returning from the received command and
+ received. I.e. before returning from the received command and
before calling any commands that waits for input.
See also |clientserver|.
Example: >
@@ -3587,9 +3588,10 @@ setcmdpos({pos}) *setcmdpos()*
line.
setline({lnum}, {line}) *setline()*
- Set line {lnum} of the current buffer to {line}. If this
- succeeds, 0 is returned. If this fails (most likely because
- {lnum} is invalid) 1 is returned. Example: >
+ Set line {lnum} of the current buffer to {line}.
+ {lnum} is used like with |getline()|.
+ If this succeeds, 0 is returned. If this fails (most likely
+ because {lnum} is invalid) 1 is returned. Example: >
:call setline(5, strftime("%c"))
< Note: The '[ and '] marks are not set.
@@ -3715,7 +3717,9 @@ split({expr} [, {pattern}]) *split()*
:let words = split(getline('.'), '\W\+')
< Since empty strings are not added the "\+" isn't required but
it makes the function work a bit faster.
- The opposite function is |join()|.
+ To split a string in individual characters: >
+ :for c in split(mystring, '\zs')
+< The opposite function is |join()|.
strftime({format} [, {time}]) *strftime()*
@@ -3806,7 +3810,7 @@ strridx({haystack}, {needle} [, {start}]) *strridx()*
For pattern searches use |match()|.
-1 is returned if the {needle} does not occur in {haystack}.
If the {needle} is empty the length of {haystack} is returned.
- See also |stridx()|. Examples: >
+ See also |stridx()|. Examples: >
:echo strridx("an angry armadillo", "an") 3
< *strrchr()*
When used with a single character it works similar to the C
@@ -3940,7 +3944,7 @@ taglist({expr}) *taglist()*
defined.
cmd Ex command used to locate the tag in
the file.
- kind type of the tag. The value for this
+ kind type of the tag. The value for this
entry depends on the language specific
kind values generated by the ctags
tool.
@@ -4068,7 +4072,7 @@ visualmode([expr]) *visualmode()*
*winbufnr()*
winbufnr({nr}) The result is a Number, which is the number of the buffer
- associated with window {nr}. When {nr} is zero, the number of
+ associated with window {nr}. When {nr} is zero, the number of
the buffer in the current window is returned. When window
{nr} doesn't exist, -1 is returned.
Example: >
@@ -4657,7 +4661,7 @@ You can use multiple brace pairs: >
where "end_of_word" is either "verb" or "jective".
However, the expression inside the braces must evaluate to a valid single
-variable name. e.g. this is invalid: >
+variable name, e.g. this is invalid: >
:let foo='a + b'
:echo c{foo}d
.. since the result of expansion is "ca + bd", which is not a variable name.
diff --git a/runtime/doc/evim-fr.UTF-8.1 b/runtime/doc/evim-fr.UTF-8.1
new file mode 100644
index 000000000..95941610e
--- /dev/null
+++ b/runtime/doc/evim-fr.UTF-8.1
@@ -0,0 +1,56 @@
+.TH EVIM 1 "16 février 2002 February 16"
+.SH NAME
+evim \- « Easy Vim », édite un fichier avec Vim sans utiliser les modes
+.SH SYNOPSIS
+.br
+.B evim
+[options] [fichier ...]
+.br
+.B eview
+.SH DESCRIPTION
+.B eVim
+lance
+.B Vim
+et configure ses options afin qu'il se comporte comme un éditeur sans mode.
+Cela reste Vim, mais vous pouvez l'utiliser comme un éditeur « cliquer-taper ».
+Cela ressemble beaucoup à l'édition avec Notepad sur MS-Windows.
+.B eVim
+ne fonctionne qu'avec l'interface graphique, qui est nécessaire pour permettre
+l'utilisation des menus et de la barre d'outils.
+.PP
+Il n'est utile qu'aux personnes qui ne parviennent vraiment pas à utiliser Vim
+de façon traditionnelle. L'édition est alors bien moins efficace.
+.PP
+.B eview
+fait la même chose, mais démarre Vim en mode Lecture-seule.
+Cela revient à lancer evim \-R.
+.PP
+Voir vim(1) pour davantage d'informations sur Vim, les options, etc.
+.PP
+L'option 'insertmode' est activée pour permettre de taper directement du texte.
+.br
+Les mappages sont configurés pour que Copier et Coller fonctionnent avec les
+raccourcis habituels de MS-Windows. CTRL-X coupe le texte, CTRL-C copie le
+texte et CTRL-V colle le texte.
+Vous pouvez utiliser CTRL-Q pour obtenir la fonction originale de CTRL-V.
+.SH OPTIONS
+Voir vim(1).
+.SH FICHIERS
+.TP 15
+/usr/local/lib/vim/evim.vim
+Le script chargé pour initialiser eVim.
+.SH AUSSI CONNU SOUS
+Également connu sous le nom « Vim pour gumbies » [N.D.T. : Flying Circus...].
+Quand vous utilisez eVim, vous êtes censé prendre un mouchoir de poche,
+faire un noeud à chaque coin et le porter sur votre tête.
+.SH VOIR AUSSI
+vim(1)
+.SH AUTEUR
+La majeure partie de
+.B Vim
+a été écrite par Bram Moolenaar, avec l'aide de nombreux autres contributeurs.
+Voir le menu Aide/Remerciements ou ":help credits" dans
+.B Vim.
+.SH TRADUCTION
+Cette page de manuel a été traduite David Blanchet.
+<david.blanchet@free.fr> 2005-03-26.
diff --git a/runtime/doc/fold.txt b/runtime/doc/fold.txt
index 2aadd766d..d80a1022f 100644
--- a/runtime/doc/fold.txt
+++ b/runtime/doc/fold.txt
@@ -1,4 +1,4 @@
-*fold.txt* For Vim version 7.0aa. Last change: 2004 Dec 29
+*fold.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -330,7 +330,7 @@ zC Close all folds under the cursor recursively. Folds that
'foldenable' will be set.
*za*
-za When on a closed fold: open it. When folds are nested, you
+za When on a closed fold: open it. When folds are nested, you
may have to use "za" several times. When a count is given,
that many closed folds are opened.
When on an open fold: close it and set 'foldenable'. This
diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt
index 2b6a2a543..35936d058 100644
--- a/runtime/doc/gui.txt
+++ b/runtime/doc/gui.txt
@@ -1,4 +1,4 @@
-*gui.txt* For Vim version 7.0aa. Last change: 2005 Jan 14
+*gui.txt* For Vim version 7.0aa. Last change: 2005 Apr 11
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -184,7 +184,7 @@ When the scrollbar is dragged all the way down, the last line of the file
will appear in the top of the window.
If a window is shrunk to zero height (by the growth of another window) its
-scrollbar disappears. It reappears when the window is restored.
+scrollbar disappears. It reappears when the window is restored.
If a window is vertically split, it will get a scrollbar when it is the
current window and when, taking the middle of the current window and drawing a
@@ -408,7 +408,7 @@ used - you should read whichever of these is appropriate now).
*clipboard*
There is a special register for storing this selection, it is the "*
register. Nothing is put in here unless the information about what text is
-selected is about to change (eg with a left mouse click somewhere), or when
+selected is about to change (e.g. with a left mouse click somewhere), or when
another application wants to paste the selected text. Then the text is put
in the "* register. For example, to cut a line and make it the current
selection/put it on the clipboard: >
@@ -504,7 +504,7 @@ floating menus that do not appear on the main menu bar.
*E328* *E329* *E337*
To create a new menu item, use the ":menu" commands. They are mostly like
the ":map" set of commands but the first argument is a menu item name, given
-as a path of menus and submenus with a '.' between them. eg: >
+as a path of menus and submenus with a '.' between them, e.g.: >
:menu File.Save :w<CR>
:inoremenu File.Save <C-O>:w<CR>
@@ -648,9 +648,9 @@ simple.
*gui-toolbar*
The toolbar is currently available in the Win32, Athena, Motif, GTK+ (X11),
-KDE and Photon GUI. It should turn up in other GUIs in due course. The default
-toolbar is setup in menu.vim.
-The display of the toolbar is controlled by the 'guioptions' letter 'T'. You
+KDE and Photon GUI. It should turn up in other GUIs in due course. The
+default toolbar is setup in menu.vim.
+The display of the toolbar is controlled by the 'guioptions' letter 'T'. You
can thus have menu & toolbar together, or either on its own, or neither.
The appearance is controlled by the 'toolbar' option. You can chose between
an image, text or both.
@@ -661,7 +661,7 @@ level. Vim interprets the items in this menu as follows:
1) If an "icon=" argument was specified, the file with this name is used.
The file can either be specified with the full path or with the base name.
In the last case it is searched for in the "bitmaps" directory in
- 'runtimepath', like in point 3). Examples: >
+ 'runtimepath', like in point 3. Examples: >
:amenu icon=/usr/local/pixmaps/foo_icon.xpm ToolBar.Foo :echo "Foo"<CR>
:amenu icon=FooIcon ToolBar.Foo :echo "Foo"<CR>
< Note that in the first case the extension is included, while in the second
@@ -671,7 +671,7 @@ level. Vim interprets the items in this menu as follows:
A menu priority must come _after_ the icon argument: >
:amenu icon=foo 1.42 ToolBar.Foo :echo "42!"<CR>
2) An item called 'BuiltIn##', where ## is a number, is taken as number ## of
- the built-in bitmaps available in Vim. Currently there are 31 numbered
+ the built-in bitmaps available in Vim. Currently there are 31 numbered
from 0 to 30 which cover most common editing operations |builtin-tools|. >
:amenu ToolBar.BuiltIn22 :call SearchNext("back")<CR>
3) An item with another name is first searched for in the directory
@@ -747,7 +747,7 @@ To see what an existing menu is mapped to, use just one argument after the
menu commands (just like you would with the ":map" commands). If the menu
specified is a submenu, then all menus under that hierarchy will be shown.
If no argument is given after :menu at all, then ALL menu items are shown
-for the appropriate mode (eg, Command-line mode for :cmenu).
+for the appropriate mode (e.g., Command-line mode for :cmenu).
Special characters in the list, just before the rhs:
* The menu was defined with "nore" to disallow remapping.
@@ -856,7 +856,7 @@ See section |42.4| in the user manual.
When a tip is defined for a menu item, it appears in the command-line area
when the mouse is over that item, much like a standard Windows menu hint in
-the status bar. (Except when Vim is in Command-line mode, when of course
+the status bar. (Except when Vim is in Command-line mode, when of course
nothing is displayed.)
When a tip is defined for a ToolBar item, it appears as a tooltip when the
mouse pauses over that button, in the usual fashion. Use the |hl-Tooltip|
@@ -870,7 +870,7 @@ The tip is defined like this: >
And delete it with: >
:tunmenu MyMenu.Hello
-Tooltips are currently only supported for the X11 and Win32 GUI. However, they
+Tooltips are currently only supported for the X11 and Win32 GUI. However, they
should appear for the other gui platforms in the not too distant future.
The ":tmenu" command works just like other menu commands, it uses the same
@@ -920,7 +920,7 @@ This section describes other features which are related to the GUI.
get "<Modifiers-Key>".
- In the GUI, the modifiers SHIFT, CTRL, and ALT (or META) may be used within
- mappings of special keys and mouse events. eg: :map <M-LeftDrag> <LeftDrag>
+ mappings of special keys and mouse events. E.g.: :map <M-LeftDrag> <LeftDrag>
- In the GUI, several normal keys may have modifiers in mappings etc, these
are <Space>, <Tab>, <NL>, <CR>, <Esc>.
diff --git a/runtime/doc/gui_w16.txt b/runtime/doc/gui_w16.txt
index 5055afec6..605e77ec8 100644
--- a/runtime/doc/gui_w16.txt
+++ b/runtime/doc/gui_w16.txt
@@ -1,4 +1,4 @@
-*gui_w16.txt* For Vim version 7.0aa. Last change: 2001 Sep 03
+*gui_w16.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -21,32 +21,32 @@ Other relevant documentation:
{Vi does not have a Windows GUI}
-The Win16 version of Vim will run on Windows 3.1 or later. It has not been
+The Win16 version of Vim will run on Windows 3.1 or later. It has not been
tested on 3.0, it probably won't work without being recompiled and
-modified. (but you really should upgrade to 3.11 anyway. :)
+modified. (But you really should upgrade to 3.11 anyway. :)
In most respects it behaves identically to the Win32 GUI version, including
-having a flat-style toolbar(!). The chief differences:
+having a flat-style toolbar(!). The chief differences:
1) Bold/Italic text is not available, to speed up repaint/reduce resource
- usage. (You can re-instate this by undefining MSWIN16_FASTTEXT.)
+ usage. (You can re-instate this by undefining MSWIN16_FASTTEXT.)
2) No tearoff menu emulation.
3) No OLE interface.
-4) No long filename support (of course)
+4) No long filename support (of course).
5) No tooltips on toolbar buttons - instead they produce command-line tips
like menu items do.
-6) Line length limited to 32767 characters (like 16-bit DOS version)
+6) Line length limited to 32767 characters (like 16-bit DOS version).
==============================================================================
1. Starting the GUI *win16-start*
The Win16 GUI version of Vim will always start the GUI, no matter how you
-start it or what it's called. There is no 'console' version as such, but you
+start it or what it's called. There is no 'console' version as such, but you
can use one of the DOS versions in a DOS box.
The Win16 GUI has an extra menu item: "Window/Select Font". It brings up the
-standard Windows font selector. Note that bold and italic fonts are not
+standard Windows font selector. Note that bold and italic fonts are not
supported in an attempt to maximize GDI drawing speed.
Setting the menu height doesn't work for the Win16 GUI.
@@ -82,7 +82,7 @@ The clipboard works in the same way as the Win32 version: see |gui-clipboard|.
4. Shell Commands *win16-shell*
Vim spawns a DOS window for external commands, to make it possible to run any
-DOS command. The window uses the _default.pif settings.
+DOS command. The window uses the _default.pif settings.
*win16-!start*
Normally, Vim waits for a command to complete before continuing (this makes
@@ -135,7 +135,7 @@ as the traditional interface shared with the console version.
6.1 Dialogs
The dialogs displayed by the "confirm" family (i.e. the 'confirm' option,
-|:confirm| command and |confirm()| function are GUI-based rather than the
+|:confirm| command and |confirm()| function) are GUI-based rather than the
console-based ones used by other versions. There is no option to change this.
@@ -157,7 +157,7 @@ PrintFile. See $VIMRUNTIME/menu.vim for how it works by default.
Using this should also work: >
:w >>prn
-Vim supports a number of standard MS Windows features. Some of these are
+Vim supports a number of standard MS Windows features. Some of these are
detailed elsewhere: see |'mouse'|, |win32-hidden-menus|.
Also see |:simalt|
@@ -176,11 +176,11 @@ names with any Ex command.
*win16-truetype*
It is recommended that you use a raster font and not a TrueType
-fixed-pitch font. e.g. Use Courier, not Courier New. This is not just
+fixed-pitch font. E.g. use Courier, not Courier New. This is not just
to use less resources but because there are subtle bugs in the
-handling of fixed-pitch TrueType in Win3.1x. In particular, when you move
+handling of fixed-pitch TrueType in Win3.1x. In particular, when you move
a block cursor over a pipe character '|', the cursor is drawn in the wrong
-size and bits get left behind. This is a bug in the Win3.1x GDI, it doesn't
+size and bits get left behind. This is a bug in the Win3.1x GDI, it doesn't
happen if you run the exe under 95/NT.
vim:tw=78:sw=4:ts=8:ft=help:norl:
diff --git a/runtime/doc/gui_w32.txt b/runtime/doc/gui_w32.txt
index 07817aba9..2c70eb724 100644
--- a/runtime/doc/gui_w32.txt
+++ b/runtime/doc/gui_w32.txt
@@ -1,4 +1,4 @@
-*gui_w32.txt* For Vim version 7.0aa. Last change: 2005 Feb 14
+*gui_w32.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -58,7 +58,7 @@ of Windows 3.1 or 3.11. See |win32s|.
To set Vim as the default editor for a file type:
1. Start a Windows Explorer
-2. Chose View/Options -> File Types
+2. Choose View/Options -> File Types
3. Select the path to gvim for every file type that you want to use it for.
(you can also use three spaces in the file type field, for files without an
extension).
@@ -262,8 +262,8 @@ question if you really want to kill the application, Vim may be killed too!
In Windows 95, the window in which the commands are executed is always 25x80
characters, to be as DOS compatible as possible (this matters!). The default
-system font is used. On NT, the window will be the default you have set up for
-"Console" in Control Panel. On Win32s, the properties of the DOS box are
+system font is used. On NT, the window will be the default you have set up for
+"Console" in Control Panel. On Win32s, the properties of the DOS box are
determined by _default.pif in the windows directory.
*msdos-mode*
@@ -283,7 +283,7 @@ sense for most shell commands which produce output for Vim to use). If you
want Vim to start a program and return immediately, you can use the following
syntax on W95 & NT: >
:!start {command}
-On Win32s, you will have to go to another window instead. Don't forget that
+On Win32s, you will have to go to another window instead. Don't forget that
you must tell Windows 3.1x to keep executing a DOS command in the background
while you switch back to Vim.
@@ -295,7 +295,7 @@ On Win32, the normal DOS colors can be used. See |dos-colors|.
Additionally the system configured colors can also be used. These are known
by the names Sys_XXX, where XXX is the appropriate system color name, from the
following list (see the Win32 documentation for full descriptions). Case is
-ignored. note: On Win32s not all of these colors are supported.
+ignored. Note: On Win32s not all of these colors are supported.
Sys_3DDKShadow Sys_3DFace Sys_BTNFace
Sys_3DHilight Sys_3DHighlight Sys_BTNHilight
@@ -366,7 +366,7 @@ without having to go to the menu bar each time.
This is most useful if you find yourself using a command buried in a sub-menu
over and over again.
The tearoff menus can be positioned where you like, and always stay just above
-the Main Vim window. You can get rid of them by closing them as usual; they
+the Main Vim window. You can get rid of them by closing them as usual; they
also of course close when you exit Vim.
*:tearoff* *:te*
@@ -400,7 +400,7 @@ The rules are:
b) Parameters are separated by white space.
c) A parameter can be enclosed in double quotes to include white space.
d) A sequence of zero or more backslashes (\) and a double quote (")
- is special. The effective number of backslashes is halved, rounded
+ is special. The effective number of backslashes is halved, rounded
down. An even number of backslashes reverses the acceptability of
spaces and tabs, an odd number of backslashes produces a literal
double quote.
@@ -429,7 +429,7 @@ The "File/Print" menu prints the text with syntax highlighting, see
printer installed this should also work: >
:w >>prn
-Vim supports a number of standard MS Windows features. Some of these are
+Vim supports a number of standard MS Windows features. Some of these are
detailed elsewhere: see |'mouse'|, |win32-hidden-menus|.
*drag-n-drop-win32*
@@ -441,7 +441,7 @@ be opened as normal. See |drag-n-drop|.
{not in Vi} {only for Win32 versions}
Normally, Vim takes control of all Alt-<Key> combinations, to increase the
-number of possible mappings. This clashes with the standard use of Alt as the
+number of possible mappings. This clashes with the standard use of Alt as the
key for accessing menus.
The quick way of getting standard behavior is to set the 'winaltkeys' option
to "yes". This however prevents you from mapping Alt keys at all.
@@ -449,18 +449,18 @@ Another way is to set 'winaltkeys' to "menu". Menu shortcut keys are then
handled by windows, other ALT keys can be mapped. This doesn't allow a
dependency on the current state though.
To get round this, the :simalt command allows Vim (when 'winaltkeys' is not
-"yes") to fake a Windows-style Alt keypress. You can use this to map Alt key
+"yes") to fake a Windows-style Alt keypress. You can use this to map Alt key
combinations (or anything else for that matter) to produce standard Windows
-actions. Here are some examples: >
+actions. Here are some examples: >
:map <M-f> :simalt f<CR>
This makes Alt-F pop down the 'File' menu (with the stock Menu.vim) by
simulating the keystrokes Alt, F. >
:map <M-Space> :simalt ~<CR>
-This maps Alt-Space to pop down the system menu for the Vim window. Note that
+This maps Alt-Space to pop down the system menu for the Vim window. Note that
~ is used by simalt to represent the <Space> character. >
:map <C-n> :simalt ~n<CR>
-Maps Control-N to produce the keys Alt-Space followed by N. This minimizes the
+Maps Control-N to produce the keys Alt-Space followed by N. This minimizes the
Vim window via the system menu.
*intellimouse-wheel-problems*
diff --git a/runtime/doc/gui_x11.txt b/runtime/doc/gui_x11.txt
index 2cbc4c994..d717bfe44 100644
--- a/runtime/doc/gui_x11.txt
+++ b/runtime/doc/gui_x11.txt
@@ -1,4 +1,4 @@
-*gui_x11.txt* For Vim version 7.0aa. Last change: 2004 Dec 29
+*gui_x11.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -113,7 +113,7 @@ same. Note that some fonts that have the same point size don't have the same
pixel size! Additionally, the positioning of the fonts must be the same
(ascent and descent). You can check this with "xlsfonts -l {fontname}".
-If any of these things are also set with Vim commands, eg with
+If any of these things are also set with Vim commands, e.g. with
":set guifont=Screen15", then this will override the X resources (currently
'guifont' is the only option that is supported).
diff --git a/runtime/doc/hangulin.txt b/runtime/doc/hangulin.txt
index 2fadb5b90..7487e6225 100644
--- a/runtime/doc/hangulin.txt
+++ b/runtime/doc/hangulin.txt
@@ -1,4 +1,4 @@
-*hangulin.txt* For Vim version 7.0aa. Last change: 2001 Sep 03
+*hangulin.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam
@@ -7,17 +7,17 @@ Introduction *hangul*
------------
It is to input hangul, the Korean language, with VIM GUI version.
If you have a XIM program, you can use another |+xim| feature.
-Basically, it is for whom has no XIM program.
+Basically, it is for anybody who has no XIM program.
Compile
-------
-Next is a basic option. You can add any other configure option. >
+Next is a basic option. You can add any other configure option. >
./configure --with-x --enable-multibyte --enable-fontset --enable-hangulinput
-And you should check the feature.h. If |+hangul_input| feature is enabled
+And you should check feature.h. If |+hangul_input| feature is enabled
by configure, you can select more options such as keyboard type, 2 bulsik
-or 3 bulsik. You can find keywords like next in there. >
+or 3 bulsik. You can find keywords like next in there. >
#define HANGUL_DEFAULT_KEYBOARD 2
#define ESC_CHG_TO_ENG_MODE
@@ -38,7 +38,7 @@ You should add nexts to your global vimrc ($HOME/.vimrc). >
Keyboard
--------
You can change keyboard type (2 bulsik or 3 bulsik) using VIM_KEYBOARD
-or HANGUL_KEYBOARD_TYPE environment variables. For sh, just do (2 bulsik): >
+or HANGUL_KEYBOARD_TYPE environment variables. For sh, just do (2 bulsik): >
export VIM_KEYBOARD="2"
or >
@@ -67,9 +67,9 @@ $HOME/.gvimrc: >
attention! the , (comma) or ; (semicolon)
-And there should be no ':set guifont'. If it exists, then Gvim ignores
-':set guifontset'. It means VIM runs without fontset supporting.
-So, you can see only English. Hangul does not be correctly displayed.
+And there should be no ':set guifont'. If it exists, then Gvim ignores
+':set guifontset'. It means VIM runs without fontset supporting.
+So, you can see only English. Hangul does not be correctly displayed.
After 'fontset' feature is enabled, VIM does not allow using 'font'.
For example, if you use >
@@ -78,17 +78,17 @@ in your .gvimrc, then you should do for syntax >
:hi Comment guifg=Cyan font=another_eng_font,another_your_font
If you just do >
:hi Comment font=another_eng_font
-then you can see a GOOD error message. Be careful!
+then you can see a GOOD error message. Be careful!
hangul_font width should be twice than english_font width.
Unsupported Feature
-------------------
-Johab font not yet supported. And I don't have any plan.
+Johab font not yet supported. And I don't have any plan.
If you really want to use johab font, you can use the
hanguldraw.c in gau package.
-Hanja input not yet supported. And I don't have any plan.
+Hanja input not yet supported. And I don't have any plan.
If you really want to input hanja, just use VIM with hanterm.
Bug or Comment
diff --git a/runtime/doc/if_cscop.txt b/runtime/doc/if_cscop.txt
index 368fbd66c..32bc84fc0 100644
--- a/runtime/doc/if_cscop.txt
+++ b/runtime/doc/if_cscop.txt
@@ -1,4 +1,4 @@
-*if_cscop.txt* For Vim version 7.0aa. Last change: 2004 Oct 21
+*if_cscop.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Andy Kahn
@@ -239,12 +239,12 @@ started will have no effect!
*cscopequickfix* *csqf* *E469*
{not available when compiled without the |+quickfix| feature}
'cscopequickfix' specifies whether to use quickfix window to show cscope
-results. This is a list of comma-separated values. Each item consists of
+results. This is a list of comma-separated values. Each item consists of
|cscope-find| command (s, g, d, c, t, e, f or i) and flag (+, - or 0).
'+' indicates that results must be appended to quickfix window,
'-' implies previous results clearance, '0' or command absence - don't use
-quickfix. Search is performed from start until first command occurrence.
-The default value is "" (don't use quickfix anyway). The following value
+quickfix. Search is performed from start until first command occurrence.
+The default value is "" (don't use quickfix anyway). The following value
seems to be useful: >
:set cscopequickfix=s-,c-,d-,i-,t-,e-
<
@@ -472,7 +472,7 @@ cscope within Vim to him.
*cscope-win32*
For a cscope version for Win32 see: http://iamphet.nm.ru/cscope/index.html
-Win32 support was added by Sergey Khorev <sergey.khorev@gmail.com>. Contact
+Win32 support was added by Sergey Khorev <sergey.khorev@gmail.com>. Contact
him if you have Win32-specific issues.
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/if_ole.txt b/runtime/doc/if_ole.txt
index 06e5b42cd..36efe41e4 100644
--- a/runtime/doc/if_ole.txt
+++ b/runtime/doc/if_ole.txt
@@ -1,4 +1,4 @@
-*if_ole.txt* For Vim version 7.0aa. Last change: 2004 Dec 09
+*if_ole.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Paul Moore
@@ -22,7 +22,7 @@ An alternative is using the client-server communication |clientserver|.
1. Activation *ole-activation*
Vim acts as an OLE automation server, accessible from any automation client,
-for example, Visual Basic, Python, or Perl. The Vim application "name" (its
+for example, Visual Basic, Python, or Perl. The Vim application "name" (its
"ProgID", in OLE terminology) is "Vim.Application".
Hence, in order to start a Vim instance (or connect to an already running
@@ -41,8 +41,8 @@ instance), code similar to the following should be used:
$vim = new Win32::OLE 'Vim.Application';
Vim does not support acting as a "hidden" OLE server, like some other OLE
-Automation servers. When a client starts up an instance of Vim, that instance
-is immediately visible. Simply closing the OLE connection to the Vim instance
+Automation servers. When a client starts up an instance of Vim, that instance
+is immediately visible. Simply closing the OLE connection to the Vim instance
is not enough to shut down the Vim instance - it is necessary to explicitly
execute a quit command (for example, :qa!, :wqa).
@@ -54,17 +54,17 @@ Vim exposes four methods for use by clients.
*ole-sendkeys*
SendKeys(keys) Execute a series of keys.
-This method takes a single parameter, which is a string of keystrokes. These
+This method takes a single parameter, which is a string of keystrokes. These
keystrokes are executed exactly as if they had been types in at the keyboard.
Special keys can be given using their <..> names, as for the right hand side
-of a mapping. Note: Execution of the Ex "normal" command is not supported -
+of a mapping. Note: Execution of the Ex "normal" command is not supported -
see below |ole-normal|.
Examples (Visual Basic syntax) >
Vim.SendKeys "ihello<Esc>"
Vim.SendKeys "ma1GV4jy`a"
-These examples assume that Vim starts in Normal mode. To force Normal mode,
+These examples assume that Vim starts in Normal mode. To force Normal mode,
start the key sequence with CTRL-\ CTRL-N as in >
Vim.SendKeys "<C-\><C-N>ihello<Esc>"
@@ -109,7 +109,7 @@ Example (Visual Basic syntax) >
Due to the way Vim processes OLE Automation commands, combined with the method
of implementation of the ex command :normal, it is not possible to execute the
-:normal command via OLE automation. Any attempt to do so will fail, probably
+:normal command via OLE automation. Any attempt to do so will fail, probably
harmlessly, although possibly in unpredictable ways.
There is currently no practical way to trap this situation, and users must
@@ -118,7 +118,7 @@ simply be aware of the limitation.
4. Registration *ole-registration* *E243*
Before Vim will act as an OLE server, it must be registered in the system
-registry. In order to do this, Vim should be run with a single parameter of
+registry. In order to do this, Vim should be run with a single parameter of
"-register".
*-register* >
gvim -register
@@ -131,9 +131,9 @@ In some situations registering is not possible. This happens when the
registry is not writable. If you run into this problem you need to run gvim
as "Administrator".
-Once vim is registered, the application path is stored in the registry. Before
-moving, deleting, or upgrading Vim, the registry entries should be removed
-using the "-unregister" switch.
+Once vim is registered, the application path is stored in the registry.
+Before moving, deleting, or upgrading Vim, the registry entries should be
+removed using the "-unregister" switch.
*-unregister* >
gvim -unregister
diff --git a/runtime/doc/if_perl.txt b/runtime/doc/if_perl.txt
index 0d627daa6..ef0763d04 100644
--- a/runtime/doc/if_perl.txt
+++ b/runtime/doc/if_perl.txt
@@ -1,4 +1,4 @@
-*if_perl.txt* For Vim version 7.0aa. Last change: 2004 Aug 30
+*if_perl.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Sven Verdoolaege
@@ -18,7 +18,7 @@ The Perl interface only works when Vim was compiled with the |+perl| feature.
1. Editing Perl files *perl-editing*
Vim syntax highlighting supports Perl and POD files. Vim assumes a file is
-Perl code if the filename has a .pl or .pm suffix. Vim also examines the first
+Perl code if the filename has a .pl or .pm suffix. Vim also examines the first
line of a file, regardless of the filename suffix, to check if a file is a
Perl script (see scripts.vim in Vim's syntax directory). Vim assumes a file
is POD text if the filename has a .POD suffix.
@@ -50,7 +50,7 @@ http://www.perl.com/CPAN/ports/nt/Standard/x86/
3. Using the Perl interface *perl-using*
*:perl* *:pe*
-:pe[rl] {cmd} Execute Perl command {cmd}. The current package
+:pe[rl] {cmd} Execute Perl command {cmd}. The current package
is "main".
:pe[rl] << {endpattern}
@@ -84,7 +84,7 @@ Example vim script: >
*:perldo* *:perld*
:[range]perld[o] {cmd} Execute Perl command {cmd} for each line in the
[range], with $_ being set to the text of each line in
- turn, without a trailing <EOL>. Setting $_ will change
+ turn, without a trailing <EOL>. Setting $_ will change
the text, but note that it is not possible to add or
delete lines using this command.
The default for [range] is the whole file: "1,$".
@@ -211,7 +211,7 @@ Buffer->Count() Returns the number of lines in the Buffer.
*perl-Get*
Buffer->Get({lnum}, {lnum}?, ...)
Returns a text string of line {lnum} in the Buffer
- for each {lnum} specified. An array can be passed
+ for each {lnum} specified. An array can be passed
with a list of {lnum}'s specified.
*perl-Delete*
diff --git a/runtime/doc/if_pyth.txt b/runtime/doc/if_pyth.txt
index d26461c85..1a2a33de5 100644
--- a/runtime/doc/if_pyth.txt
+++ b/runtime/doc/if_pyth.txt
@@ -1,4 +1,4 @@
-*if_pyth.txt* For Vim version 7.0aa. Last change: 2004 Jul 25
+*if_pyth.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Paul Moore
@@ -85,7 +85,7 @@ just like in the Python interpreter.)
2. The vim module *python-vim*
Python code gets all of its access to vim (with one exception - see
-|python-output| below) via the "vim" module. The vim module implements two
+|python-output| below) via the "vim" module. The vim module implements two
methods, three constants, and one error object. You need to import the vim
module before using it: >
:python import vim
@@ -113,7 +113,7 @@ Overview >
Methods of the "vim" module
vim.command(str) *python-command*
- Executes the vim (ex-mode) command str. Returns None.
+ Executes the vim (ex-mode) command str. Returns None.
Examples: >
:py vim.command("set tw=72")
:py vim.command("%s/aaa/bbb/g")
@@ -130,7 +130,7 @@ vim.command(str) *python-command*
vim.eval(str) *python-eval*
Evaluates the expression str using the vim internal expression
- evaluator (see |expression|). Returns the expression result as a
+ evaluator (see |expression|). Returns the expression result as a
string.
Examples: >
:py text_width = vim.eval("&tw")
@@ -156,7 +156,7 @@ Constants of the "vim" module
to which the variables referred.
vim.buffers *python-buffers*
- A sequence object providing access to the list of vim buffers. The
+ A sequence object providing access to the list of vim buffers. The
object supports the following operations: >
:py b = vim.buffers[i] # Indexing (read-only)
:py b in vim.buffers # Membership test
@@ -164,7 +164,7 @@ vim.buffers *python-buffers*
:py for b in vim.buffers: # Sequential access
<
vim.windows *python-windows*
- A sequence object providing access to the list of vim windows. The
+ A sequence object providing access to the list of vim windows. The
object supports the following operations: >
:py w = vim.windows[i] # Indexing (read-only)
:py w in vim.windows # Membership test
@@ -179,10 +179,10 @@ vim.current *python-current*
vim.current.window The current window (RO) Window
vim.current.range The current line range (RO) Range
- The last case deserves a little explanation. When the :python or
+ The last case deserves a little explanation. When the :python or
:pyfile command specifies a range, this range of lines becomes the
- "current range". A range is a bit like a buffer, but with all access
- restricted to a subset of lines. See |python-range| for more details.
+ "current range". A range is a bit like a buffer, but with all access
+ restricted to a subset of lines. See |python-range| for more details.
Output from Python *python-output*
@@ -197,31 +197,31 @@ Output from Python *python-output*
*python-input*
Input (via sys.stdin, including input() and raw_input()) is not
- supported, and may cause the program to crash. This should probably be
+ supported, and may cause the program to crash. This should probably be
fixed.
==============================================================================
3. Buffer objects *python-buffer*
-Buffer objects represent vim buffers. You can obtain them in a number of ways:
+Buffer objects represent vim buffers. You can obtain them in a number of ways:
- via vim.current.buffer (|python-current|)
- from indexing vim.buffers (|python-buffers|)
- from the "buffer" attribute of a window (|python-window|)
Buffer objects have one read-only attribute - name - the full file name for
-the buffer. They also have three methods (append, mark, and range; see below).
+the buffer. They also have three methods (append, mark, and range; see below).
-You can also treat buffer objects as sequence objects. In this context, they
+You can also treat buffer objects as sequence objects. In this context, they
act as if they were lists (yes, they are mutable) of strings, with each
-element being a line of the buffer. All of the usual sequence operations,
+element being a line of the buffer. All of the usual sequence operations,
including indexing, index assignment, slicing and slice assignment, work as
-you would expect. Note that the result of indexing (slicing) a buffer is a
-string (list of strings). This has one unusual consequence - b[:] is different
-from b. In particular, "b[:] = None" deletes the whole of the buffer, whereas
+you would expect. Note that the result of indexing (slicing) a buffer is a
+string (list of strings). This has one unusual consequence - b[:] is different
+from b. In particular, "b[:] = None" deletes the whole of the buffer, whereas
"b = None" merely updates the variable b, with no effect on the buffer.
-Buffer indexes start at zero, as is normal in Python. This differs from vim
-line numbers, which start from 1. This is particularly relevant when dealing
+Buffer indexes start at zero, as is normal in Python. This differs from vim
+line numbers, which start from 1. This is particularly relevant when dealing
with marks (see below) which use vim line numbers.
The buffer object methods are:
@@ -255,12 +255,12 @@ Examples (assume b is the current buffer) >
==============================================================================
4. Range objects *python-range*
-Range objects represent a part of a vim buffer. You can obtain them in a
+Range objects represent a part of a vim buffer. You can obtain them in a
number of ways:
- via vim.current.range (|python-current|)
- from a buffer's range() method (|python-buffer|)
-A range object is almost identical in operation to a buffer object. However,
+A range object is almost identical in operation to a buffer object. However,
all operations are restricted to the lines within the range (this line range
can, of course, change as a result of slice assignments, line deletions, or
the range.append() method).
@@ -283,11 +283,11 @@ Example (assume r is the current range):
==============================================================================
5. Window objects *python-window*
-Window objects represent vim windows. You can obtain them in a number of ways:
+Window objects represent vim windows. You can obtain them in a number of ways:
- via vim.current.window (|python-current|)
- from indexing vim.windows (|python-windows|)
-You can manipulate window objects only through their attributes. They have no
+You can manipulate window objects only through their attributes. They have no
methods, and no sequence or other interface.
Window attributes are:
diff --git a/runtime/doc/if_ruby.txt b/runtime/doc/if_ruby.txt
index e8d09f62c..3ca8cc510 100644
--- a/runtime/doc/if_ruby.txt
+++ b/runtime/doc/if_ruby.txt
@@ -1,4 +1,4 @@
-*if_ruby.txt* For Vim version 7.0aa. Last change: 2004 Mar 14
+*if_ruby.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Shugo Maeda
@@ -32,7 +32,7 @@ downloading Ruby there.
Execute Ruby script {script}.
{endpattern} must NOT be preceded by any white space.
If {endpattern} is omitted, it defaults to a dot '.'
- like for the |:append| and |:insert| commands. This
+ like for the |:append| and |:insert| commands. This
form of the |:ruby| command is mainly useful for
including ruby code in vim scripts.
Note: This command doesn't work when the Ruby feature
@@ -60,7 +60,7 @@ Example Vim script: >
*:rubydo* *:rubyd* *E265*
:[range]rubyd[o] {cmd} Evaluate Ruby command {cmd} for each line in the
[range], with $_ being set to the text of each line in
- turn, without a trailing <EOL>. Setting $_ will change
+ turn, without a trailing <EOL>. Setting $_ will change
the text, but note that it is not possible to add or
delete lines using this command.
The default for [range] is the whole file: "1,$".
@@ -115,7 +115,7 @@ VIM::command({cmd})
*ruby-evaluate*
VIM::evaluate({expr})
Evaluates {expr} using the vim internal expression evaluator (see
- |expression|). Returns the expression result as a string.
+ |expression|). Returns the expression result as a string.
==============================================================================
3. VIM::Buffer objects *ruby-buffer*
@@ -126,7 +126,7 @@ Class Methods:
current Returns the current buffer object.
count Returns the number of buffers.
-self[{n}] Returns the buffer object for the number {n}. The first number
+self[{n}] Returns the buffer object for the number {n}. The first number
is 0.
Methods:
@@ -151,7 +151,7 @@ Class Methods:
current Returns the current window object.
count Returns the number of windows.
-self[{n}] Returns the window object for the number {n}. The first number
+self[{n}] Returns the window object for the number {n}. The first number
is 0.
Methods:
diff --git a/runtime/doc/if_sniff.txt b/runtime/doc/if_sniff.txt
index 12b34c481..a55c7c16f 100644
--- a/runtime/doc/if_sniff.txt
+++ b/runtime/doc/if_sniff.txt
@@ -1,4 +1,4 @@
-*if_sniff.txt* For Vim version 7.0aa. Last change: 2001 Sep 03
+*if_sniff.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL
@@ -45,7 +45,7 @@ edit source code. On the other hand, you can send queries to SNiFF+ with the
:sni[ff] Display all possible requests and the connection
status
-Most requests require a symbol (identifier) as parameter. If it is omitted,
+Most requests require a symbol (identifier) as parameter. If it is omitted,
Vim will use the current word under the cursor.
The available requests are listed below:
@@ -54,7 +54,7 @@ request mapping description
connect sc Establish connection with SNiFF+.
Make sure SNiFF+ is prepared for this in the
Preferences
-disconnect sq Disconnect from SNiFF+. You can reconnect any
+disconnect sq Disconnect from SNiFF+. You can reconnect any
time with :sniff connect (or 'sc')
toggle st Toggle between implementation
and definition file
@@ -80,7 +80,7 @@ show-docu sd Show documentation of symbol
gen-docu sD Generate documentation of symbol
The mappings are defined in a file 'sniff.vim', which is part of every SNiFF+
-product ($SNIFF_DIR/config/sniff.vim). This file is sourced whenever Vim
+product ($SNIFF_DIR/config/sniff.vim). This file is sourced whenever Vim
connects to SNiFF+.
==============================================================================
diff --git a/runtime/doc/if_tcl.txt b/runtime/doc/if_tcl.txt
index b386bed15..1195ed5ac 100644
--- a/runtime/doc/if_tcl.txt
+++ b/runtime/doc/if_tcl.txt
@@ -1,4 +1,4 @@
-*if_tcl.txt* For Vim version 7.0aa. Last change: 2004 Jan 17
+*if_tcl.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Ingo Wilken
@@ -36,7 +36,7 @@ comments, ideas etc to <Ingo.Wilken@informatik.uni-oldenburg.de>
wasn't compiled in. To avoid errors, see
|script-here|.
-{endmarker} must NOT be preceded by any white space. If {endmarker} is
+{endmarker} must NOT be preceded by any white space. If {endmarker} is
omitted from after the "<<", a dot '.' must be used after {script}, like for
the |:append| and |:insert| commands.
This form of the |:tcl| command is mainly useful for including tcl code in Vim
@@ -152,7 +152,7 @@ Commands:
::vim::window {option} *tcl-window*
Provides access to vim windows. Currently only the "list" option is
- implemented. This creates a window command (see |tcl-window-cmds|) for
+ implemented. This creates a window command (see |tcl-window-cmds|) for
each window, and returns a list of the command names as the result.
Example: >
set wins [::vim::window list]
@@ -227,7 +227,7 @@ The ::vim::current(window) variable contains the name of the window command
for the current window. A window command is automatically deleted when the
corresponding vim window is closed.
-Lets assume the name of the window command is stored in the Tcl variable "win",
+Let's assume the name of the window command is stored in the Tcl variable "win",
i.e. "$win" calls the command. The following options are available: >
$win buffer # Create Tcl command for window's buffer.
@@ -306,7 +306,7 @@ changed, all marks in the buffer are automatically adjusted. Any changes to
the buffer's contents made by Tcl commands can be undone with the "undo" vim
command (see |undo|).
-Lets assume the name of the buffer command is stored in the Tcl variable "buf",
+Let's assume the name of the buffer command is stored in the Tcl variable "buf",
i.e. "$buf" calls the command. The following options are available: >
$buf append {n} {str} # Append a line to buffer, after line {n}.
@@ -497,7 +497,7 @@ This procedure runs an ex command on each buffer (idea stolen from Ron Aaron):
}
Use it like this:
:tcl eachbuf %s/foo/bar/g
-Be careful with Tcl's string and backslash substitution, tough. If in doubt,
+Be careful with Tcl's string and backslash substitution, tough. If in doubt,
surround the ex command with curly braces.
diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt
index bd4bb4119..0540c43b4 100644
--- a/runtime/doc/indent.txt
+++ b/runtime/doc/indent.txt
@@ -1,4 +1,4 @@
-*indent.txt* For Vim version 7.0aa. Last change: 2005 Feb 24
+*indent.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -237,7 +237,7 @@ assume a 'shiftwidth' of 4.
} }
<
bN If N != 0 Vim will align a final "break" with the case label,
- so that case..break looks like a sort of block. (default: 0).
+ so that case..break looks like a sort of block. (default: 0).
cino= cino=b1 >
switch (x) switch(x)
@@ -325,7 +325,7 @@ assume a 'shiftwidth' of 4.
********/ ********/
< (Example uses ":set comments& comments-=s1:/* comments^=s0:/*")
- /N Indent comment lines N characters extra. (default 0).
+ /N Indent comment lines N characters extra. (default 0).
cino= cino=/4 >
a = b; a = b;
/* comment */ /* comment */
@@ -381,7 +381,7 @@ assume a 'shiftwidth' of 4.
the last non-white character in its line and it is not the
closing parentheses, indent the following line N characters
relative to the outer context (i.e. start of the line or the
- next unclosed parentheses). (default: 0).
+ next unclosed parentheses). (default: 0).
cino=(0 cino=(0,W4 >
a_long_line( a_long_line(
@@ -406,7 +406,7 @@ assume a 'shiftwidth' of 4.
<
*java-cinoptions* *java-indenting*
jN Indent java anonymous classes correctly. The value 'N' is
- currently unused but must be non-zero (e.g. 'j1'). 'j1' will
+ currently unused but must be non-zero (e.g. 'j1'). 'j1' will
indent for example the following code snippet correctly: >
object.add(new ChangeListener() {
@@ -451,31 +451,31 @@ REMARKS ABOUT SPECIFIC INDENT FILES ~
FORTRAN *fortran-indent*
-Block if, select case, and where constructs are indented. Comments, labelled
+Block if, select case, and where constructs are indented. Comments, labelled
statements and continuation lines are indented if the Fortran is in free
source form, whereas they are not indented if the Fortran is in fixed source
-form because of the left margin requirements. Hence manual indent corrections
+form because of the left margin requirements. Hence manual indent corrections
will be necessary for labelled statements and continuation lines when fixed
-source form is being used. For further discussion of the method used for the
+source form is being used. For further discussion of the method used for the
detection of source format see |fortran-syntax|.
Do loops ~
-All do loops are left unindented by default. Do loops can be unstructured in
+All do loops are left unindented by default. Do loops can be unstructured in
Fortran with (possibly multiple) loops ending on a labelled executable
-statement of almost arbitrary type. Correct indentation requires
-compiler-quality parsing. Old code with do loops ending on labelled statements
+statement of almost arbitrary type. Correct indentation requires
+compiler-quality parsing. Old code with do loops ending on labelled statements
of arbitrary type can be indented with elaborate programs such as Tidy
-(http://www.unb.ca/chem/ajit/f_tidy.htm). Structured do/continue loops are
+(http://www.unb.ca/chem/ajit/f_tidy.htm). Structured do/continue loops are
also left unindented because continue statements are also used for purposes
-other than ending a do loop. Programs such as Tidy can convert structured
-do/continue loops to the do/enddo form. Do loops of the do/enddo variety can
-be indented. If you use only structured loops of the do/enddo form, you should
+other than ending a do loop. Programs such as Tidy can convert structured
+do/continue loops to the do/enddo form. Do loops of the do/enddo variety can
+be indented. If you use only structured loops of the do/enddo form, you should
declare this by setting the fortran_do_enddo variable in your .vimrc as
follows >
let fortran_do_enddo=1
-in which case do loops will be indented. If all your loops are of do/enddo
+in which case do loops will be indented. If all your loops are of do/enddo
type only in, say, .f90 files, then you should set a buffer flag with an
autocommand such as >
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index 7735e37fe..b7a9db952 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 Feb 25
+*index.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -800,7 +800,7 @@ tag char note action in Normal mode ~
==============================================================================
3. Visual mode *visual-index*
-Most commands in Visual mode are the same as in Normal mode. The ones listed
+Most commands in Visual mode are the same as in Normal mode. The ones listed
here are those that are different.
tag command note action in Visual mode ~
diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt
index 19b735729..222562bf1 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 Feb 21
+*insert.txt* For Vim version 7.0aa. Last change: 2005 Apr 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -190,7 +190,7 @@ CTRL-Q Same as CTRL-V.
work then. It does work in the GUI.
CTRL-X Enter CTRL-X mode. This is a sub-mode where commands can
- be given to complete words or scroll the window. See
+ be given to complete words or scroll the window. See
|i_CTRL-X| and |ins-completion|. {not in Vi}
*i_CTRL-E*
@@ -271,7 +271,7 @@ entered directly. This way you can enter any character, except a line break
first char mode max nr of chars max value ~
(none) decimal 3 255
-o or O octal 3 255
+o or O octal 3 377 (255)
x or X hexadecimal 2 ff (255)
u hexadecimal 4 ffff (65535)
U hexadecimal 8 7fffffff (2147483647)
@@ -392,7 +392,7 @@ The CTRL-G j and CTRL-G k commands can be used to insert text in front of a
column. Example: >
int i;
int j;
-Position the cursor on the first "int", type "istatic<C-G>j ". The
+Position the cursor on the first "int", type "istatic <C-G>j ". The
result is: >
static int i;
int j;
@@ -726,7 +726,7 @@ CTRL-X CTRL-K Search the files given with the 'dictionary' option
keyword replaces the previous matching keyword.
*i_CTRL-X_CTRL-T*
-CTRL-X CTRL-T Works as CTRL-X CTRL-K, but in a special way. It uses
+CTRL-X CTRL-T Works as CTRL-X CTRL-K, but in a special way. It uses
the 'thesaurus' option instead of 'dictionary'. If a
match is found in the thesaurus file, all the
remaining words on the same line are included as
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 2a9dd1b36..1119618d7 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 Feb 27
+*map.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -22,7 +22,7 @@ is to define a sequence commands for a function key. Example: >
:map <F2> a<C-R>=strftime("%c")<CR><Esc>
-This appends the current date and time after the cursor. (in <> notation |<>|)
+This appends the current date and time after the cursor (in <> notation |<>|).
There are commands to enter new mappings, remove mappings and list mappings.
See |map-overview| for the various forms of "map" and their relationships with
@@ -174,7 +174,7 @@ There are five sets of mappings
- For Visual mode: When typing commands while the Visual area is highlighted.
- For Operator-pending mode: When an operator is pending (after "d", "y", "c",
etc.). Example: ":omap { w" makes "y{" work like "yw" and "d{" like "dw".
-- For Insert mode. These are also used in Replace mode.
+- For Insert mode. These are also used in Replace mode.
- For Command-line mode: When entering a ":" or "/" command.
There are no separate mappings for Select mode. The same as for Visual mode
@@ -811,7 +811,7 @@ feature}.
==============================================================================
4. User-defined commands *user-commands*
-It is possible to define your own Ex commands. A user-defined command can act
+It is possible to define your own Ex commands. A user-defined command can act
just like a built-in command (it can have a range or arguments, arguments can
be completed as filenames or buffer names, etc), except that when the command
is executed, it is transformed into a normal ex command and then executed.
@@ -820,7 +820,7 @@ For starters: See section |40.2| in the user manual.
*E183* *user-cmd-ambiguous*
All user defined commands must start with an uppercase letter, to avoid
-confusion with builtin commands. (There are a few builtin commands, notably
+confusion with builtin commands. (There are a few builtin commands, notably
:Next, :Print and :X, which do start with an uppercase letter. The builtin
will always take precedence in these cases). The other characters of the user
command can be uppercase letters, lowercase letters or digits. When using
@@ -829,8 +829,8 @@ ambiguous. For example, the command ":Cc2" could be the user command ":Cc2"
without an argument, or the command ":Cc" with argument "2". It is advised to
put a space between the command name and the argument to avoid these problems.
-When using a user-defined command, the command can be abbreviated. However, if
-an abbreviation is not unique, an error will be issued. Furthermore, a
+When using a user-defined command, the command can be abbreviated. However, if
+an abbreviation is not unique, an error will be issued. Furthermore, a
built-in command will always take precedence.
Example: >
@@ -846,7 +846,7 @@ It is recommended that full names for user-defined commands are used in
scripts.
:com[mand] *:com* *:command*
- List all user-defined commands. When listing commands,
+ List all user-defined commands. When listing commands,
the characters in the first two columns are
! Command has the -bang attribute
" Command has the -register attribute
@@ -858,8 +858,8 @@ scripts.
*E174* *E182*
:com[mand][!] [{attr}...] {cmd} {rep}
Define a user command. The name of the command is
- {cmd} and its replacement text is {rep}. The command's
- attributes (see below) are {attr}. If the command
+ {cmd} and its replacement text is {rep}. The command's
+ attributes (see below) are {attr}. If the command
already exists, an error is reported, unless a ! is
specified, in which case the command is redefined.
@@ -871,20 +871,20 @@ scripts.
Command attributes
-User-defined commands are treated by Vim just like any other ex commands. They
-can have arguments, or have a range specified. Arguments are subject to
-completion as filenames, buffers, etc. Exactly how this works depends upon the
+User-defined commands are treated by Vim just like any other ex commands. They
+can have arguments, or have a range specified. Arguments are subject to
+completion as filenames, buffers, etc. Exactly how this works depends upon the
command's attributes, which are specified when the command is defined.
There are a number of attributes, split into four categories: argument
-handling, completion behavior, range handling, and special cases. The
+handling, completion behavior, range handling, and special cases. The
attributes are described below, by category.
Argument handling *E175* *E176*
By default, a user defined command will take no arguments (and an error is
-reported if any are supplied). However, it is possible to specify that the
-command can take arguments, using the -nargs attribute. Valid cases are:
+reported if any are supplied). However, it is possible to specify that the
+command can take arguments, using the -nargs attribute. Valid cases are:
-nargs=0 No arguments are allowed (the default)
-nargs=1 Exactly one argument is required
@@ -961,11 +961,11 @@ The following example lists user names to a Finger command >
Range handling *E177* *E178*
-By default, user-defined commands do not accept a line number range. However,
+By default, user-defined commands do not accept a line number range. However,
it is possible to specify that the command does take a range (the -range
attribute), or that it takes an arbitrary count value, either in the line
number position (-range=N, like the |:split| command) or as a "count"
-argument (-count=N, like the |:Next| command). Possible attributes are:
+argument (-count=N, like the |:Next| command). Possible attributes are:
-range Range allowed, default is current line
-range=% Range allowed, default is whole file (1,$)
@@ -997,9 +997,9 @@ replacement text separately.
Replacement text
The replacement text for a user defined command is scanned for special escape
-sequences, using <...> notation. Escape sequences are replaced with values
-from the entered command line, and all other text is copied unchanged. The
-resulting string is executed as an Ex command. If the initial < of an escape
+sequences, using <...> notation. Escape sequences are replaced with values
+from the entered command line, and all other text is copied unchanged. The
+resulting string is executed as an Ex command. If the initial < of an escape
sequence is preceded by a backslash, the sequence is copied unchanged.
The valid escape sequences are
@@ -1017,7 +1017,7 @@ The valid escape sequences are
expands to nothing.
*<reg>* *<register>*
<reg> (See the '-register' attribute) The optional register,
- if specified. Otherwise, expands to nothing. <register>
+ if specified. Otherwise, expands to nothing. <register>
is a synonym for this.
*<args>*
<args> The command arguments, exactly as supplied (but as
@@ -1034,7 +1034,7 @@ If the first two characters of an escape sequence are "q-" (for example,
for use in an expression. This uses the argument as one single value.
To allow commands to pass their arguments on to a user-defined function, there
-is a special form <f-args> ("function args"). This splits the command
+is a special form <f-args> ("function args"). This splits the command
arguments at spaces and Tabs, quotes each argument individually, and the
<f-args> sequence is replaced by the comma-separated list of quoted arguments.
See the Mycmd example below. When there is no argument, <f-args> also has no
diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt
index be6365896..367de8b7a 100644
--- a/runtime/doc/mbyte.txt
+++ b/runtime/doc/mbyte.txt
@@ -1,4 +1,4 @@
-*mbyte.txt* For Vim version 7.0aa. Last change: 2005 Feb 13
+*mbyte.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@@ -436,7 +436,7 @@ Useful utilities for converting the charset:
ftp://ftp.cuhk.hk/pub/chinese/ifcss/software/unix/convert/hc-30.tar.gz
Korean: hmconv
- Hmconv is Korean code conversion utility especially for E-mail. It can
+ Hmconv is Korean code conversion utility especially for E-mail. It can
convert between EUC-KR and ISO-2022-KR. Hmconv can be found at:
ftp://ftp.kaist.ac.kr/pub/hangul/code/hmconv/
@@ -444,7 +444,7 @@ Useful utilities for converting the charset:
Lv is a Powerful Multilingual File Viewer. And it can be worked as
|charset| converter. Supported |charset|: ISO-2022-CN, ISO-2022-JP,
ISO-2022-KR, EUC-CN, EUC-JP, EUC-KR, EUC-TW, UTF-7, UTF-8, ISO-8859
- series, Shift_JIS, Big5 and HZ. Lv can be found at:
+ series, Shift_JIS, Big5 and HZ. Lv can be found at:
http://www.ff.iij4u.or.jp/~nrt/freeware/lv4495.tar.gz
@@ -506,7 +506,7 @@ Now start xterm with >
or, for bigger character: >
xterm -u8 -fn -misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1
-and you will have a working UTF-8 terminal emulator. Try both >
+and you will have a working UTF-8 terminal emulator. Try both >
cat utf-8-demo.txt
vim utf-8-demo.txt
@@ -761,7 +761,7 @@ is suitable for complex input, such as CJK.
number of Hira-gana characters are 76. So, first, we pre-input text as
pronounced in Hira-gana, second, we convert Hira-gana to Kanji or Kata-Kana,
if needed. There are some Kana-Kanji conversion server: jserver
- (distributed with Wnn, see below) and canna. Canna could be found at:
+ (distributed with Wnn, see below) and canna. Canna could be found at:
ftp://ftp.nec.co.jp/pub/Canna/ (no longer works).
There is a good input system: Wnn4.2. Wnn 4.2 contains,
@@ -801,7 +801,7 @@ Use the RPM or port for your system.
Preedit Area and Status Area are performed by the client application in
the area of application. The client application is directed by the
|IM-server| to display all pre-edit data at the location of text
- insertion. The client registers callbacks invoked by the input method
+ insertion. The client registers callbacks invoked by the input method
during pre-editing.
*. over-the-spot *OverTheSpot*
Status Area is created in a fixed position within the area of application,
@@ -1231,7 +1231,7 @@ is no longer relevant in the GTK+ 2 GUI.
Up to two combining characters can be used. The combining character is drawn
on top of the preceding character. When editing text a composing character is
mostly considered part of the preceding character. For example "x" will
-delete a character and its following composing characters by default. If the
+delete a character and its following composing characters by default. If the
'delcombine' option is on, then pressing 'x' will delete the combining
characters, one at a time, then the base character. But when inserting, you
type the first character and the following composing characters separately,
@@ -1253,7 +1253,7 @@ characters present in the selected font.
Useful commands:
- "ga" shows the decimal, hexadecimal and octal value of the character under
- the cursor. If there are composing characters these are shown too. (if the
+ the cursor. If there are composing characters these are shown too. (If the
message is truncated, use ":messages").
- "g8" shows the bytes used in a UTF-8 character, also the composing
characters, as hex numbers.
diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt
index cfc318bf6..0c65bb506 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 Feb 08
+*motion.txt* For Vim version 7.0aa. Last change: 2005 Apr 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -72,7 +72,7 @@ and end position. Generally, motions that move between lines affect lines
characterwise). However, there are some exceptions.
*exclusive* *inclusive*
-A character motion is either inclusive or exclusive. When inclusive, the start
+A character motion is either inclusive or exclusive. When inclusive, the start
and end position of the motion are included in the operation. When exclusive,
the last character towards the end of the buffer is not included. Linewise
motions always include the start and end position.
@@ -1061,7 +1061,7 @@ g; Go to [count] older position in change list.
*g,* *E663*
g, Go to [count] newer cursor position in change list.
- Just like "g;| but in the opposite direction.
+ Just like |g;| but in the opposite direction.
(not a motion command)
{not in Vi}
{not available without the +jumplist feature}
diff --git a/runtime/doc/netbeans.txt b/runtime/doc/netbeans.txt
index 5007122d0..d642497cc 100644
--- a/runtime/doc/netbeans.txt
+++ b/runtime/doc/netbeans.txt
@@ -1,4 +1,4 @@
-*netbeans.txt* For Vim version 7.0aa. Last change: 2005 Jan 31
+*netbeans.txt* For Vim version 7.0aa. Last change: 2005 Apr 04
VIM REFERENCE MANUAL by Gordon Prieur
@@ -38,7 +38,7 @@ Visit http://www.sun.com for more information regarding the Sun ONE Studio
product line.
Current releases of NetBeans provide full support for Java and limited support
-for C, C++, and Fortran. Current releases of Sun ONE Studio provide full
+for C, C++, and Fortran. Current releases of Sun ONE Studio provide full
support for Java, C, C++, and Fortran.
The interface to NetBeans is also supported by Agide, the A-A-P GUI IDE.
@@ -50,12 +50,12 @@ See the A-A-P website for information: http://www.A-A-P.org.
==============================================================================
2. NetBeans Key Bindings *netbeans-keybindings*
-Vim understands a number of key bindings that execute NetBeans commands. These
-are typically all the Function key combinations. To execute a NetBeans command,
-the user must press the Pause key followed by a NetBeans key binding. For
-example, in order to compile a Java file, the NetBeans key binding is "F9". So,
-while in vim, press "Pause F9" to compile a java file. To toggle a breakpoint
-at the current line, press "Pause Shift F8".
+Vim understands a number of key bindings that execute NetBeans commands.
+These are typically all the Function key combinations. To execute a NetBeans
+command, the user must press the Pause key followed by a NetBeans key binding.
+For example, in order to compile a Java file, the NetBeans key binding is
+"F9". So, while in vim, press "Pause F9" to compile a java file. To toggle a
+breakpoint at the current line, press "Pause Shift F8".
The Pause key is Function key 21. If you don't have a working Pause key and
want to use F8 instead, use: >
@@ -81,10 +81,10 @@ In case you do not want the NetBeans interface you can disable it by
uncommenting a line with "--disable-netbeans" in the Makefile.
Currently, only gvim is supported in this integration as NetBeans does not
-have means to supply a terminal emulator for the vim command. Furthermore,
+have means to supply a terminal emulator for the vim command. Furthermore,
there is only GUI support for GTK, GNOME, and Motif.
-If Motif support is required the user must supply XPM libraries. See
+If Motif support is required the user must supply XPM libraries. See
|workshop-xpm| for details on obtaining the latest version of XPM.
@@ -99,45 +99,45 @@ XPM by yourself or use precompiled libraries from http://iamphet.nm.ru/misc/
==============================================================================
4. Downloading NetBeans *netbeans-download*
-The NetBeans IDE is available for download from netbeans.org. You can download
+The NetBeans IDE is available for download from netbeans.org. You can download
a released version, download sources, or use CVS to download the current
-source tree. If you choose to download sources, follow directions from
+source tree. If you choose to download sources, follow directions from
netbeans.org on building NetBeans.
Depending on the version of NetBeans you download, you may need to do further
-work to get the required External Editor module. This is the module which lets
-NetBeans work with gvim (or xemacs :-). See http://externaleditor.netbeans.org
+work to get the required External Editor module. This is the module which lets
+NetBeans work with gvim (or xemacs :-). See http://externaleditor.netbeans.org
for details on downloading this module if your NetBeans release does not have
it.
-For C, C++, and Fortran support you will also need the cpp module. See
+For C, C++, and Fortran support you will also need the cpp module. See
http://cpp.netbeans.org for information regarding this module.
You can also download Sun ONE Studio from Sun Microsystems, Inc for a 30 day
-free trial. See http://www.sun.com for further details.
+free trial. See http://www.sun.com for further details.
==============================================================================
5. Preparing NetBeans for Vim *netbeans-preparation*
In order for NetBeans to work with vim, the NetBeans External Editor module
-must be loaded and enabled. If you have a Sun ONE Studio Enterprise Edition
-then this module should be loaded and enabled. If you have a NetBeans release
+must be loaded and enabled. If you have a Sun ONE Studio Enterprise Edition
+then this module should be loaded and enabled. If you have a NetBeans release
you may need to find another way of obtaining this open source module.
You can check if you have this module by opening the Tools->Options dialog
and drilling down to the "Modules" list (IDE Configuration->System->Modules).
If your Modules list has an entry for "External Editor" you must make sure
-it is enabled (the "Enabled" property should have the value "True"). If your
+it is enabled (the "Enabled" property should have the value "True"). If your
Modules list has no External Editor see the next section on |obtaining-exted|.
==============================================================================
6. Obtaining the External Editor Module *obtaining-exted*
-There are 2 ways of obtaining the External Editor module. The easiest way
+There are 2 ways of obtaining the External Editor module. The easiest way
is to use the NetBeans Update Center to download and install the module.
Unfortunately, some versions do not have this module in their update
-center. If you cannot download via the update center you will need to
-download sources and build the module. I will try and get the module
+center. If you cannot download via the update center you will need to
+download sources and build the module. I will try and get the module
available from the NetBeans Update Center so building will be unnecessary.
Also check http://externaleditor.netbeans.org for other availability options.
@@ -152,22 +152,22 @@ Assuming you have loaded and enabled the NetBeans External Editor module
as described in |netbeans-preparation| all you need to do is verify that
the gvim command line is properly configured for your environment.
-Open the Tools->Options dialog and open the Editing category. Select the
-External Editor. The right hand pane should contain a Properties tab and
-an Expert tab. In the Properties tab make sure the "Editor Type" is set
-to "Vim". In the Expert tab make sure the "Vim Command" is correct.
+Open the Tools->Options dialog and open the Editing category. Select the
+External Editor. The right hand pane should contain a Properties tab and
+an Expert tab. In the Properties tab make sure the "Editor Type" is set
+to "Vim". In the Expert tab make sure the "Vim Command" is correct.
-You should be careful if you change the "Vim Command". There are command
+You should be careful if you change the "Vim Command". There are command
line options there which must be there for the connection to be properly
-set up. You can change the command name but thats about it. If your gvim
-can be found by your $PATH then the VIM Command can start with "gvim". If
+set up. You can change the command name but that's about it. If your gvim
+can be found by your $PATH then the VIM Command can start with "gvim". If
you don't want gvim searched from your $PATH then hard code in the full
-Unix path name. At this point you should get a gvim for any source file
+Unix path name. At this point you should get a gvim for any source file
you open in NetBeans.
If some files come up in gvim and others (with different file suffixes) come
up in the default NetBeans editor you should verify the MIME type in the
-Expert tab MIME Type property. NetBeans is MIME oriented and the External
+Expert tab MIME Type property. NetBeans is MIME oriented and the External
Editor will only open MIME types specified in this property.
==============================================================================
@@ -194,7 +194,7 @@ Partial writes disallowed for NetBeans buffers
NetBeans connection lost for this buffer
NetBeans has become confused about the state of this file.
Rather than risc data corruption, NetBeans has severed the
- connection for this file. Vim will take over responsibility
+ connection for this file. Vim will take over responsibility
for saving changes to this file and NetBeans will no longer
know of these changes.
@@ -248,13 +248,13 @@ NetBeans (see http://externaleditor.netbeans.org). Later it was extended to
work with Agide (A-A-P GUI IDE, see http://www.a-a-p.org). The extensions are
marked with "version 2.1".
-Version 2.2 of the protocol has several minor changes which should only
-affect NetBeans users (ie, not Agide users). However, a bug was fixed which
-could cause confusion. The netbeans_saved() function sent a "save" protocol
-command. In protocol version 2.1 and earlier this was incorrectly interpreted
-as a notification that a write had taken place. In reality, it told NetBeans
-to save the file so multiple writes were being done. This caused various
-problems and has been fixed in 2.2. To decrease the likelihood of this
+Version 2.2 of the protocol has several minor changes which should only affect
+NetBeans users (ie, not Agide users). However, a bug was fixed which could
+cause confusion. The netbeans_saved() function sent a "save" protocol
+command. In protocol version 2.1 and earlier this was incorrectly interpreted
+as a notification that a write had taken place. In reality, it told NetBeans
+to save the file so multiple writes were being done. This caused various
+problems and has been fixed in 2.2. To decrease the likelihood of this
confusion happening again, netbeans_saved() has been renamed to
netbeans_save_buffer().
@@ -428,7 +428,7 @@ initDone Mark the buffer as ready for use. Implicitly makes the buffer
insertDone
Sent by NetBeans to tell vim an initial file insert is done.
- This triggers a read message being printed. Prior to version
+ This triggers a read message being printed. Prior to version
2.3, no read messages were displayed after opening a file.
New in version 2.3.
@@ -466,8 +466,8 @@ save Save the buffer when it was modified. The other side of the
New in version 2.2.
saveDone
- Sent by NetBeans to tell vim a save is done. This triggers
- a save message being printed. Prior to version 2.3, no save
+ Sent by NetBeans to tell vim a save is done. This triggers
+ a save message being printed. Prior to version 2.3, no save
messages were displayed after a save.
New in version 2.3.
@@ -539,7 +539,7 @@ showBalloon text
specialKeys
Map a set of keys (mostly function keys) to be passed back
- to NetBeans for processing. This lets NetBeans hotkeys be
+ to NetBeans for processing. This lets NetBeans hotkeys be
used from vim.
Implemented in version 2.3.
@@ -652,7 +652,7 @@ buttonRelease button lnum col
at the time of the release. Only for buffers that are owned
by NetBeans. This event is not sent if the button was
released while the mouse was in the status line or in a
- separator line. If col is less than 1 the button release was
+ separator line. If col is less than 1 the button release was
in the sign area.
New in version 2.2.
@@ -772,8 +772,8 @@ REJECT Not used.
*:nbkey*
:nbkey key Pass the key to NetBeans for processing
-Pass the key to NetBeans for hot-key processing. You should not need to use
-this command directly. However, NetBeans passes a list of hot-keys to Vim at
+Pass the key to NetBeans for hot-key processing. You should not need to use
+this command directly. However, NetBeans passes a list of hot-keys to Vim at
startup and when one of these keys is pressed, this command is generated to
send the key press back to NetBeans.
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 96abe9e3d..a3f7ca489 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 Mar 28
+*options.txt* For Vim version 7.0aa. Last change: 2005 Apr 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3209,8 +3209,8 @@ A jump table for the options with a short description can be found at |Q_op|.
't' Include tearoff menu items. Currently only works for Win32,
GTK+, and Motif 1.2 GUI.
- 'T' Include Toolbar. Currently only in Win32, GTK+, Motif, and
- Athena GUIs.
+ 'T' Include Toolbar. Currently only in Win32, GTK+, Motif, Photon
+ and Athena GUIs.
'r' Right-hand scrollbar is always present.
'R' Right-hand scrollbar is present when there is a vertically
@@ -5060,7 +5060,8 @@ A jump table for the options with a short description can be found at |Q_op|.
feature}
{not in Vi}
This is a comma-separated list of words that specifies how
- 'scrollbind' windows should behave.
+ 'scrollbind' windows should behave. 'sbo' stands for ScrollBind
+ Options.
The following words are available:
ver Bind vertical scrolling for 'scrollbind' windows
hor Bind horizontal scrolling for 'scrollbind' windows
@@ -5631,7 +5632,7 @@ A jump table for the options with a short description can be found at |Q_op|.
{not available when compiled without the |+syntax|
feature}
When on spell checking will be done. See |spell|.
- The languages used are specified with 'spelllang'.
+ The languages are specified with 'spelllang'.
*'spelllang'* *'spl'*
'spelllang' 'spl' string (default empty)
@@ -5644,8 +5645,8 @@ A jump table for the options with a short description can be found at |Q_op|.
set spelllang=en_us,nl
< This means both US English and Dutch words are recognized. Words that
are not recognized will be highlighted.
- When 'encoding' is set the word lists are loaded again. Thus it's a
- good idea to set 'spelllang' after setting 'encoding'.
+ When 'encoding' is set the word lists are reloaded. Thus it's a good
+ idea to set 'spelllang' after setting 'encoding'.
More info at |spell|.
*'splitbelow'* *'sb'* *'nosplitbelow'* *'nosb'*
diff --git a/runtime/doc/os_390.txt b/runtime/doc/os_390.txt
index 420260692..998a5532e 100644
--- a/runtime/doc/os_390.txt
+++ b/runtime/doc/os_390.txt
@@ -1,4 +1,4 @@
-*os_390.txt* For Vim version 7.0aa. Last change: 2003 Jun 03
+*os_390.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Ralf Schandl
@@ -12,17 +12,17 @@ This file contains the particulars for the z/OS UNIX version of Vim.
4. ASCII/EBCDIC dependent scripts |zOS-has-ebcdic|
5. XTerm Problems |zOS-xterm|
6. Motif Problems |zOS-Motif|
-7 Bugs |zOS-Bugs|
+7. Bugs |zOS-Bugs|
8. Known weaknesses |zOS-weaknesses|
9. Changes |zOS-changes|
DISCLAIMER: ~
-We are IBM employees, but IBM is not responsible for this port. This is our
+We are IBM employees, but IBM is not responsible for this port. This is our
private fun, and is provided in the hopes that it may be useful to others.
Please note that this software has NOT been submitted to any formal IBM
-testing and is published AS IS. Please do not contact IBM for support for this
-software, as it is not an official component of any IBM product. IT IS NOT
+testing and is published AS IS. Please do not contact IBM for support for this
+software, as it is not an official component of any IBM product. IT IS NOT
SUPPORTED, GUARANTEED, OR RELATED WHATSOEVER TO IBM.
Contributors: ~
@@ -60,22 +60,22 @@ Vim should compile, link, and run right out of the box on a standard IBM z/OS
UNIX mainframe. I've personally run it on z/OS V1R2 and V1R3 machines without
problems.
-Many changes had to be done to the code to port Vim to z/OS UNIX. As like
-most UNIX programs, Vim contained heavy ASCII dependencies. I might have
+Many changes had to be done to the code to port Vim to z/OS UNIX. As like
+most UNIX programs, Vim contained heavy ASCII dependencies. I might have
missed an ASCII dependency, or it is possible that a new one has been added
-with a feature or bug fix. Most programmers are simply not aware of possible
-ASCII/EBCDIC conversion issues. If you hit a problem that seems related to
+with a feature or bug fix. Most programmers are simply not aware of possible
+ASCII/EBCDIC conversion issues. If you hit a problem that seems related to
this, feel free to contact us at the email addresses above.
One indication of ASCII/EBCDIC conversion problems is screen corruption with
"unprintable" characters. For example, at one point the errorbell was broken
-in Vim. Any time Vim tried to ring the terminal bell an ASCII character 0x07
-would be printed. This works fine on most terminals, but is broken on an
-EBCDIC one. The correct solution was to define a different value for the bell
+in Vim. Any time Vim tried to ring the terminal bell an ASCII character 0x07
+would be printed. This works fine on most terminals, but is broken on an
+EBCDIC one. The correct solution was to define a different value for the bell
character on EBCDIC systems.
Remember, it's only possible to fix a bug if the community knows about it.
-Don't rely on someone else to report it! See the section |bug-reports|.
+Don't rely on someone else to report it! See the section |bug-reports|.
==============================================================================
3. Building VIM for z/OS UNIX *OS390-building* *zOS-building*
@@ -83,12 +83,12 @@ Don't rely on someone else to report it! See the section |bug-reports|.
A word on debugging code first: ~
The normal run of configure adds the flag '-g' to the compiler options,
-to include debugging information into the executable. This information
+to include debugging information into the executable. This information
are normally removed from the executable with the strip command during
-installation. On z/OS UNIX, it is not possible to remove this from
-the executable. The strip command exists on z/OS UNIX and is called
+installation. On z/OS UNIX, it is not possible to remove this from
+the executable. The strip command exists on z/OS UNIX and is called
during the installation, but it does nothing. It is equivalent to the
-'touch' command. This is due to the way debug symbols are stored in the
+'touch' command. This is due to the way debug symbols are stored in the
objects generated by the compiler.
If you want to build Vim without debugging code, export the environment
@@ -99,11 +99,11 @@ variable CFLAGS set to an empty string before you call the configure script.
Building without X11: ~
-Note: Use cc to build Vim. The c89 compiler has stricter syntax checking
+Note: Use cc to build Vim. The c89 compiler has stricter syntax checking
and will not compile Vim cleanly.
If you build VIM without X11 support, compiling and building is
-straightforward. Don't forget to export _CC_CCMODE=1 before calling
+straightforward. Don't forget to export _CC_CCMODE=1 before calling
configure and make.
>
$ export _CC_CCMODE=1
@@ -114,7 +114,7 @@ configure and make.
Test notes:
Test 11 will fail if you do not have gzip installed.
Test 42 will fail, as VIM on z/OS UNIX doesn't support the multibyte
- feature. (David Moore: "Doesn't work _yet_! :-) I'll see what I
+ feature. (David Moore: "Doesn't work _yet_! :-) I'll see what I
can do.")
>
@@ -123,8 +123,8 @@ configure and make.
Building with X11: ~
-There are two ways for building Vim with X11 support. You can link it
-statically with the X11 libraries or can bind it with the X11 DLLs. The
+There are two ways for building Vim with X11 support. You can link it
+statically with the X11 libraries or can bind it with the X11 DLLs. The
statically linked version results in a huge executable (~13MB), while the
dynamically linked executable is much smaller (~4.5MB).
@@ -137,7 +137,7 @@ Here is what you do, if you want Motif:
VIM is now linked statically with the X11 libraries.
b) Dynamic link:
- Make VIM as described for the static link. Then change the contents of
+ Make VIM as described for the static link. Then change the contents of
the 'auto/link.sed' file by appending: >
s%-lXm *%/usr/lib/Xm.x %g
s%-lX11 *%/usr/lib/X11.x %g
@@ -155,7 +155,7 @@ See the Makefile and the file link.sh on how link.sed is used.
==============================================================================
4. ASCII/EBCDIC dependent scripts *OS390-has-ebcdic* *zOS-has-ebcdic*
-For the internal script language the feature "ebcdic" was added. With this
+For the internal script language the feature "ebcdic" was added. With this
you can fix ASCII dependent scripts like this:
>
if has("ebcdic")
@@ -178,7 +178,7 @@ the screen with <C-L> or if you can't move to the left with the cursor key on
the command line, try adding >
:set t_le=^H
<
-to your .vimrc. Note: '^H' is one character, hit <C-V><C-H> to get it.
+to your .vimrc. Note: '^H' is one character, hit <C-V><C-H> to get it.
==============================================================================
6. Motif Problems *OS390-Motif* *zOS-Motif*
@@ -203,9 +203,9 @@ There is no solution for this as of yet.
8. Known weaknesses *OS390-weaknesses* *zOS-weaknesses*
- No binary search in tag files.
- The program /bin/sort sorts by ASCII value by default. This program is
- normally used by ctags to sort the tags. There might be a version of
- ctags out there, that does it right, but we can't be sure. So this seems to
+ The program /bin/sort sorts by ASCII value by default. This program is
+ normally used by ctags to sort the tags. There might be a version of
+ ctags out there, that does it right, but we can't be sure. So this seems to
be a permanent restriction.
- Multibyte support (utf-8) doesn't work, it's disabled at compile time.
@@ -246,10 +246,10 @@ not an exhaustive summary of all the modifications made to the code base.
screen corruption problems in gVim reported by Anthony Giorgio.
Anthony Giorgio updated this document:
- - Changed OS/390 to z/OS where appropriate. IBM decided to rename
+ - Changed OS/390 to z/OS where appropriate. IBM decided to rename
all of its servers and operating systems. z/OS and OS/390
are the same product, but the version numbering system was
- reset for the name change. (e.g. OS/390 V2R11 == z/OS V1R1)
+ reset for the name change (e.g. OS/390 V2R11 == z/OS V1R1).
- Added information about second edition of the Open Source Redbook.
- Moved Redbook information to a separate section.
- Various tweaks and changes.
@@ -265,16 +265,16 @@ not an exhaustive summary of all the modifications made to the code base.
6.0q (alpha):
Minor changes for nrformats=alpha (see |'nrformats'|).
- Problem with hard-coded keycode for the English pound sign. Added a define in
+ Problem with hard-coded keycode for the English pound sign. Added a define in
ascii.h
Disabled multibyte for EBCDIC in feature.h
6.0f (alpha):
- First compile of Vim 6 on z/OS UNIX. Some minor changes were needed.
+ First compile of Vim 6 on z/OS UNIX. Some minor changes were needed.
Finally found the reason why make from the top level didn't work (I must have
- been blind before!). The Makefile contained a list of targets in one target
- line. On all other UNIX's the macro $@ evaluates to the first target in this
+ been blind before!). The Makefile contained a list of targets in one target
+ line. On all other UNIX's the macro $@ evaluates to the first target in this
list, only on z/OS UNIX it evaluates to the last one :-(.
5.6-390d:
@@ -282,7 +282,7 @@ not an exhaustive summary of all the modifications made to the code base.
5.6-390c:
I grepped through the source and examined every spot with a character
- involved in a operation (+-). I hope I now found all EBCDIC/ASCII
+ involved in a operation (+-). I hope I now found all EBCDIC/ASCII
stuff, but ....
Fixed:
@@ -295,7 +295,7 @@ not an exhaustive summary of all the modifications made to the code base.
- fixed quick-access table in findoptions()
- fixed 'g^H' select mode
- fixed tgetstr() 'get terminal capability string', ESC and
- Ctrl chars where wrong. (Not used on OS/390 UNIX)
+ Ctrl chars where wrong. (Not used on OS/390 UNIX)
ctags:
@@ -311,13 +311,13 @@ not an exhaustive summary of all the modifications made to the code base.
- added special compiler and linker options if building with X11
- configure:
- after created via autoconf hand-edited it to make the test for
- ICEConnectionNumber work. This is a autoconf problem. OS/390 UNIX
+ ICEConnectionNumber work. This is a autoconf problem. OS/390 UNIX
needs -lX11 for this.
- Makefile
- Don't include the lib directories ('-L...') into the variable
- ALL_LIBS. Use own variable ALL_LIB_DIRS instead. A fully POSIX
+ ALL_LIBS. Use own variable ALL_LIB_DIRS instead. A fully POSIX
compliant compiler must not accept objects/libraries and options
- mixed. Now we can call the linker like this:
+ mixed. Now we can call the linker like this:
$(CC) $(LDFLAGS) $(ALL_LIB_DIRS) $(OBJ) $(ALL_LIBS)
diff --git a/runtime/doc/os_beos.txt b/runtime/doc/os_beos.txt
index d58966f49..0971f4f64 100644
--- a/runtime/doc/os_beos.txt
+++ b/runtime/doc/os_beos.txt
@@ -1,4 +1,4 @@
-*os_beos.txt* For Vim version 7.0aa. Last change: 2004 May 01
+*os_beos.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -31,11 +31,11 @@ matters not discussed in this file, Vim behaves very much like the Unix
1. General *beos-general*
The default syntax highlighting mostly works with different foreground colors
-to highlight items. This works best if you set your Terminal window to a
-darkish background and light letters. Some middle-grey background (for
+to highlight items. This works best if you set your Terminal window to a
+darkish background and light letters. Some middle-grey background (for
instance (r,g,b)=(168,168,168)) with black letters also works nicely. If you
use the default light background and dark letters, it may look better to
-simply reverse the notion of foreground and background color settings. To do
+simply reverse the notion of foreground and background color settings. To do
this, add this to your .vimrc file (where <Esc> may need to be replaced with
the escape character): >
@@ -48,7 +48,7 @@ the escape character): >
2. Compiling Vim *beos-compiling*
From the Advanced Access Preview Release (AAPR) on, Vim can be configured with
-the standard configure script. To get the compiler and its flags right, use
+the standard configure script. To get the compiler and its flags right, use
the following command-line in the shell (you can cut and paste it in one go):
CC=$BE_C_COMPILER CFLAGS="$BE_DEFAULT_C_FLAGS -O7" \
@@ -60,9 +60,9 @@ When configure has run, and you wish to enable GUI support, you must edit the
config.mk file so that the lines with GUI_xxx refer to $(BEOSGUI_xxx) instead
of $(NONE_xxx).
Alternatively you can make this change in the Makefile; it will have a
-more permanent effect. Search for "NONE_".
+more permanent effect. Search for "NONE_".
-After compilation you need to add the resources to the binary. Add the
+After compilation you need to add the resources to the binary. Add the
following few lines near the end (before the line with "exit $exit_value") of
the link.sh script to do this automatically.
@@ -81,12 +81,12 @@ You will need it when using "make install" to install Vim.
Now type "make" to compile Vim, then "make install" to install it.
If you want to install Vim by hand, you must copy Vim to $HOME/config/bin, and
-create a bunch of symlinks to it ({g,r,rg}{vim,ex,view}). Furthermore you must
-copy Vims configuration files to $HOME/config/share/vim:
+create a bunch of symlinks to it ({g,r,rg}{vim,ex,view}). Furthermore you must
+copy Vim's configuration files to $HOME/config/share/vim:
vim-5.0s/{*.vim,doc,syntax}. For completeness, you should also copy the nroff
-manual pages to $HOME/config/man/man1. Don't forget ctags/ctags and xxd/xxd!
+manual pages to $HOME/config/man/man1. Don't forget ctags/ctags and xxd/xxd!
-Obviously, you need the unlimited linker to actually link Vim. See
+Obviously, you need the unlimited linker to actually link Vim. See
http://www.metrowerks.com for purchasing the CodeWarrior compiler for BeOS.
There are currently no other linkers that can do the job.
@@ -97,7 +97,7 @@ you have the appropriate files installed. |beos-perl|
3. Timeout in the Terminal *beos-timeout*
Because some POSIX/UNIX features are still missing[1], there is no direct OS
-support for read-with-timeout in the Terminal. This would meat that you cannot
+support for read-with-timeout in the Terminal. This would mean that you cannot
use :mappings of more than one character, unless you also :set notimeout.
|'timeout'|
@@ -112,16 +112,16 @@ indistinctive character sequences.
These problems do not exist in the GUI.
[1]: there is no select() on file descriptors; also the termios VMIN and VTIME
-settings do not seem to work properly. This has been the case since DR7 at
+settings do not seem to work properly. This has been the case since DR7 at
least and still has not been fixed as of PR2.
*beos-unicode*
4. Unicode vs. Latin1 *beos-utf8*
BeOS uses Unicode and UTF-8 for text strings (16-bit characters encoded to
-8-bit characters). Vim assumes ISO-Latin1 or other 8-bit character codes.
-This does not produce the desired results for non-ASCII characters. Try the
-command :digraphs to see. If they look messed up, use :set isprint=@ to
+8-bit characters). Vim assumes ISO-Latin1 or other 8-bit character codes.
+This does not produce the desired results for non-ASCII characters. Try the
+command :digraphs to see. If they look messed up, use :set isprint=@ to
(slightly) improve the display of ISO-Latin1 characters 128-255. This works
better in the GUI, depending on which font you use (below).
@@ -133,32 +133,32 @@ You may also use the /boot/bin/xtou command to convert UTF-8 files from (xtou
Normally Vim starts with the GUI if you start it as gvim or vim -g. The BeOS
version tries to determine if it was started from the Tracker instead of the
-Terminal, and if so, use the GUI anyway. However, the current detection scheme
-is fooled if you use the command "vim - </dev/null" or "vim filename &". The
+Terminal, and if so, use the GUI anyway. However, the current detection scheme
+is fooled if you use the command "vim - </dev/null" or "vim filename &". The
latter can be called a feature but probably only works because there is no
BSD-style job control.
Stuff that does not work yet:
- Running external commands from the GUI does not work 100% (again due to lack
- of support for select()). There was a choice between seeing the command's
- output, or being able to interrupt it. I chose for seeing the output. Even
+ of support for select()). There was a choice between seeing the command's
+ output, or being able to interrupt it. I chose for seeing the output. Even
now the command sometimes crashes mysteriously, apparently in Be's
- malloc_internal() called from the putenv() function, after fork()ing. (data
- access exception occurred, ec01b0ec: 90e80000 *stw r7, 0x0000 (r8))(:!ls
- works usually, :r !ls usually doesn't). This has been reported as bug
+ malloc_internal() called from the putenv() function, after fork()ing. (data
+ access exception occurred, ec01b0ec: 90e80000 *stw r7, 0x0000 (r8)). (:!ls
+ works usually, :r !ls usually doesn't). This has been reported as bug
# 971215-083826.
- The window title.
- Starting the GUI from the Terminal version with :gui always acts as if
- :gui -f were used. There is no way to fix this that I can see.
+ :gui -f were used. There is no way to fix this that I can see.
- There are some small display glitches here and there that I hope to clean up
- later. Most of them occur when the window is partially obscured. Some of
+ later. Most of them occur when the window is partially obscured. Some of
them seem to be bugs in BeOS, because the Terminal has similar glitches.
-- Mouse up events are not generated when outside the window. This is a bug in
- BeOS. You can notice this when selecting text and moving the cursor outside
+- Mouse up events are not generated when outside the window. This is a bug in
+ BeOS. You can notice this when selecting text and moving the cursor outside
the window, then letting go of the mouse button. Another way is when you
drag the scrollbar and do the same thing. Because Vim still thinks you are
- still playing with the scrollbar it won't change it itself. I provided a
+ still playing with the scrollbar it won't change it itself. I provided a
workaround which kicks in when the window is activated or deactivated (so it
works best with focus- follows-mouse (/boot/bin/ffm) turned on).
- The cursor does not flash (very low priority; I'm not sure I even like it
@@ -172,7 +172,7 @@ The default value for $VIM is set at compile time and can be determined with >
:version
-The normal value is /boot/home/config/share/vim. If you don't like it you can
+The normal value is /boot/home/config/share/vim. If you don't like it you can
set the VIM environment variable to override this, or set 'helpfile' in your
.vimrc: >
@@ -189,7 +189,7 @@ session, unless you use the File Types application to set Vim to be "Single
Launch") or on the Vim window (starts editing the files). Dropping a folder
sets Vim's current working directory. |:cd| |:pwd| If you drop files or
folders with either SHIFT key pressed, Vim changes directory to the folder
-that contains the first item dropped. When starting Vim, there is no need to
+that contains the first item dropped. When starting Vim, there is no need to
press shift: Vim behaves as if you do.
Files dropped set the current argument list. |argument-list|
@@ -198,10 +198,10 @@ Files dropped set the current argument list. |argument-list|
8. Single Launch vs. Multiple Launch *beos-launch*
As distributed Vim's Application Flags (as seen in the FileTypes preference)
-are set to Multiple Launch. If you prefer, you can set them to Single Launch
+are set to Multiple Launch. If you prefer, you can set them to Single Launch
instead. Attempts to start a second copy of Vim will cause the first Vim to
-open the files instead. This works from the Tracker but also from the command
-line. In the latter case, non-file (option) arguments are not supported.
+open the files instead. This works from the Tracker but also from the command
+line. In the latter case, non-file (option) arguments are not supported.
NB: Only the GUI version has a BApplication (and hence Application Flags).
This section does not apply to the GUI-less version, should you compile one.
@@ -214,16 +214,16 @@ Set fonts with >
:set guifont=Courier10_BT/Roman/10
where the first part is the font family, the second part the style, and the
-third part the size. You can use underscores instead of spaces in family and
+third part the size. You can use underscores instead of spaces in family and
style.
-Best results are obtained with monospaced fonts (such as Courier). Vim
+Best results are obtained with monospaced fonts (such as Courier). Vim
attempts to use all fonts in B_FIXED_SPACING mode but apparently this does not
work for proportional fonts (despite what the BeBook says).
Vim also tries to use the B_ISO8859_1 encoding, also known as ISO Latin 1.
-This also does not work for all fonts. It does work for Courier, but not for
-ProFontISOLatin1/Regular (strangely enough). You can verify this by giving the >
+This also does not work for all fonts. It does work for Courier, but not for
+ProFontISOLatin1/Regular (strangely enough). You can verify this by giving the >
:digraphs
@@ -270,30 +270,30 @@ because the ALT (aka COMMAND) keys are not passed to applications.
Vim calls the various mouse buttons LeftMouse, MiddleMouse and RightMouse. If
you use the default Mouse preference settings these names indeed correspond to
-reality. Vim uses this mapping:
+reality. Vim uses this mapping:
Button 1 -> LeftMouse,
Button 2 -> RightMouse,
Button 3 -> MiddleMouse.
If your mouse has fewer than 3 buttons you can provide your own mapping from
-mouse clicks with modifier(s) to other mouse buttons. See the file
+mouse clicks with modifier(s) to other mouse buttons. See the file
vim-5.x/macros/swapmous.vim for an example. |gui-mouse-mapping|
12. Color names *beos-colors*
-Vim has a number of color names built-in. Additional names are read from the
-file $VIMRUNTIME/rgb.txt, if present. This file is basically the color
-database from X. Names used from this file are cached for efficiency.
+Vim has a number of color names built-in. Additional names are read from the
+file $VIMRUNTIME/rgb.txt, if present. This file is basically the color
+database from X. Names used from this file are cached for efficiency.
13. Compiling with Perl *beos-perl*
-Compiling with Perl support enabled is slightly tricky. The Metrowerks
-compiler has some strange ideas where to search for include files. Since
+Compiling with Perl support enabled is slightly tricky. The Metrowerks
+compiler has some strange ideas where to search for include files. Since
several include files with Perl have the same names as some Vim header
-files, the wrong ones get included. To fix this, run the following Perl
+files, the wrong ones get included. To fix this, run the following Perl
script while in the vim-5.0/src directory: >
preproc.pl > perl.h
diff --git a/runtime/doc/os_mac.txt b/runtime/doc/os_mac.txt
index 10fd08503..3db95ff7f 100644
--- a/runtime/doc/os_mac.txt
+++ b/runtime/doc/os_mac.txt
@@ -1,4 +1,4 @@
-*os_mac.txt* For Vim version 7.0aa. Last change: 2004 Dec 13
+*os_mac.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@@ -33,7 +33,7 @@ Indianapolis IN 46220 USA
==============================================================================
1. Filename Convention *mac-filename*
-You can use either the unix or mac path separator or a mix of both. In order
+You can use either the unix or mac path separator or a mix of both. In order
to determine if the specified filename is relative to the current folder or
absolute (i.e. relative to the "Desktop"), the following algorithm is used:
@@ -59,7 +59,7 @@ You can use the |$VIM| and |$VIMRUNTIME| variable. >
2. .vimrc and .vim files *mac-vimfile*
On the Mac files starting with a dot "." are discouraged, thus the rc files
-are named "vimrc" or "_vimrc" and "gvimrc" or "_gvimrc". These files can be in
+are named "vimrc" or "_vimrc" and "gvimrc" or "_gvimrc". These files can be in
any format (mac, dos or unix). Vim can handle any file format when the
|'nocompatible'| option is set, otherwise it will only handle mac format
files.
diff --git a/runtime/doc/os_mint.txt b/runtime/doc/os_mint.txt
index 979776e20..d84f6f566 100644
--- a/runtime/doc/os_mint.txt
+++ b/runtime/doc/os_mint.txt
@@ -1,4 +1,4 @@
-*os_mint.txt* For Vim version 7.0aa. Last change: 2001 Sep 03
+*os_mint.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Jens M. Felderhoff
@@ -15,12 +15,12 @@ The Unix behavior described in the documentation also refers to the
MiNT version of Vim unless explicitly stated otherwise.
For wildcard expansion of <~> (home directory) you need a shell that
-expands the tilde. The vanilla Bourne shell doesn't recognize it.
+expands the tilde. The vanilla Bourne shell doesn't recognize it.
With csh and ksh it should work OK.
The MiNT version of vim needs the termcap file /etc/termcap with the
-terminal capabilities of your terminal. Builtin termcaps are
-supported for the vt52 terminal. Termcap entries for the TOSWIN window
+terminal capabilities of your terminal. Builtin termcaps are
+supported for the vt52 terminal. Termcap entries for the TOSWIN window
manager and the virtual console terminals have been appended to the
termcap file that comes with the Vim distribution.
diff --git a/runtime/doc/os_msdos.txt b/runtime/doc/os_msdos.txt
index 3c749f0eb..057ef15eb 100644
--- a/runtime/doc/os_msdos.txt
+++ b/runtime/doc/os_msdos.txt
@@ -1,4 +1,4 @@
-*os_msdos.txt* For Vim version 7.0aa. Last change: 2004 Aug 31
+*os_msdos.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -97,7 +97,7 @@ write a file, and for filter commands. Or Vim runs out of memory, and random
problems may result.
The Dos32 version cannot have an unlimited number of files open at any one
-time. The limit depends on the setting of FILES in your CONFIG.SYS. This
+time. The limit depends on the setting of FILES in your CONFIG.SYS. This
defaults to 15; if you need to edit a lot of files, you should increase this.
If you do not set FILES high enough, you can get strange errors, and shell
commands may cause a crash!
@@ -241,7 +241,7 @@ In other versions, the following can be used.
How to copy/paste text from/to vim in a dos box:
-1) to get VIM to run in a window, instead of full screen, press alt+enter.
+1) To get VIM to run in a window, instead of full screen, press alt+enter.
This toggles back and forth between full screen and a dos window.
NOTE: In Windows 95 you must have the property "Fast Pasting" unchecked!
In the properties dialog box for the MS-DOS window, go to "MS-DOS
@@ -251,25 +251,25 @@ How to copy/paste text from/to vim in a dos box:
2) To paste something _into_ Vim, put Vim in insert mode.
-3) put the text you want to paste on the windows clipboard.
+3) Put the text you want to paste on the windows clipboard.
-4) Click the control box in the upper left of the Vim window. (This looks
- like a big minus sign). If you don't want to use the mouse, you can get
+4) Click the control box in the upper left of the Vim window. (This looks
+ like a big minus sign.) If you don't want to use the mouse, you can get
this with alt+spacebar.
-5) on the resulting dropdown menu choose "Edit"
-6) on the child dropdown menu choose "Paste"
+5) On the resulting dropdown menu choose "Edit".
+6) On the child dropdown menu choose "Paste".
To copy something from the Vim window to the clipboard,
-1) select the control box to get the control drop down menu.
-2) select "Edit".
-3) select "Mark"
-4) using either the keys or the mouse, select the part of the Vim window that
- you want to copy. To use the keys, use the arrow keys, and hold down shift
+1) Select the control box to get the control drop down menu.
+2) Select "Edit".
+3) Select "Mark".
+4) Using either the keys or the mouse, select the part of the Vim window that
+ you want to copy. To use the keys, use the arrow keys, and hold down shift
to extend the selection.
-5) when you've completed your selection, press 'enter.' The selection
- is now in the windows clipboard. By the way, this can be any
- rectangular selection, for example columns 4-25 in rows 7-10. It can
+5) When you've completed your selection, press 'enter'. The selection
+ is now in the windows clipboard. By the way, this can be any
+ rectangular selection, for example columns 4-25 in rows 7-10. It can
include anything in the VIM window: the output of a :!dir, for
example.
diff --git a/runtime/doc/os_os2.txt b/runtime/doc/os_os2.txt
index 3a4dd476f..539e0518a 100644
--- a/runtime/doc/os_os2.txt
+++ b/runtime/doc/os_os2.txt
@@ -1,4 +1,4 @@
-*os_os2.txt* For Vim version 7.0aa. Last change: 2004 Jan 09
+*os_os2.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Paul Slootman
@@ -28,19 +28,19 @@ that are started via a shell escape from within Vim. This specifically means
that Vim won't be able to remove the swap file(s) associated with buffers open
at the time the other program was started, until the other program is stopped.
At that time, the swap file may be removed, but if Vim could not do that the
-first time, it won't be removed at all. You'll get warnings that some other
+first time, it won't be removed at all. You'll get warnings that some other
Vim session may be editing the file when you start Vim up again on that file.
-This can be reproduced with ":!start epm". Now quit Vim, and start Vim again
+This can be reproduced with ":!start epm". Now quit Vim, and start Vim again
with the file that was in the buffer at the time epm was started. I'm working
on this!
A second problem is that Vim doesn't understand the situation when using it
when accessing the OS/2 system via the network, e.g. using telnet from a Unix
-system, and then starting Vim. The problem seems to be that OS/2 =sometimes=
+system, and then starting Vim. The problem seems to be that OS/2 =sometimes=
recognizes function / cursor keys, and tries to convert those to the
-corresponding OS/2 codes generated by the "normal" PC keyboard. I've been
+corresponding OS/2 codes generated by the "normal" PC keyboard. I've been
testing a workaround (mapping the OS/2 codes to the correct functions), but so
-far I can't say anything conclusive (this is on Warp 3, by the way). In the
+far I can't say anything conclusive (this is on Warp 3, by the way). In the
meantime any help will be appreciated.
@@ -52,12 +52,12 @@ is generally available as (ask Archie about it):
emxrt.zip emx runtime package
I've included a copy of emx.dll, which should be copied to one of the
-directories listed in your LIBPATH. Emx is GPL'ed, but the emx.dll library is
+directories listed in your LIBPATH. Emx is GPL'ed, but the emx.dll library is
not (read COPYING.EMX to find out what that means to you).
This emx.dll is from the emxfix04.zip package, which unfortunately has a bug,
eh, I mean a POSIX feature, in select(). Versions of Vim before 3.27 will
-appear to hang when starting (actually, while processing vimrc). Hit <Enter> a
+appear to hang when starting (actually, while processing vimrc). Hit <Enter> a
couple of times until Vim starts working if this happens. Next, get an up to
date version of Vim!
@@ -84,14 +84,14 @@ you get a tree of Vim files like this:
etc.
Note: .vimrc may also be called _vimrc to accommodate those who have chosen to
-install OS/2 on a FAT file system. Vim first tries to find .vimrc and if that
+install OS/2 on a FAT file system. Vim first tries to find .vimrc and if that
fails, looks for _vimrc in the same place. The existence of a .vimrc or
_vimrc file influences the 'compatible' options, which can have unexpected side
effects. See |'compatible'|.
If you're using network drives with OS/2, then you can install Vim on a
network drive (including .vimrc; this is then called the "system" vimrc file),
-and then use a personal copy of .vimrc (the "user" vimrc file). This should be
+and then use a personal copy of .vimrc (the "user" vimrc file). This should be
located in a directory indicated by the HOME environment variable.
@@ -135,14 +135,14 @@ TERMINAL SETTING
*os2ansi*
Use "os2ansi" as the TERM environment variable (or don't set it at all, as the
-default is the correct value). You can set term to os2ansi in the .vimrc, in
+default is the correct value). You can set term to os2ansi in the .vimrc, in
case you need TERM to be a different value for other applications. The
problem is that OS/2 ANSI emulation is quite limited (it doesn't have insert /
delete line, for example).
If you want to use a different value for TERM (because of other programs, for
example), make sure that the termcap entry for that TERM value has the
-appropriate key mappings. The termcap.dat distributed with emx does not always
+appropriate key mappings. The termcap.dat distributed with emx does not always
have them. Here are some suitable values to add to the termcap entry of your
choice; these allow the cursor keys and the named function keys (such as
pagedown) to work.
@@ -214,7 +214,7 @@ clipboard you would use: >
endif
This will ensure that only on OS/2 clipbrd is called whereas on other
-platforms vims build in mechanism is used. (To enable this functions on every
+platforms vims build in mechanism is used. (To enable this functions on every
load of Vim place the above lines in your .vimrc.)
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/os_qnx.txt b/runtime/doc/os_qnx.txt
index c0d1a4b32..90dde33f7 100644
--- a/runtime/doc/os_qnx.txt
+++ b/runtime/doc/os_qnx.txt
@@ -1,4 +1,4 @@
-*os_qnx.txt* For Vim version 7.0aa. Last change: 2004 Apr 23
+*os_qnx.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Julian Kinraid
@@ -22,7 +22,7 @@ Vim on QNX behaves much like other unix versions. |os_unix.txt|
2. Compiling Vim *qnx-compiling*
-Vim can be compiled using the standard configure/make approach. If you want to
+Vim can be compiled using the standard configure/make approach. If you want to
compile for X11, pass the --with-x option to configure. Otherwise, running
./configure without any arguments or passing --enable-gui=photon, will compile
vim with the Photon gui support. Run ./configure --help , to find out other
@@ -118,12 +118,12 @@ Known problems:
set noguipty
Bugs:
- - Still a slight problem with menu highlighting
+ - Still a slight problem with menu highlighting.
- When using phditto/phinows/etc., if you are using a font that
doesn't support the bold attribute, when vim attempts to draw
bold text it will be all messed up.
- The cursor can sometimes be hard to see.
- - A number of minor problems that can fixed :)
+ - A number of minor problems that can fixed. :)
Todo:
- Improve multi-language support.
diff --git a/runtime/doc/os_risc.txt b/runtime/doc/os_risc.txt
index 04f9ba551..77e555c57 100644
--- a/runtime/doc/os_risc.txt
+++ b/runtime/doc/os_risc.txt
@@ -1,4 +1,4 @@
-*os_risc.txt* For Vim version 7.0aa. Last change: 2004 May 01
+*os_risc.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Thomas Leonard
@@ -47,9 +47,9 @@ distribution, but modified slightly to work within the limits of ADFS, plus
some extra files such as the window templates.
User choices are read from `Choices:*' and are saved to `<Choices$Write>.*'.
-If you have the new !Boot structure then these should be set up already. If
+If you have the new !Boot structure then these should be set up already. If
not, set Choices$Path to a list of directories to search when looking for
-user configuration files. Set Choices$Write to the directory you want files
+user configuration files. Set Choices$Write to the directory you want files
to be saved into (so your search patterns and marks can be remembered between
sessions).
@@ -58,7 +58,7 @@ sessions).
2. Filename munging
All pathname munging is disabled by default, so Vim should behave like a
-normal RISC OS application now. So, if you want to edit `doc/html' then you
+normal RISC OS application now. So, if you want to edit `doc/html' then you
actually type `*vi doc/html'.
The only times munging is done is when:
@@ -66,7 +66,7 @@ The only times munging is done is when:
- Searching included files from C programs, since these are always munged.
See |[I|.
Note: make sure you are in the right directory when you use this
- command (ie the one with subdirectories 'c' and 'h').
+ command (i.e. the one with subdirectories 'c' and 'h').
- Sourcing files using |:so|.
Paths starting `$VIM/' are munged like this:
@@ -88,7 +88,7 @@ To use Vim from the command-line use the `*vi' command (or '*ex' for
Type `*vi -h' for a list of options.
Running the command-line version of Vim in a large high-color mode may cause
-the scrolling to be very slow. Either change to a mode with fewer colors or
+the scrolling to be very slow. Either change to a mode with fewer colors or
use the GUI version.
Also, holding down Ctrl will slow it down even more, and Ctrl-Shift will
@@ -115,7 +115,7 @@ The global clipboard is supported, so you can select some text and then
paste it directly into another application (provided it supports the
clipboard too).
-Clicking Menu now opens a menu like a normal RISC OS program. Hold down Shift
+Clicking Menu now opens a menu like a normal RISC OS program. Hold down Shift
when clicking Menu to paste (from the global clipboard).
Dragging a file to the window replaces the CURRENT buffer (the one with the
@@ -134,27 +134,27 @@ For fonts, you have the choice of the system font, an outline font, the system
font via ZapRedraw and any of the Zap fonts via ZapRedraw: >
:set guifont=
-< To use the system font via the VDU drivers. Supports
+< To use the system font via the VDU drivers. Supports
bold and underline.
>
:set guifont=Corpus.Medium
-< Use the named outline font. You can use any font, but
+< Use the named outline font. You can use any font, but
only monospaced ones like Corpus look right.
>
:set guifont=Corpus.Medium:w8:h12:b:i
< As before, but with size of 8 point by 12 point, and
in bold italic.
If only one of width and height is given then that
- value is used for both. If neither is given then 10
+ value is used for both. If neither is given then 10
point is used.
-Thanks to John Kortink, Vim can use the ZapRedraw module. Start the font name
+Thanks to John Kortink, Vim can use the ZapRedraw module. Start the font name
with '!' (or '!!' for double height), like this: >
:set guifont=!!
< Use the system font, but via ZapRedraw. This gives a
faster redraw on StrongARM processors, but you can't
- get bold or italic text. Double height.
+ get bold or italic text. Double height.
>
:set guifont=!script
< Uses the named Zap font (a directory in VimFont$Path).
@@ -164,12 +164,12 @@ with '!' (or '!!' for double height), like this: >
currently, but you can use any of the Zap fonts if
they are in VimFont$Path.
Vim will try to load font files '0', 'B', 'I' and 'IB'
- from the named directory. Only '0' (normal style) MUST
- be present. Link files are not currently supported.
+ from the named directory. Only '0' (normal style) MUST
+ be present. Link files are not currently supported.
Note that when using ZapRedraw the edit bar is drawn in front of the character
-you are on rather than behind it. Also redraw is incorrect for screen modes
-with eigen values of 0. If the font includes control characters then you can
+you are on rather than behind it. Also redraw is incorrect for screen modes
+with eigen values of 0. If the font includes control characters then you can
get Vim to display them by changing the 'isprint' option.
If you find the scrolling is too slow on your machine, try experimenting
@@ -199,8 +199,8 @@ It seems to work pretty well now, using '*vi -T ansi'.
If Vim crashes then the swap and backup files (if any) will be in the
directories set with the 'directory' and 'bdir' options. By default the swap
-files are in <Wimp$ScrapDir> (ie inside !Scrap) and backups are in the
-directory you were saving to. Vim will allow you to try and recover the file
+files are in <Wimp$ScrapDir> (i.e. inside !Scrap) and backups are in the
+directory you were saving to. Vim will allow you to try and recover the file
when you next try to edit it.
To see a list of swap files, press <F12> and type `*vi -r'.
@@ -223,13 +223,13 @@ command-line version, or press CTRL-C in the GUI version.
*riscos-memory*
8. Memory usage
-Vim will use dynamic areas on RISC OS 3.5 or later. If you can use them on
-older machines then edit the !RunTxt and GVim files. I don't know what UnixLib
+Vim will use dynamic areas on RISC OS 3.5 or later. If you can use them on
+older machines then edit the !RunTxt and GVim files. I don't know what UnixLib
does by default on these machines so I'm playing safe.
It doesn't work at all well without dynamic areas, since it can't change its
-memory allocation once running. Hence you should edit `!Vim.GVim' and
-`!Vim.!RunTxt' to choose the best size for you. You probably need at least
+memory allocation once running. Hence you should edit `!Vim.GVim' and
+`!Vim.!RunTxt' to choose the best size for you. You probably need at least
about 1400K.
==============================================================================
@@ -237,11 +237,11 @@ about 1400K.
9. Filetypes
You can now specify that autocommands are only executed for files of certain
-types. The filetype is given in the form &xxx, when xxx is the filetype.
+types. The filetype is given in the form &xxx, when xxx is the filetype.
-Filetypes must be specified by number (eg &fff for Text).
+Filetypes must be specified by number (e.g. &fff for Text).
-The system has changed from version 5.3. The new sequence of events is:
+The system has changed from version 5.3. The new sequence of events is:
- A file is loaded. |'osfiletype'| is set to the RISC OS filetype.
- Based on the filetype and pathname, Vim will try to set |'filetype'| to the
@@ -264,7 +264,7 @@ Some examples may make this clearer:
since many pathnames contain them.
- You can prefix the command with '~', which stops any output from being
- displayed. This also means that you don't have to press <Enter> afterwards,
+ displayed. This also means that you don't have to press <Enter> afterwards,
and stops the screen from being redrawn. {only in the GUI version}
==============================================================================
@@ -274,14 +274,14 @@ Some examples may make this clearer:
Downloading everything you need:
- Get the latest source distribution (see www.vim.org)
-- Get the runtime environment files (eg these help files)
+- Get the runtime environment files (e.g. these help files)
- Get the `extra' archive (contains the RISC OS specific bits)
- Get the RISC OS binary distribution (if possible)
Unarchiving:
-- Create a raFS disk and put the archives on it.
+- Create a raFS disk and put the archives on it
- Un-gzip them
- Un-tar them (*tar xELf 50 archive/tar)
@@ -289,9 +289,9 @@ Unarchiving:
Recompiling the sources:
- Create c, s, and h directories.
-- Put all the header files in 'h' \
-- Put all the C files in `c' | And lose the extensions
-- Put the assembler file (`swis/s') in 's' /
+- Put all the header files in 'h'. \
+- Put all the C files in `c'. | And lose the extensions
+- Put the assembler file (`swis/s') in 's'. /
- Rename all the files in `proto' to `h', like this:
raFS::VimSrc.source.proto.file/pro
becomes
@@ -300,9 +300,9 @@ Recompiling the sources:
.pro"
with
_pro.h"
-- Create a simple Makefile if desired and do '*make -k'
- Use 'CC = gcc -DRISCOS -DUSE_GUI -O2 -x c' in the Makefile
-- Save the binary as !Vim.Vim in the binary distribution
+- Create a simple Makefile if desired and do '*make -k'.
+ Use 'CC = gcc -DRISCOS -DUSE_GUI -O2 -x c' in the Makefile.
+- Save the binary as !Vim.Vim in the binary distribution.
Updating the run-time environment:
@@ -311,9 +311,9 @@ Updating the run-time environment:
new files.
- Remove files in `doc' not ending in `/txt', except for `tags'.
- Lose the extensions from the files in `doc'.
-- Edit the `doc.tags' file. Remove extensions from the second column: >
+- Edit the `doc.tags' file. Remove extensions from the second column: >
:%s/^\(.[^\t]*\t.*\)\.txt\t/\1\t/
-- Remove extensions from the syntax files. Split them into two directories
+- Remove extensions from the syntax files. Split them into two directories
to avoid the 77 entry limit on old ADFS filesystems.
- Edit `Vim:FileType' to match `*.c.*' as well as `*/c' and so on.
Add filetype checking too.
diff --git a/runtime/doc/os_vms.txt b/runtime/doc/os_vms.txt
index aab5a2407..8bb1b1c37 100644
--- a/runtime/doc/os_vms.txt
+++ b/runtime/doc/os_vms.txt
@@ -1,4 +1,4 @@
-*os_vms.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
+*os_vms.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
VIM REFERENCE MANUAL
@@ -69,32 +69,32 @@ See the file [.SRC]INSTALLVMS.TXT.
4. Problems *vms-problems*
The code has been tested under Open VMS 6.2 - 7.3 on Alpha and VAX platforms
-with the DECC compiler. It should work without bigger problems.
-If it happened that your system does not have some include libraries you can
-tune up in OS_VMS_CONF.H file.
+with the DEC C compiler. It should work without bigger problems.
+If your system does not have some include libraries you can tune up in
+OS_VMS_CONF.H file.
If you decided to build Vim with +perl, +python, etc. options, first you need
-to download OpenVMS distributions of Perl and Python. Build and deploy the
-libraries and change adequate lines in MAKE_VMS.MMS file. There should not be
-problem from Vim side.
+to download OpenVMS distributions of Perl and Python. Build and deploy the
+libraries and change adequate lines in MAKE_VMS.MMS file. There should not be
+a problem from Vim side.
-Note: Under VAX it should work with DEC C compiler without problem. VAXC
-compiler is not fully ANSI C compatible in pre-processor directives
-semantics, therefore you have to use a converter program what will do the
-lion part of the job. For detailed instruction read file INSTALLvms.txt
+Note: Under VAX it should work with the DEC C compiler without problems. The
+VAX C compiler is not fully ANSI C compatible in pre-processor directives
+semantics, therefore you have to use a converter program what will do the lion
+part of the job. For detailed instructions read file INSTALLvms.txt
-MMS_VIM.EXE is building together with VIM.EXE, but for XD.EXE you should
+MMS_VIM.EXE is build together with VIM.EXE, but for XD.EXE you should
change to subdirectory and build it separately.
-CTAGS is not part of Vim source distribution any more, however the OpenVMS
-specific source might contain CTAGS source files as it is described above.
+CTAGS is not part of the Vim source distribution anymore, however the OpenVMS
+specific source might contain CTAGS source files as described above.
You can find more information about CTAGS on VMS at
http://www.polarhome.com/ctags/
Advanced users may try some acrobatics in FEATURE.H file also.
It is possible to compile with +xfontset +xim options too, but then you have
-to set up GUI fonts etc. correctly. See. :help xim from Vim command prompt.
+to set up GUI fonts etc. correctly. See :help xim from Vim command prompt.
You may want to use GUI with GTK icons, then you have to download and install
GTK for OpenVMS or at least runtime shareable images - LIBGTK from
@@ -132,18 +132,18 @@ Use: >
define/nolog TMP device:[path.tmp]
to get vim.exe to find its document, filetype, and syntax files, and to
-specify a directory where temporary files will be located. Copy the "runtime"
+specify a directory where temporary files will be located. Copy the "runtime"
subdirectory of the vim distribution to vimruntime.
Logicals $VIMRUNTIME and $TMP are optional.
If $VIMRUNTIME is not set, Vim will guess and try to set up automatically.
-Read more about at :help runtime
+Read more about it at :help runtime
If $TMP is not set, you will not be able to use some functions as CTAGS,
XXD, printing etc. that use temporary directory for normal operation.
-$TMP directory should be readable and writable by the user(s).
-The easiest way to set up $TMP is to define logical: >
+The $TMP directory should be readable and writable by the user(s).
+The easiest way to set up $TMP is to define a logical: >
define/nolog TMP SYS$SCRATCH
or as: >
@@ -155,9 +155,9 @@ or as: >
Usually, you want to run just one version of Vim on your system, therefore
it is enough to dedicate one directory for Vim.
-Copy all Vim runtime directory structure to the deployment position.
+Copy the whole Vim runtime directory structure to the deployment position.
Add the following lines to your LOGIN.COM (in SYS$LOGIN directory).
-Set up logical $VIM as: >
+Set up the logical $VIM as: >
$ define VIM device:<path>
@@ -174,20 +174,20 @@ Please, check the notes for customization and configuration of symbols.
You may want to create .vimrc and .gvimrc files in your home directory
(SYS$LOGIN) to overwrite default settings.
-The easiest way is just rename example files. You may leave the menu file
-(MENU.VIM) and files vimrc and gvimrc in the original $VIM directory. It will
-be default setup for all users, and for users is enough just to have their
-own additions or resetting in home directory in files .vimrc and .gvimrc.
+The easiest way is just rename example files. You may leave the menu file
+(MENU.VIM) and files vimrc and gvimrc in the original $VIM directory. It will
+be default setup for all users, and for users it is enough just to have their
+own additions or resetting in their home directory in files .vimrc and .gvimrc.
It should work without problems.
-Note: Remember, system rc files (default for all users) does not have leading
-"." So, system rc files are: >
+Note: Remember, system rc files (default for all users) don't have a leading
+".". So, system rc files are: >
$VIM:vimrc
$VIM:gvimrc
$VIM:menu.vim
-and user's customized rc files are: >
+and user customized rc files are: >
sys$login:.vimrc
sys$login:.gvimrc
@@ -203,7 +203,7 @@ Example LOGIN.COM: >
Note: This set-up should be enough, if you are working on standalone server or
clustered environment, but if you want to use Vim as internode editor in
-DECNET environment, it will satisfy you as well.
+DECNET environment, it will satisfy as well.
You just have to define the "whole" path: >
$ define VIM "<server_name>[""user password""]::device:<path>"
@@ -214,10 +214,11 @@ as for example: >
$ define VIM "PLUTO::RF10:[UTIL.VIM]"
$ define VIM "PLUTO""ZAY mypass""::RF10:[UTIL.VIM]" ! if passwd required
-You can also use $VIMRUNTIME logical to point to proper version of Vim if you
-have installed more versions in the same time. If $VIMRUNTIME is not defined
-Vim will borrow value from $VIM logical. You can find more information about
-$VIMRUNTIME logical by typing :help runtime as a Vim command.
+You can also use the $VIMRUNTIME logical to point to the proper version of Vim
+if you have installed more versions at the same time. If $VIMRUNTIME is not
+defined Vim will borrow its value from the $VIM logical. You can find more
+information about the $VIMRUNTIME logical by typing :help runtime as a Vim
+command.
System administrators might want to set up a system wide Vim installation,
then add to the SYS$STARTUP:SYLOGICALS.COM >
@@ -231,38 +232,40 @@ and to the SYS$STARTUP:SYLOGIN.COM >
$ gv*im:== spawn/nowait/input=NLA0 mcr VIM:VIM.EXE -g -GEOMETRY 80x40
-It will set up normal Vim work environment for every user on the system.
+It will set up a normal Vim work environment for every user on the system.
==============================================================================
7. GUI mode questions *vms-gui*
-OpenVMS in a real mainframe OS, therefore even if it has a GUI console, most of
-the users does not use a native X/Window environment during normal operation.
-It is not possible to start Vim in GUI mode "just like that". But anyhow it is
-not too complicate either.
+OpenVMS is a real mainframe OS, therefore even if it has a GUI console, most
+of the users do not use a native X/Window environment during normal operation.
+It is not possible to start Vim in GUI mode "just like that". But anyhow it
+is not too complicated either.
-First of all: you will need an executable that is built with enabled GUI.
+First of all: you will need an executable that is built with the GUI enabled.
Second: you need to have installed DECW/Motif on your VMS server, otherwise
you will get errors that some shareable libraries are missing.
-Third: If you choose to run Vim with extra feature as GUI/GTK then you need
-GTK installation too or at least GTK runtime environment (LIBGTK etc.)
+Third: If you choose to run Vim with extra features such as GUI/GTK then you
+need a GTK installation too or at least a GTK runtime environment (LIBGTK
+etc.).
1) If you are working on the VMS X/Motif console:
Start Vim with the command: >
$ mc device:<path>VIM.EXE -g
<
- or type :gui as a command to the Vim command prompt. For more info :help gui
+ or type :gui as a command to the Vim command prompt. For more info :help
+ gui
-2) If you are working on other X/Window environment as Unix or some remote X
- VMS console. Set up display to your host with: >
+2) If you are working on some other X/Window environment like Unix or a remote
+ X VMS console. Set up display to your host with: >
$ set disp/create/node=<your IP address>/trans=<transport-name>
<
- and start Vim as in point 1. You can find more help in VMS documentation or
+ and start Vim as in point 1. You can find more help in VMS documentation or
type: help set disp in VMS prompt.
Examples: >
@@ -276,11 +279,11 @@ For more information type $help set disp in VMS prompt.
3) Another elegant solution is XDM if you have installed on OpenVMS box.
It is possible to work from XDM client as from GUI console.
-4) If you are working on MS Windows or other non X/Window environment
- You need to set up one X server and run Vim as in point 2.
- For MS Windows there are available free X servers as MIX , Omni X etc.
+4) If you are working on MS-Windows or some other non X/Window environment
+ you need to set up one X server and run Vim as in point 2.
+ For MS-Windows there are available free X servers as MIX , Omni X etc.,
as well as excellent commercial products as eXcursion or ReflectionX with
- built in DEC support.
+ built-in DEC support.
Please note, that executables without GUI are slightly faster during startup
then with enabled GUI in character mode. Therefore, if you do not use GUI
@@ -319,7 +322,7 @@ Read more in ch: 8.6 (Terminal problems).
8.2 Filters
-Vim supports filters; ie. if you have a sort program that can handle
+Vim supports filters, i.e., if you have a sort program that can handle
input/output redirection like Unix (<infile >outfile), you could use >
:map \s 0!'aqsort<CR>
@@ -333,19 +336,20 @@ Vim is saving files into a new file with the next higher file version
number, try these settings. >
:set nobackup " does not create *.*_ backup files
- :set nowritebackup " does not have any purpose on VMS. It's default.
+ :set nowritebackup " does not have any purpose on VMS. It's the
+ " default.
Recovery is working perfect as well from the default swap file.
Read more with :help swapfile
(Claude Marinier <ClaudeMarinier@xwavesolutions.com> Vim 5.5, Zoltan Arpadffy
-Vim 5.6 )
+Vim 5.6)
8.4 Directory conversion
Vim will internally convert any unix-style paths and even mixed unix/VMS
-paths into VMS style paths. Some typical conversions resemble:
+paths into VMS style paths. Some typical conversions resemble:
/abc/def/ghi -> abc:[def]ghi.
/abc/def/ghi.j -> abc:[def]ghi.j
@@ -377,9 +381,9 @@ example: >
Note: syntax is very important, otherwise VMS will recognize more parameters
instead of one (resulting with: file not found)
-2. Set up Vim as your internode editor. If Vim is not installed on your host,
-just set up your IP address, full Vim path including the server name and run
-the command procedure below: >
+2. Set up Vim as your internode editor. If Vim is not installed on your
+host, just set up your IP address, the full Vim path including the server name
+and run the command procedure below: >
$ if (p1 .eqs. "") .OR. (p2 .eqs. "") then goto usage
$ set disp/create/node=<your_IP_here>/trans=tcpip
@@ -392,8 +396,8 @@ the command procedure below: >
$ write sys$output " Example: @SETVIM.COM username passwd"
$ end:
-Note: Never use it in clustered environment (you do not need it), and load could
-be very-very slow, but even faster then a local Emacs. :-)
+Note: Never use it in a clustered environment (you do not need it), loading
+could be very-very slow, but even faster then a local Emacs. :-)
(Zoltan Arpadffy, Vim 5.6)
@@ -404,7 +408,7 @@ If your terminal name is not known to Vim and it is trying to find the default
one you will get the following message during start-up:
---
Terminal entry not found in termcap
-'unknown-terminal' not known. Available built-in terminals are:
+'unknown-terminal' not known. Available built-in terminals are:
builtin_gui
builtin_riscos
builtin_amiga
@@ -422,13 +426,13 @@ defaulting to 'vt320'
---
The solution is to define default terminal name: >
- $ ! unknown terminal name. let us use vt320 or ansi instead.
+ $ ! unknown terminal name. Let us use vt320 or ansi instead.
$ ! Note: it's case sensitive
$ define term "vt320"
Terminals from VT100 to VT320 (as V300, VT220, VT200 ) do not need any extra
-keyboard mappings. They should work perfect as they are, including arrows,
-Ins, Del buttons etc. Except Backspace in GUI mode. To solve it, add to
+keyboard mappings. They should work perfect as they are, including arrows,
+Ins, Del buttons etc., except Backspace in GUI mode. To solve it, add to
.gvimrc: >
inoremap <Del> <BS>
@@ -457,9 +461,9 @@ special commands to execute executables: >
MCR <path>filename <parameters>
OpenVMS users always have to be aware that the Vim command :! "just" drop them
-to DCL prompt. This feature is possible to use without any problem with all
+to DCL prompt. This feature is possible to use without any problem with all
DCL commands, but if we want to execute some program as XXD, CTAGS, JTAGS etc.
-we're running into trouble if we following the Vim documentation (see: help
+we're running into trouble if we follow the Vim documentation (see: help
xxd).
Solution: Execute with the MC command and add the full path to the executable.
@@ -470,9 +474,9 @@ Example: Instead of :%!xxd command use: >
... or in general: >
:!mc <path>filename <parameters>
-Note: You can use XXD, and CTAGS from GUI menu.
+Note: You can use XXD and CTAGS from GUI menu.
-To customize ctags it is possible to define logical $CTAGS with standard
+To customize ctags it is possible to define the logical $CTAGS with standard
parameters as: >
define/nolog CTAGS "--totals -o sys$login:tags"
@@ -488,7 +492,7 @@ documentation at http://ctags.sourceforge.net/ctags.html.
If you want to use your .vimrc and .gvimrc from other platforms (e.g. Windows)
you can get in trouble if you ftp that file(s): VMS has different end-of-line
indication.
-The symptom is that ViM is not sourcing your .vimrc/.gvimrc, even if you say:
+The symptom is that Vim is not sourcing your .vimrc/.gvimrc, even if you say:
>
:so sys$login:.vimrc
@@ -535,8 +539,8 @@ will be confused after a window-resize.
From 6.0 diff functionality has been implemented, but OpenVMS does not use
GNU/Unix like diff therefore built in diff does not work.
-There is a simple solution to solve this anomaly. Install an Unix like diff
-and Vim will work perfect in diff mode too. You just have to redefine your
+There is a simple solution to solve this anomaly. Install a Unix like diff
+and Vim will work perfect in diff mode too. You just have to redefine your
diff program as: >
define /nolog diff <GNU_PATH>diff.exe
@@ -551,16 +555,16 @@ boxes that is meant to solve GNU problems on OpenVMS.
8.12 diff-mode
Vim 6.0 and higher supports vim diff-mode (See |new-diff-mode|, |diff-mode|
-and |08.7|). This uses the external program 'diff' and expects a Unix-like
-output format from diff. The standard VMS diff has a different output
-format. To use vim on VMS in diff-mode, you need to:
+and |08.7|). This uses the external program 'diff' and expects a Unix-like
+output format from diff. The standard VMS diff has a different output
+format. To use vim on VMS in diff-mode, you need to:
1 Install a Unix-like diff program, e.g. GNU diff
2 Tell vim to use the Unix-like diff for diff-mode.
You can download GNU diff from the VIM-VMS website, it is one of the GNU
-tools in http://www.polarhome.com/vim/files/gnu_tools.zip. I suggest to
+tools in http://www.polarhome.com/vim/files/gnu_tools.zip. I suggest to
unpack it in a separate directory "GNU" and create a logical GNU: that
-points to that directory. e.g: >
+points to that directory, e.g: >
DEFINE GNU <DISK>:[<DIRECTORY>.BIN.GNU]
@@ -569,9 +573,9 @@ prompt: >
GDIFF :== $GNU:DIFF.EXE
-Now you need to tell vim to use the new diff program. Take the example
+Now you need to tell vim to use the new diff program. Take the example
settings from |diff-diffexpr| and change the call to the external diff
-program to the new diff on VMS. Add this to your .vimrc file: >
+program to the new diff on VMS. Add this to your .vimrc file: >
" Set up vimdiff options
if v:version >= 600
@@ -612,8 +616,8 @@ You can now compare files in 4 ways: >
8.13 Allow '$' in C keywords
-DEC C uses many identifiers with '$' in them. This is not allowed in ANSI C,
-and vim recognises the '$' as the end of the identifier. You can change this
+DEC C uses many identifiers with '$' in them. This is not allowed in ANSI C,
+and vim recognises the '$' as the end of the identifier. You can change this
with the |iskeyword|command.
Add this command to your .vimrc file: >
@@ -625,7 +629,7 @@ CS.VIM) and add this command: >
set iskeyword+=$
Now word-based commands, e.g. the '*'-search-command and the CTRL-]
-tag-lookup, work on the whole identifier. (Ctags on VMS also supports '$' in
+tag-lookup, work on the whole identifier. (Ctags on VMS also supports '$' in
C keywords since ctags version 5.1.)
( Coen Engelbarts, Vim 6.1)
@@ -633,8 +637,8 @@ C keywords since ctags version 5.1.)
8.14 VIMTUTOR for beginners
It exits VIMTUTOR.COM DCL script that can help Vim beginners to learn/make
-first steps with Vim on OpenVMS. Depending of binary distribution you may start
-it with: >
+first steps with Vim on OpenVMS. Depending of binary distribution you may
+start it with: >
@vim:vimtutor
diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt
index 3f202da1b..3d48b7728 100644
--- a/runtime/doc/pi_netrw.txt
+++ b/runtime/doc/pi_netrw.txt
@@ -177,16 +177,16 @@ by setting a variable (ex. scp uses the variable g:netrw_scp_cmd,
which is defaulted to "scp -q").
Ftp, an old protocol, seems to be blessed by numerous implementations.
-Unfortunately, some implementations are noisy (ie., add junk to the end
+Unfortunately, some implementations are noisy (i.e., add junk to the end
of the file). Thus, concerned users may decide to write a NetReadFixup()
function that will clean up after reading with their ftp. Some Unix systems
-(ie., FreeBSD) provide a utility called "fetch" which uses the ftp protocol
+(i.e., FreeBSD) provide a utility called "fetch" which uses the ftp protocol
but is not noisy and more convenient, actually, for <netrw.vim> to use.
Consequently, if "fetch" is executable, it will be used to do reads for
ftp://... (and http://...) . See |netrw-var| for more about this.
For rcp, scp, sftp, and http, one may use network-oriented file transfers
-transparently; ie.
+transparently; i.e.
>
vim rcp://[user@]machine/path
vim scp://[user@]machine/path
@@ -198,7 +198,7 @@ that file. Your ftp must be able to use the <.netrc> file on its own, however.
vim ftp://[user@]machine[[:#]portnumber]/path
<
However, ftp will often need to query the user for the userid and password.
-The latter will be done "silently"; ie. asterisks will show up instead of
+The latter will be done "silently"; i.e. asterisks will show up instead of
the actually-typed-in password. Netrw will retain the userid and password
for subsequent read/writes from the most recent transfer so subsequent
transfers (read/write) to or from that machine will take place without
@@ -625,7 +625,7 @@ NETRW BROWSER VARIABLES *netrw-browse-var*
g:netrw_timefmt specify format string to strftime() (%c)
g:netrw_winsize specify initial size of new o/v windows
-INTRODUCTION TO DIRECTORY BROWSING
+INTRODUCTION TO DIRECTORY BROWSING *file-explorer*
Netrw supports the browsing of directories on the local system and on remote
hosts, including generating listing directories, entering directories, editing
diff --git a/runtime/doc/print.txt b/runtime/doc/print.txt
index 42a609745..56fa49fab 100644
--- a/runtime/doc/print.txt
+++ b/runtime/doc/print.txt
@@ -1,4 +1,4 @@
-*print.txt* For Vim version 7.0aa. Last change: 2004 Jul 05
+*print.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -32,7 +32,7 @@ used.
printer.
On MS-Windows a dialog is displayed to allow selection
- of printer, paper size etc. To skip the dialog, use
+ of printer, paper size etc. To skip the dialog, use
the [!]. In this case the printer defined by
'printdevice' is used, or, if 'printdevice' is empty,
the system default printer.
@@ -65,7 +65,7 @@ the current window's 'wrap' or 'linebreak' settings. The "wrap" item in
'printoptions' can be used to switch wrapping off.
The current highlighting colors are used in the printout, with the following
considerations:
-1) The normal background is always rendered as white (i.e. blank paper.)
+1) The normal background is always rendered as white (i.e. blank paper).
2) White text or the default foreground is rendered as black, so that it shows
up!
3) If 'background' is "dark", then the colours are darkened to compensate for
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index d78aaa194..047938b3f 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 Mar 07
+*quickref.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1171,7 +1171,7 @@ Context-sensitive completion on the command-line:
|:xall| :xa[ll][!] or :wqall[!]
Write all changed buffers and exit
-|:stop| :st[op][!] Suspend VIM or start new shell. If 'aw' option
+|:stop| :st[op][!] Suspend VIM or start new shell. If 'aw' option
is set and [!] not given write the buffer.
|CTRL-Z| CTRL-Z Same as ":stop"
------------------------------------------------------------------------------
diff --git a/runtime/doc/rileft.txt b/runtime/doc/rileft.txt
index c7c53aaf0..b83dc54fe 100644
--- a/runtime/doc/rileft.txt
+++ b/runtime/doc/rileft.txt
@@ -1,4 +1,4 @@
-*rileft.txt* For Vim version 7.0aa. Last change: 2003 May 07
+*rileft.txt* For Vim version 7.0aa. Last change: 2005 Apr 04
VIM REFERENCE MANUAL by Avner Lottem
@@ -36,7 +36,7 @@ bidi and is merely opting to present a functional means to display/enter/use
right-to-left languages. An older hybrid solution in which direction is
encoded for every character (or group of characters) are not supported either
as this kind of support is out of the scope of a simple addition to an
-existing editor (and its not sanctioned by Unicode either).
+existing editor (and it's not sanctioned by Unicode either).
Highlights
diff --git a/runtime/doc/russian.txt b/runtime/doc/russian.txt
index 656c66e20..4d9d0368e 100644
--- a/runtime/doc/russian.txt
+++ b/runtime/doc/russian.txt
@@ -1,4 +1,4 @@
-*russian.txt* For Vim version 7.0aa. Last change: 2004 Dec 22
+*russian.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
VIM REFERENCE MANUAL by Vassily Ragosin
@@ -14,7 +14,7 @@ Russian language localization and support in Vim *russian* *Russian*
===============================================================================
1. Introduction *russian-intro*
-Russian language is supported perfectly well in Vim. You can type and view
+Russian language is supported perfectly well in Vim. You can type and view
Russian text just as any other, without the need to tweak the settings.
===============================================================================
@@ -28,8 +28,8 @@ example,
<
In the latter case, you can switch between languages even if you do not have
system Russian keyboard or independently from a system-wide keyboard settings.
-See 'keymap'. You can also map a key to switch between keyboards, if you
-choose the latter option. See |:map|.
+See 'keymap'. You can also map a key to switch between keyboards, if you
+choose the latter option. See |:map|.
For your convenience, to avoid switching between keyboards, when you need to
enter Normal mode command, you can also set 'langmap' option:
@@ -51,11 +51,11 @@ different codepages from
http://www.sourceforge.net/projects/ruvim/
Make sure that your Vim is at least 6.2.506 and use ruvim 0.5 or later for
-automatic installs. Vim also needs to be compiled with |+gettext| feature for
+automatic installs. Vim also needs to be compiled with |+gettext| feature for
user interface items translations to work.
After downloading an archive from RuVim project, unpack it into your
-$VIMRUNTIME directory. We recommend using UTF-8 archive, if your version of
+$VIMRUNTIME directory. We recommend using UTF-8 archive, if your version of
Vim is compiled with |+multi_byte| feature enabled.
In order to use the Russian documentation, make sure you have set the
@@ -66,7 +66,7 @@ In order to use the Russian documentation, make sure you have set the
-- If you are using Russian message translations in Win32 console, then
you may see the output produced by "vim --help", "vim --version" commands
- and Win32 console window title appearing in a wrong codepage. This problem
+ and Win32 console window title appearing in a wrong codepage. This problem
is related to a bug in GNU gettext library and may be fixed in the future
releases of gettext.
diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt
index b65b4e195..adeb7fc0f 100644
--- a/runtime/doc/sign.txt
+++ b/runtime/doc/sign.txt
@@ -1,4 +1,4 @@
-*sign.txt* For Vim version 7.0aa. Last change: 2004 May 22
+*sign.txt* For Vim version 7.0aa. Last change: 2005 Apr 04
VIM REFERENCE MANUAL by Gordon Prieur
@@ -18,19 +18,19 @@ Sign Support Features *sign-support*
When a debugger or other IDE tool is driving an editor it needs to be able
to give specific highlights which quickly tell the user useful information
-about the file. One example of this would be a debugger which had an icon
-in the left-hand column denoting a breakpoint. Another example might be an
-arrow representing the Program Counter (PC). The sign features allow both
+about the file. One example of this would be a debugger which had an icon
+in the left-hand column denoting a breakpoint. Another example might be an
+arrow representing the Program Counter (PC). The sign features allow both
placement of a sign, or icon, in the left-hand side of the window and
-definition of a highlight which will be applied to that line. Displaying the
+definition of a highlight which will be applied to that line. Displaying the
sign as an image is most likely only feasible in gvim (although Sun
-Microsystem's dtterm does support this its the only terminal emulator I know
+Microsystem's dtterm does support this it's the only terminal emulator I know
of which does). A text sign and the highlight should be feasible in any color
terminal emulator.
-Signs and highlights are not useful just for debuggers. Sun's Visual
+Signs and highlights are not useful just for debuggers. Sun's Visual
WorkShop uses signs and highlights to mark build errors and SourceBrowser
-hits. Additionally, the debugger supports 8 to 10 different signs and
+hits. Additionally, the debugger supports 8 to 10 different signs and
highlight colors. |workshop| Same for Netbeans |netbeans|.
There are two steps in using signs:
diff --git a/runtime/doc/tags b/runtime/doc/tags
index ecf5fcf42..c89e2b368 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -1584,6 +1584,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
45.3 usr_45.txt /*45.3*
45.4 usr_45.txt /*45.4*
45.5 usr_45.txt /*45.5*
+755 spell.txt /*755*
90.1 usr_90.txt /*90.1*
90.2 usr_90.txt /*90.2*
90.3 usr_90.txt /*90.3*
@@ -2129,6 +2130,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:mkexrc starting.txt /*:mkexrc*
:mks starting.txt /*:mks*
:mksession starting.txt /*:mksession*
+:mksp spell.txt /*:mksp*
+:mkspell spell.txt /*:mkspell*
:mkv starting.txt /*:mkv*
:mkvie starting.txt /*:mkvie*
:mkview starting.txt /*:mkview*
@@ -3688,10 +3691,12 @@ E748 repeat.txt /*E748*
E749 eval.txt /*E749*
E75 vi_diff.txt /*E75*
E750 repeat.txt /*E750*
-E751 spell.txt /*E751*
-E752 spell.txt /*E752*
-E753 spell.txt /*E753*
+E754 spell.txt /*E754*
+E756 spell.txt /*E756*
+E758 spell.txt /*E758*
+E759 spell.txt /*E759*
E76 pattern.txt /*E76*
+E760 spell.txt /*E760*
E77 message.txt /*E77*
E78 motion.txt /*E78*
E79 message.txt /*E79*
@@ -3998,6 +4003,7 @@ ZZ editing.txt /*ZZ*
[pattern] pattern.txt /*[pattern]*
[quotex] intro.txt /*[quotex]*
[range] cmdline.txt /*[range]*
+[s spell.txt /*[s*
[star motion.txt /*[star*
[z fold.txt /*[z*
[{ motion.txt /*[{*
@@ -4023,6 +4029,7 @@ ZZ editing.txt /*ZZ*
]i tagsrch.txt /*]i*
]m motion.txt /*]m*
]p change.txt /*]p*
+]s spell.txt /*]s*
]star motion.txt /*]star*
]z fold.txt /*]z*
]} motion.txt /*]}*
@@ -4579,6 +4586,7 @@ design-not develop.txt /*design-not*
design-speed-size develop.txt /*design-speed-size*
desktop-syntax syntax.txt /*desktop-syntax*
desktop.vim syntax.txt /*desktop.vim*
+develop-spell develop.txt /*develop-spell*
develop.txt develop.txt /*develop.txt*
development develop.txt /*development*
dh change.txt /*dh*
@@ -4808,6 +4816,7 @@ fcs_reason-variable eval.txt /*fcs_reason-variable*
feature-list eval.txt /*feature-list*
fetch pi_netrw.txt /*fetch*
file-browser-5.2 version5.txt /*file-browser-5.2*
+file-explorer pi_netrw.txt /*file-explorer*
file-formats editing.txt /*file-formats*
file-pattern autocmd.txt /*file-pattern*
file-read insert.txt /*file-read*
@@ -6219,8 +6228,12 @@ spec_chglog_release_info pi_spec.txt /*spec_chglog_release_info*
special-buffers windows.txt /*special-buffers*
speed-up tips.txt /*speed-up*
spell spell.txt /*spell*
+spell-affix-mbyte spell.txt /*spell-affix-mbyte*
+spell-affix-vim spell.txt /*spell-affix-vim*
spell-file-format spell.txt /*spell-file-format*
+spell-mkspell spell.txt /*spell-mkspell*
spell-quickstart spell.txt /*spell-quickstart*
+spell-wordlist-format spell.txt /*spell-wordlist-format*
spell.txt spell.txt /*spell.txt*
split() eval.txt /*split()*
splitfind windows.txt /*splitfind*
diff --git a/runtime/doc/tips.txt b/runtime/doc/tips.txt
index 917ab9c75..c4857a31d 100644
--- a/runtime/doc/tips.txt
+++ b/runtime/doc/tips.txt
@@ -1,4 +1,4 @@
-*tips.txt* For Vim version 7.0aa. Last change: 2005 Feb 23
+*tips.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -129,26 +129,26 @@ Switching screens in an xterm *xterm-screens* *xterm-save-screen*
:the same thing as each other for a given xterm setup.
They not necessarily do the same thing, as this may be a termcap vs.
-terminfo problem. You should be aware that there are two databases for
+terminfo problem. You should be aware that there are two databases for
describing attributes of a particular type of terminal: termcap and
-terminfo. This can cause differences when the entries differ AND when of
+terminfo. This can cause differences when the entries differ AND when of
the programs in question one uses terminfo and the other uses termcap
(also see |+terminfo|).
In your particular problem, you are looking for the control sequences
-^[[?47h and ^[[?47l. These switch between xterms alternate and main screen
-buffer. As a quick workaround a command sequence like >
+^[[?47h and ^[[?47l. These switch between xterms alternate and main screen
+buffer. As a quick workaround a command sequence like >
echo -n "^[[?47h"; vim ... ; echo -n "^[[?47l"
-may do what you want. (My notation ^[ means the ESC character, further down
+may do what you want. (My notation ^[ means the ESC character, further down
you'll see that the databases use \E instead).
On startup, vim echoes the value of the termcap variable ti (terminfo:
-smcup) to the terminal. When exiting, it echoes te (terminfo: rmcup). Thus
+smcup) to the terminal. When exiting, it echoes te (terminfo: rmcup). Thus
these two variables are the correct place where the above mentioned control
sequences should go.
Compare your xterm termcap entry (found in /etc/termcap) with your xterm
-terminfo entry (retrieved with /usr/5bin/infocmp -C xterm). Both should
+terminfo entry (retrieved with /usr/5bin/infocmp -C xterm). Both should
contain entries similar to: >
:te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:
@@ -339,7 +339,7 @@ be able to give comments to the parts of the mapping. >
(<> notation |<>|. Note that this is all typed literally. ^W is "^" "W", not
CTRL-W. You can copy/paste this into Vim if '<' is not included in
-'cpoptions')
+'cpoptions'.)
Note that the last comment starts with |", because the ":execute" command
doesn't accept a comment directly.
diff --git a/runtime/doc/usr_02.txt b/runtime/doc/usr_02.txt
index 7d3206b66..4a9a8d479 100644
--- a/runtime/doc/usr_02.txt
+++ b/runtime/doc/usr_02.txt
@@ -1,4 +1,4 @@
-*usr_02.txt* For Vim version 7.0aa. Last change: 2004 Jun 08
+*usr_02.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
VIM USER MANUAL - by Bram Moolenaar
@@ -425,7 +425,7 @@ the editor: "ZZ". This will only close the help window, not exit Vim.
As you read the help text, you will notice some text enclosed in vertical bars
(for example, |help|). This indicates a hyperlink. If you position the
cursor anywhere between the bars and press CTRL-] (jump to tag), the help
-system takes you to the indicated subject. (For reasons not discussed here,
+system takes you to the indicated subject. (For reasons not discussed here,
the Vim terminology for a hyperlink is tag. So CTRL-] jumps to the location
of the tag given by the word under the cursor.)
After a few jumps, you might want to go back. CTRL-T (pop tag) takes you
@@ -484,7 +484,7 @@ example, use the following command: >
The table with all mode prefixes can be found here: |help-context|.
-Special keys are enclosed in angle brackets. To find help on the up-arrow key
+Special keys are enclosed in angle brackets. To find help on the up-arrow key
in Insert mode, for instance, use this command: >
:help i_<Up>
diff --git a/runtime/doc/usr_03.txt b/runtime/doc/usr_03.txt
index 8ff6c392f..1690e79aa 100644
--- a/runtime/doc/usr_03.txt
+++ b/runtime/doc/usr_03.txt
@@ -1,4 +1,4 @@
-*usr_03.txt* For Vim version 7.0aa. Last change: 2005 Feb 08
+*usr_03.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
VIM USER MANUAL - by Bram Moolenaar
@@ -332,7 +332,7 @@ the <Left> and <Right> cursor keys when necessary.
Pressing <Enter> executes the command.
Note:
- The characters .*[]^%/\?~$ have special meaning. If you want to use
+ The characters .*[]^%/\?~$ have special meanings. If you want to use
them in a search you must put a \ in front of them. See below.
To find the next occurrence of the same string use the "n" command. Use this
diff --git a/runtime/doc/usr_08.txt b/runtime/doc/usr_08.txt
index fef83987e..cee90dca3 100644
--- a/runtime/doc/usr_08.txt
+++ b/runtime/doc/usr_08.txt
@@ -1,4 +1,4 @@
-*usr_08.txt* For Vim version 7.0aa. Last change: 2004 Jun 04
+*usr_08.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
VIM USER MANUAL - by Bram Moolenaar
@@ -52,7 +52,7 @@ the bottom one the code that uses these variables.
The CTRL-W w command can be used to jump between the windows. If you are in
the top window, CTRL-W w jumps to the window below it. If you are in the
-bottom window it will jump to the first window. (CTRL-W CTRL-W does the same
+bottom window it will jump to the first window. (CTRL-W CTRL-W does the same
thing, in case you let go of the CTRL key a bit later.)
diff --git a/runtime/doc/usr_09.txt b/runtime/doc/usr_09.txt
index 8d97b186a..739aec53b 100644
--- a/runtime/doc/usr_09.txt
+++ b/runtime/doc/usr_09.txt
@@ -1,4 +1,4 @@
-*usr_09.txt* For Vim version 7.0aa. Last change: 2001 Sep 03
+*usr_09.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
VIM USER MANUAL - by Bram Moolenaar
@@ -129,7 +129,7 @@ select text in a standard manner. The X Window system also has a standard
system for using the mouse. Unfortunately, these two standards are not the
same.
Fortunately, you can customize Vim. You can make the behavior of the mouse
-work like an X Window system mouse or a Microsoft Windows mouse. The following
+work like an X Window system mouse or a Microsoft Windows mouse. The following
command makes the mouse behave like an X Window mouse: >
:behave xterm
diff --git a/runtime/doc/usr_10.txt b/runtime/doc/usr_10.txt
index 9e536d541..aa8f92f97 100644
--- a/runtime/doc/usr_10.txt
+++ b/runtime/doc/usr_10.txt
@@ -1,4 +1,4 @@
-*usr_10.txt* For Vim version 7.0aa. Last change: 2005 Mar 15
+*usr_10.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
VIM USER MANUAL - by Bram Moolenaar
@@ -700,7 +700,7 @@ as input. The output of this command then replaces the selected block.
Because this summarizes badly if you are unfamiliar with UNIX filters, take
a look at an example. The sort command sorts a file. If you execute the
following command, the unsorted file input.txt will be sorted and written to
-output.txt. (This works on both UNIX and Microsoft Windows.) >
+output.txt. (This works on both UNIX and Microsoft Windows.) >
sort <input.txt >output.txt
diff --git a/runtime/doc/usr_21.txt b/runtime/doc/usr_21.txt
index b5484e908..4af286a55 100644
--- a/runtime/doc/usr_21.txt
+++ b/runtime/doc/usr_21.txt
@@ -1,4 +1,4 @@
-*usr_21.txt* For Vim version 7.0aa. Last change: 2004 Oct 10
+*usr_21.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
VIM USER MANUAL - by Bram Moolenaar
@@ -120,7 +120,7 @@ looks like this: >
:set viminfo='1000
The f option controls whether global marks (A-Z and 0-9) are stored. If this
-option is 0, none are stored. If it is 1 or you do not specify an f option,
+option is 0, none are stored. If it is 1 or you do not specify an f option,
the marks are stored. You want this feature, so now you have this: >
:set viminfo='1000,f1
@@ -199,7 +199,7 @@ work and pick up where you left off the next day. You can do this by saving
your editing session and restoring it the next day.
A Vim session contains all the information about what you are editing.
This includes things such as the file list, window layout, global variables,
-options and other information. (Exactly what is remembered is controlled by
+options and other information. (Exactly what is remembered is controlled by
the 'sessionoptions' option, described below.)
The following command creates a session file: >
diff --git a/runtime/doc/usr_22.txt b/runtime/doc/usr_22.txt
index b18b085a7..1506950be 100644
--- a/runtime/doc/usr_22.txt
+++ b/runtime/doc/usr_22.txt
@@ -1,4 +1,4 @@
-*usr_22.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
+*usr_22.txt* For Vim version 7.0aa. Last change: 2005 Apr 10
VIM USER MANUAL - by Bram Moolenaar
@@ -291,7 +291,7 @@ shorter to type: >
The output could look like this:
1 #h "help.txt" line 62 ~
- 2 %l+ "usr_21.txt" line 1 ~
+ 2 %a+ "usr_21.txt" line 1 ~
3 "usr_toc.txt" line 1 ~
The first column contains the buffer number. You can use this to edit the
@@ -303,7 +303,7 @@ and the line number where the cursor was the last time.
u Buffer is unlisted |unlisted-buffer|.
% Current buffer.
# Alternate buffer.
- l Buffer is loaded and displayed.
+ a Buffer is loaded and displayed.
h Buffer is loaded but hidden.
= Buffer is read-only.
- Buffer is not modifiable, the 'modifiable' option is off.
diff --git a/runtime/doc/usr_24.txt b/runtime/doc/usr_24.txt
index 76274d1f5..b916aa85f 100644
--- a/runtime/doc/usr_24.txt
+++ b/runtime/doc/usr_24.txt
@@ -1,4 +1,4 @@
-*usr_24.txt* For Vim version 7.0aa. Last change: 2003 Aug 18
+*usr_24.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
VIM USER MANUAL - by Bram Moolenaar
@@ -104,7 +104,7 @@ Vim do that use this command: >
When you now type a text like "(example)", as soon as you type the ) Vim will
briefly move the cursor to the matching (, keep it there for half a second,
and move back to where you were typing.
- In case there is not matching (, Vim will beep. Then you know that you
+ In case there is no matching (, Vim will beep. Then you know that you
might have forgotten the ( somewhere, or typed a ) too many.
The match will also be shown for [] and {} pairs. You don't have to wait
with typing the next character, as soon as Vim sees it the cursor will move
diff --git a/runtime/doc/usr_25.txt b/runtime/doc/usr_25.txt
index cce72faaf..fce1931ef 100644
--- a/runtime/doc/usr_25.txt
+++ b/runtime/doc/usr_25.txt
@@ -1,4 +1,4 @@
-*usr_25.txt* For Vim version 7.0aa. Last change: 2003 Jun 21
+*usr_25.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
VIM USER MANUAL - by Bram Moolenaar
@@ -198,7 +198,7 @@ command: >
:runtime macros/justify.vim
-This Vim script file defines a new visual command "_j". To justify a block of
+This Vim script file defines a new visual command "_j". To justify a block of
text, highlight the text in Visual mode and then execute "_j".
Look in the file for more explanations. To go there, do "gf" on this name:
$VIMRUNTIME/macros/justify.vim.
diff --git a/runtime/doc/usr_42.txt b/runtime/doc/usr_42.txt
index b560d6b64..bbf06e54e 100644
--- a/runtime/doc/usr_42.txt
+++ b/runtime/doc/usr_42.txt
@@ -1,4 +1,4 @@
-*usr_42.txt* For Vim version 7.0aa. Last change: 2002 Oct 08
+*usr_42.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
VIM USER MANUAL - by Bram Moolenaar
@@ -109,7 +109,7 @@ Thus each name in {menu-item} has its priority number.
SPECIAL CHARACTERS
-The {menu-item} in this example is "&File.&Save<Tab>:w". This brings up an
+The {menu-item} in this example is "&File.&Save<Tab>:w". This brings up an
important point: {menu-item} must be one word. If you want to put a dot,
space or tabs in the name, you either use the <> notation (<Space> and <Tab>,
for instance) or use the backslash (\) escape. >
diff --git a/runtime/doc/usr_44.txt b/runtime/doc/usr_44.txt
index 021c41e23..edadbfbe3 100644
--- a/runtime/doc/usr_44.txt
+++ b/runtime/doc/usr_44.txt
@@ -1,4 +1,4 @@
-*usr_44.txt* For Vim version 7.0aa. Last change: 2002 Oct 10
+*usr_44.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
VIM USER MANUAL - by Bram Moolenaar
@@ -550,7 +550,7 @@ before the top of the screen: >
If it cannot figure out where it is in that space, it starts looking farther
and farther back until it figures out what to do. But it looks no farther
-back than 500 lines. (A large "maxlines" slows down processing. A small one
+back than 500 lines. (A large "maxlines" slows down processing. A small one
might cause synchronization to fail.)
To make synchronizing go a bit faster, tell Vim which syntax items can be
skipped. Every match and region that only needs to be used when actually
diff --git a/runtime/doc/version5.txt b/runtime/doc/version5.txt
index bc2f45ef5..43816b86a 100644
--- a/runtime/doc/version5.txt
+++ b/runtime/doc/version5.txt
@@ -1,4 +1,4 @@
-*version5.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
+*version5.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -562,11 +562,11 @@ New options *added-options*
'hlsearch' Highlight all matches with the last used search pattern.
-'hkmapp' Phonetic Hebrew mapping (Ilya Dogolazky).
+'hkmapp' Phonetic Hebrew mapping. (Ilya Dogolazky)
-'iconstring' Define the name of the icon, when not empty. (version 5.2: the
+'iconstring' Define the name of the icon, when not empty. (Version 5.2: the
string is used literally, a newline can be used to make two
- lines).
+ lines.)
'lazyredraw' Don't redraw the screen while executing macros, registers or
other not typed commands.
@@ -591,9 +591,9 @@ New options *added-options*
changing the value of 'tabstop'. Makes it more easy to keep
'ts' at 8, while still getting four spaces for a <Tab>.
-'titlestring' String for the window title, when not empty. (version 5.2:
+'titlestring' String for the window title, when not empty. (Version 5.2:
this string is used literally, a newline can be used to make
- two lines).
+ two lines.)
'verbose' Level of verbosity. Makes it possible to show which .vimrc,
.exrc, .viminfo files etc. are used for initializing. Also
@@ -728,7 +728,7 @@ Autocommands:
- VimLeave autocommands are executed after writing the viminfo file, instead
of before. |VimLeave|
- Allow changing autocommands while executing them. This allows for
- self-modifying autocommands. (idea from Goldberg)
+ self-modifying autocommands. (idea from Goldberg)
- When using autocommands with two or more patterns, could not split
":if/:endif" over two lines. Now all matching autocommands are executed in
one do_cmdline().
@@ -1046,7 +1046,7 @@ in the wrong line and the window to be scrolled (Acevedo).
After ":set all&", 'lines' and 'ttytype' were still non-default, because the
defaults never got set. Now the defaults for 'lines' and 'columns' are set
-after detecting the window size. 'term' and 'ttytype' defaults are set when
+after detecting the window size. 'term' and 'ttytype' defaults are set when
detecting the terminal type.
For (most) non-Unix systems, don't add file names with illegal characters when
@@ -1357,7 +1357,7 @@ caused various errors and a crash.
DJGPP version could not save long lines (>64000) for undo.
"yw" on the last char in the file didn't work. Also fixed "6x" at the end of
-the line. "6X" at the start of a line fails, but does not break a mapping. In
+the line. "6X" at the start of a line fails, but does not break a mapping. In
general, a movement for an operator doesn't beep or flush a mapping, but when
there is nothing to operate on it beeps (this is Vi compatible).
@@ -1777,7 +1777,7 @@ Added "g]" to always do ":tselect" for the ident under the cursor.
Added ":tjump" and ":stjump" commands.
Improved listing of ":tselect" when tag names are a bit long.
-Included patches for the Macintosh version. Also for Python interface.
+Included patches for the Macintosh version. Also for Python interface.
(St-Amant)
":buf foo" now also restores cursor column, when the buffer was used before.
@@ -2070,7 +2070,7 @@ a printable character replaces the selection.
- Added 'mousemodel' option: Change use of mouse buttons.
- Added 'keymodel' option: tells to use shifted special keys to start a
Visual or Select mode selection.
-- Added ":behave". Can be used to quickly set 'selectmode', 'mousemodel'
+- Added ":behave". Can be used to quickly set 'selectmode', 'mousemodel'
and 'keymodel' for MS-Windows and xterm behavior.
- The xterm-like selection is now called modeless selection.
- Visual mode mappings and menus are used in Select mode. They automatically
@@ -2150,7 +2150,7 @@ New functions *new-functions-5.2*
|browse()| puts up a file requester when available. (Negri)
|escape()| escapes characters in a string with a backslash.
|fnamemodify()| modifies a file name.
-|input()| asks the user to enter a line. (Aaron) There is a separate
+|input()| asks the user to enter a line. (Aaron) There is a separate
history for lines typed for the input() function.
|argc()|
|argv()| can be used to access the argument list.
@@ -2394,7 +2394,7 @@ events. Makes cursor blinking work for Terhaar, breaks it for me.
Non-text in ":list" output is highlighted with NonText.
-Added text objects: "i(" and "i)" as synonym for "ib". "i{" and "i}" as
+Added text objects: "i(" and "i)" as synonym for "ib". "i{" and "i}" as
synonym for "iB". New: "i<" and "i>", to select <thing>. All this also for
"a" objects.
@@ -2607,7 +2607,7 @@ Graceful handling of NULLs in drag-dropped file list. Handle passing NULL to
Fullname_save(). (Negri)
Win32: ":!start" to invoke a program without opening a console, swapping
-screens, or waiting for completion in either console or gui version. e.g. you
+screens, or waiting for completion in either console or gui version, e.g. you
can type ":!start winfile". ALSO fixes "can't delete swapfile after spawning
a shell" bug. (enhancement of Aaron patch) (Negri)
@@ -3783,7 +3783,7 @@ Macintosh: (St-Amant)
- Weak-linking of Python 1.5.1 (only on PPC). Python is supported when the
library is available.
- If an error is encountered when sourcing the users .vimrc, the alert box now
- shows right away with the OK button defaulted. There's no more "Delete"-key
+ shows right away with the OK button defaulted. There's no more "Delete"-key
sign at the start of each line
- Better management of environment variables. Now $VIM is calculated only
once, not regenerated every time it is used.
@@ -4067,7 +4067,7 @@ Various XIM and multi-byte fixes:
- Fix user cannot see his language while he is typing his language with
off-the-spot method. (Nagano)
- Fix preedit position using text/edit area (using gui.wid). (Nagano)
-- remove 'fix dead key' codes. It was needed since XNFocusWindow was
+- remove 'fix dead key' codes. It was needed since XNFocusWindow was
"x11_window", XNFocusWindow is now gui.wid. (Nagano)
- Remove some compile warnings and fix typos. (Namsh)
- For status area, check the gtk+ version while Vim runs. I believe it is
@@ -4783,7 +4783,7 @@ translated to "}" before the shell got it. Now don't remove backslashes when
wildcards are going to be expanded.
Unix: ":e /tmp/$uid" didn't work. When expanding environment variables in a
-file name doesn't work, use the shell to expand the file name. ":e /tmp/$tty"
+file name doesn't work, use the shell to expand the file name. ":e /tmp/$tty"
still doesn't work though.
"make test" didn't always work on DOS/Windows for test30, because it depended
diff --git a/runtime/doc/version6.txt b/runtime/doc/version6.txt
index 1712754a7..6de0af7fc 100644
--- a/runtime/doc/version6.txt
+++ b/runtime/doc/version6.txt
@@ -1,4 +1,4 @@
-*version6.txt* For Vim version 7.0aa. Last change: 2005 Jan 26
+*version6.txt* For Vim version 7.0aa. Last change: 2005 Apr 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -956,7 +956,7 @@ Use "--remote" to have files be edited in an already running Vim.
Use "--remote-wait" to do the same and wait for the editing to finish.
Use "--remote-send" to send commands from one Vim to another.
Use "--remote-expr" to have an expression evaluated in another Vim.
-Use "--serverlist" to list the currently available Vim servers. (X only)
+Use "--serverlist" to list the currently available Vim servers. (X only)
There are also functions to communicate between the server and the client.
|remote_send()| |remote_expr()|
@@ -1055,7 +1055,7 @@ window). This makes it easy to navigate through the error list.
- |:cwindow| takes care that there is a quickfix window only when there are
recognized errors. (Dan Sharp)
-- Quickfix also knows "info", next to "warning" and "error" types. "%I" can be
+- Quickfix also knows "info", next to "warning" and "error" types. "%I" can be
used for the start of a multi-line informational message. (Tony Leneis)
- The "%p" argument can be used in 'errorformat' to get the column number from
a line where "^" points to the column. (Stefan Roemer)
@@ -1144,7 +1144,7 @@ The View also contains the local argument list and manually created, opened
and closed folds.
Added the ":loadview" command and the 'viewdir' option: Allows for saving and
-restoring views of a file with simple commands. ":mkview 1" saves view 1 for
+restoring views of a file with simple commands. ":mkview 1" saves view 1 for
the current file, ":loadview 1" loads it again. Also allows quickly switching
between two views on one file. And saving and restoring manual folds and the
folding state.
@@ -3303,7 +3303,7 @@ open the GUI window early to be able to display the messages and pop up the
dialog.
"r<CR>" on a multi-byte character deleted only the first byte of the
-character. "3r<CR>" deleted three bytes instead of three characters.
+character. "3r<CR>" deleted three bytes instead of three characters.
When interrupting reading a file, Vi considers the buffer modified. Added the
'i' flag in 'cpoptions' flag for this (we don't want it modified to be able to
@@ -3830,7 +3830,7 @@ Problem: VMS: Printing doesn't work, the file is deleted too quickly.
No longer need the VMS specific printing menu.
gethostname() is not available with VAXC.
The makefile was lacking selection of the tiny-huge feature set.
-Solution: Adjust the 'printexpr' option default. Fix the other problems and
+Solution: Adjust the 'printexpr' option default. Fix the other problems and
update the documentation. (Zoltan Arpadffy)
Files: runtime/doc/os_vms.txt, runtime/menu.vim, src/INSTALLvms.txt,
src/Make_vms.mms, src/option.c, src/os_unix.c, src/os_vms_conf.h
@@ -3843,7 +3843,7 @@ Files: src/ops.c
Patch 6.0.029
Problem: When making a change in line 1, then in line 2 and then deleting
- line 1, undo info could be wrong. Only when the changes are undone
+ line 1, undo info could be wrong. Only when the changes are undone
at once. (Gerhard Hochholzer)
Solution: When not saving a line for undo because it was already done
before, remember for which entry the last line must be computed.
@@ -3891,7 +3891,7 @@ Files: runtime/menu.vim
Patch 6.0.036
Problem: OS/2, MS-DOS and MS-Windows: Using a path that starts with a
- slash in 'tags' doesn't work as expected. (Mathias Koehrer
+ slash in 'tags' doesn't work as expected. (Mathias Koehrer)
Solution: Only use the drive, not the whole path to the current directory.
Also make it work for "c:dir/file".
Files: src/misc2.c
@@ -6127,7 +6127,7 @@ New message translation for Norwegian. (Øyvind Holm)
New color scheme:
desert (Hans Fugal)
-Arabic specific features. 'arabicshape', 'termbidi', 'arabic' and
+Arabic specific features. 'arabicshape', 'termbidi', 'arabic' and
'rightleftcmd' options. (Nadim Shaikli & Isam Bayazidi)
Support for neXtaw GUI toolkit, mostly like Athena. (Alexey Froloff)
@@ -6810,7 +6810,7 @@ Files: runtime/filetype.vim, runtime/plugin/gzip.vim
Patch 6.1.056
Problem: Loading the Syntax menu can take quite a bit of time.
-Solution: Add the "skip_syntax_sel_menu" variable. When its defined the
+Solution: Add the "skip_syntax_sel_menu" variable. When it's defined the
available syntax files are not in the Syntax menu.
Files: runtime/doc/gui.txt, runtime/menu.vim
@@ -7640,7 +7640,7 @@ Problem: The extra mouse buttons found on some mice don't work.
Solution: Support two extra buttons for MS-Windows. (Michael Geddes)
Files: runtime/doc/term.txt, src/edit.c, src/ex_getln.c, src/gui.c,
src/gui_w32.c, src/gui_w48.c, src/keymap.h, src/message.c,
- src/misc1.c, src/misc2.c, src/normal.c. src/vim.h
+ src/misc1.c, src/misc2.c, src/normal.c, src/vim.h
Patch 6.1.185 (depends on 6.1.182)
Problem: Can't compile without +comments feature.
diff --git a/runtime/doc/vimdiff-fr.1 b/runtime/doc/vimdiff-fr.1
new file mode 100644
index 000000000..8341b5044
--- /dev/null
+++ b/runtime/doc/vimdiff-fr.1
@@ -0,0 +1,53 @@
+.TH VIMDIFF 1 "30 mars 2001"
+.SH NOM
+vimdiff \- ouvre deux ou trois versions d'un fichier dans Vim et affiche
+leurs différences
+.SH SYNOPSIS
+.br
+.B vimdiff
+[options] fichier1 fichier2 [fichier3]
+.PP
+.B gvimdiff
+.SH DESCRIPTION
+.B Vimdiff
+démarre
+.B Vim
+avec deux (ou trois) fichiers.
+Chaque fichier est ouvert dans sa propre fenêtre.
+Les différences entres ces fichiers sont mises en surbrillance.
+C'est un outil très pratique pour visualiser et reporter les
+changements entre deux versions d'un même fichier.
+.PP
+Consulter vim(1) pour des informations sur l'éditeur Vim lui-même.
+.PP
+Si
+.B gvimdiff
+est invoqué, l'IHM graphique est démarrée quand elle est disponible.
+.PP
+L'option 'diff' est activée dans chacune des fenêtres, ce qui provoque la mise
+en surbrillance des différences.
+.br
+Les options 'wrap' et 'scrollbind' sont activées pour donner un aspect
+agréable au texte.
+.br
+L'option 'foldmethod' est fixée à "diff", ce qui replie les lignes consécutives
+identiques. 'foldcolumn' est fixé à 2 pour trouver les replis rapidement et
+les ouvrir ou les fermer facilement.
+.SH ARGUMENTS
+La fenêtre de Vim est partagée verticalement afin d'afficher les lignes
+correspondantes les unes en face des autres, comme si l'argument "\-O" était
+spécifié. Utilisez l'argument "\-o" pour obtenir un partage horizontal à la
+place.
+.PP
+Pour connaître les autres arguments disponibles, consultez vim(1).
+.SH VOIR AUSSI
+vim(1)
+.SH AUTEUR
+La majeure partie de
+.B Vim
+a été écrite par Bram Moolenaar, avec l'aide de nombreux autres contributeurs.
+Voir ":help credits" dans
+.B Vim.
+.SH TRADUCTION
+Cette page de manuel a été traduite par David Blanchet
+<david.blanchet@free.fr> 2005-03-12.
diff --git a/runtime/doc/vimdiff-fr.UTF-8.1 b/runtime/doc/vimdiff-fr.UTF-8.1
new file mode 100644
index 000000000..5f09ee4b7
--- /dev/null
+++ b/runtime/doc/vimdiff-fr.UTF-8.1
@@ -0,0 +1,53 @@
+.TH VIMDIFF 1 "30 mars 2001"
+.SH NOM
+vimdiff \- ouvre deux ou trois versions d'un fichier dans Vim et affiche
+leurs différences
+.SH SYNOPSIS
+.br
+.B vimdiff
+[options] fichier1 fichier2 [fichier3]
+.PP
+.B gvimdiff
+.SH DESCRIPTION
+.B Vimdiff
+démarre
+.B Vim
+avec deux (ou trois) fichiers.
+Chaque fichier est ouvert dans sa propre fenêtre.
+Les différences entres ces fichiers sont mises en surbrillance.
+C'est un outil très pratique pour visualiser et reporter les
+changements entre deux versions d'un même fichier.
+.PP
+Consulter vim(1) pour des informations sur l'éditeur Vim lui-même.
+.PP
+Si
+.B gvimdiff
+est invoqué, l'IHM graphique est démarrée quand elle est disponible.
+.PP
+L'option 'diff' est activée dans chacune des fenêtres, ce qui provoque la mise
+en surbrillance des différences.
+.br
+Les options 'wrap' et 'scrollbind' sont activées pour donner un aspect
+agréable au texte.
+.br
+L'option 'foldmethod' est fixée à "diff", ce qui replie les lignes consécutives
+identiques. 'foldcolumn' est fixé à 2 pour trouver les replis rapidement et
+les ouvrir ou les fermer facilement.
+.SH ARGUMENTS
+La fenêtre de Vim est partagée verticalement afin d'afficher les lignes
+correspondantes les unes en face des autres, comme si l'argument "\-O" était
+spécifié. Utilisez l'argument "\-o" pour obtenir un partage horizontal à la
+place.
+.PP
+Pour connaître les autres arguments disponibles, consultez vim(1).
+.SH VOIR AUSSI
+vim(1)
+.SH AUTEUR
+La majeure partie de
+.B Vim
+a été écrite par Bram Moolenaar, avec l'aide de nombreux autres contributeurs.
+Voir ":help credits" dans
+.B Vim.
+.SH TRADUCTION
+Cette page de manuel a été traduite par David Blanchet
+<david.blanchet@free.fr> 2005-03-12.
diff --git a/runtime/doc/vimdiff.man b/runtime/doc/vimdiff.man
index 771ce9d0e..fb0663c13 100644
--- a/runtime/doc/vimdiff.man
+++ b/runtime/doc/vimdiff.man
@@ -1,12 +1,10 @@
+VIMDIFF(1) VIMDIFF(1)
-VIMDIFF(1) VIMDIFF(1)
-
-
NAME
- vimdiff - edit two or three versions of a file with Vim
- and show differences
+ vimdiff - edit two or three versions of a file with Vim and show dif-
+ ferences
SYNOPSIS
vimdiff [options] file1 file2 [file3]
@@ -14,30 +12,25 @@ SYNOPSIS
gvimdiff
DESCRIPTION
- Vimdiff starts Vim on two (or three) files. Each file
- gets its own window. The differences between the files
- are highlighted. This is a nice way to inspect changes
- and to move changes from one version to another version of
- the same file.
+ Vimdiff starts Vim on two (or three) files. Each file gets its own
+ window. The differences between the files are highlighted. This is a
+ nice way to inspect changes and to move changes from one version to
+ another version of the same file.
See vim(1) for details about Vim itself.
- When started as gvimdiff the GUI will be started, if
- available.
+ When started as gvimdiff the GUI will be started, if available.
- In each window the 'diff' option will be set, which causes
- the differences to be highlighted.
- The 'wrap' and 'scrollbind' options are set to make the
- text look good.
- The 'foldmethod' option is set to "diff", which puts
- ranges of lines without changes in a fold. 'foldcolumn'
- is set to two to make it easy to spot the folds and open
- or close them.
+ In each window the 'diff' option will be set, which causes the differ-
+ ences to be highlighted.
+ The 'wrap' and 'scrollbind' options are set to make the text look good.
+ The 'foldmethod' option is set to "diff", which puts ranges of lines
+ without changes in a fold. 'foldcolumn' is set to two to make it easy
+ to spot the folds and open or close them.
OPTIONS
- Vertical splits are used to align the lines, as if the
- "-O" argument was used. To use horizontal splits intead,
- use the "-o" argument.
+ Vertical splits are used to align the lines, as if the "-O" argument
+ was used. To use horizontal splits intead, use the "-o" argument.
For all other arguments see vim(1).
@@ -45,22 +38,9 @@ SEE ALSO
vim(1)
AUTHOR
- Most of Vim was made by Bram Moolenaar, with a lot of help
- from others. See ":help credits" in Vim.
-
-
-
-
-
-
-
-
-
-
-
-
-
+ Most of Vim was made by Bram Moolenaar, with a lot of help from others.
+ See ":help credits" in Vim.
- 2001 March 30 1
+ 2001 March 30 VIMDIFF(1)
diff --git a/runtime/doc/vimtutor-fr.1 b/runtime/doc/vimtutor-fr.1
new file mode 100644
index 000000000..e6ae6484a
--- /dev/null
+++ b/runtime/doc/vimtutor-fr.1
@@ -0,0 +1,55 @@
+.TH VIMTUTOR 1 "2 avril 2001"
+.SH NAME
+vimtutor \- tutoriel Vim
+.SH SYNOPSIS
+.br
+.B vimtutor [langue]
+.SH DESCRIPTION
+.B Vimtutor
+lance le tutoriel
+.B Vim
+\.
+Il copie d'abord le fichier du tutoriel, afin que vous puissiez le modifier
+sans altérer le fichier original.
+.PP
+.B Vimtutor
+est utile pour les personnes souhaitant apprendre leurs premières commandes
+.B Vim
+\.
+.PP
+L'argument optionnel [langue] est le nom d'une langue, spécifiée par son
+symbole à deux lettres, tels que "it" ou "es". Si l'argument [langue] est omis,
+la langue de la région linguistique actuelle sera retenue. Si le tutoriel est
+disponible dans cette langue, il est proposé. Sinon, c'est la version anglaise
+qui est proposée.
+.PP
+.B Vim
+est toujours lancé en mode Compatible Vi.
+.SH FICHIERS
+.TP 15
+/usr/local/lib/vim/tutor/tutor[.langue]
+Les fichiers textes de
+.B Vimtutor
+\.
+.TP 15
+/usr/local/lib/vim/tutor/tutor.vim
+Le script Vim utilisé pour copier les fichiers texte de
+.B Vimtutor
+\.
+.SH AUTEUR
+.B Vimtutor
+a été écrit à l'origine pour Vi par Michael C. Pierce et Robert K. Ware, de la
+Colorado School of Mines, en reprenant des idées émises par Charles Smith, de
+la Colorado State University.
+E-mail : bware@mines.colorado.edu.
+.br
+Il a été modifié pour
+.B Vim
+par Bram Moolenaar.
+Pour connaître le nom des traducteurs, consultez les fichiers textes du
+tutoriel.
+.SH VOIR AUSSI
+vim(1)
+.SH TRADUCTION
+Cette page de manuel a été traduite par David Blanchet
+<david.blanchet@free.fr> 2004-12-27.
diff --git a/runtime/doc/vimtutor-fr.UTF-8.1 b/runtime/doc/vimtutor-fr.UTF-8.1
new file mode 100644
index 000000000..e36c34d78
--- /dev/null
+++ b/runtime/doc/vimtutor-fr.UTF-8.1
@@ -0,0 +1,55 @@
+.TH VIMTUTOR 1 "2 avril 2001"
+.SH NAME
+vimtutor \- tutoriel Vim
+.SH SYNOPSIS
+.br
+.B vimtutor [langue]
+.SH DESCRIPTION
+.B Vimtutor
+lance le tutoriel
+.B Vim
+\.
+Il copie d'abord le fichier du tutoriel, afin que vous puissiez le modifier
+sans altérer le fichier original.
+.PP
+.B Vimtutor
+est utile pour les personnes souhaitant apprendre leurs premières commandes
+.B Vim
+\.
+.PP
+L'argument optionnel [langue] est le nom d'une langue, spécifiée par son
+symbole à deux lettres, tels que "it" ou "es". Si l'argument [langue] est omis,
+la langue de la région linguistique actuelle sera retenue. Si le tutoriel est
+disponible dans cette langue, il est proposé. Sinon, c'est la version anglaise
+qui est proposée.
+.PP
+.B Vim
+est toujours lancé en mode Compatible Vi.
+.SH FICHIERS
+.TP 15
+/usr/local/lib/vim/tutor/tutor[.langue]
+Les fichiers textes de
+.B Vimtutor
+\.
+.TP 15
+/usr/local/lib/vim/tutor/tutor.vim
+Le script Vim utilisé pour copier les fichiers texte de
+.B Vimtutor
+\.
+.SH AUTEUR
+.B Vimtutor
+a été écrit à l'origine pour Vi par Michael C. Pierce et Robert K. Ware, de la
+Colorado School of Mines, en reprenant des idées émises par Charles Smith, de
+la Colorado State University.
+E-mail : bware@mines.colorado.edu.
+.br
+Il a été modifié pour
+.B Vim
+par Bram Moolenaar.
+Pour connaître le nom des traducteurs, consultez les fichiers textes du
+tutoriel.
+.SH VOIR AUSSI
+vim(1)
+.SH TRADUCTION
+Cette page de manuel a été traduite par David Blanchet
+<david.blanchet@free.fr> 2004-12-27.
diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt
index 0ff9dfe1b..cd924a332 100644
--- a/runtime/doc/visual.txt
+++ b/runtime/doc/visual.txt
@@ -1,4 +1,4 @@
-*visual.txt* For Vim version 7.0aa. Last change: 2004 Dec 29
+*visual.txt* For Vim version 7.0aa. Last change: 2005 Apr 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -88,8 +88,11 @@ linewise Visual Visual blockwise Visual Normal
*gv* *v_gv*
gv Start Visual mode with the same area as the previous
- area and the same mode. In Visual mode the current and
- the previous Visual area are exchanged.
+ area and the same mode.
+ In Visual mode the current and the previous Visual
+ area are exchanged.
+ After using "p" or "P" in Visual mode the text that
+ was put will be selected.
*<LeftMouse>*
<LeftMouse> Set the current cursor position. If Visual mode is
@@ -272,7 +275,7 @@ See |v_b_I_example|.
Visual-block Append *v_b_A*
With a blockwise selection, A{string}<ESC> will append {string} to the end of
-block on every line of the block. There is some differing behavior where the
+block on every line of the block. There is some differing behavior where the
block RHS is not straight, due to different line lengths:
1. Block was created with <C-v>$
@@ -297,12 +300,12 @@ all lines.
*v_b_<*
Visual-block Shift *v_b_>*
-The block is shifted by 'shiftwidth'. The RHS of the block is irrelevant. The
+The block is shifted by 'shiftwidth'. The RHS of the block is irrelevant. The
LHS of the block determines the point from which to apply a right shift, and
-padding includes TABs optimally according to 'ts' and 'et'. The LHS of the
+padding includes TABs optimally according to 'ts' and 'et'. The LHS of the
block determines the point upto which to shift left.
Note: v_< padding is buggy if the Visual Block starts and ends in the same
- TAB. (Vim 5.4c).
+ TAB. (Vim 5.4c)
See |v_b_>_example|.
See |v_b_<_example|.
@@ -364,14 +367,14 @@ Note that special characters (like '.' and '*') will cause problems.
Visual-block Examples *blockwise-examples*
With the following text, I will indicate the commands to produce the block and
-the results below. In all cases, the cursor begins on the 'a' in the first
+the results below. In all cases, the cursor begins on the 'a' in the first
line of the test text.
The following modeline settings are assumed ":ts=8:sw=4:".
It will be helpful to
:set hls
/<TAB>
-where <TAB> is a real TAB. This helps visualise the operations.
+where <TAB> is a real TAB. This helps visualise the operations.
The test text is:
diff --git a/runtime/doc/xxd-fr.1 b/runtime/doc/xxd-fr.1
new file mode 100644
index 000000000..2f157bcbe
--- /dev/null
+++ b/runtime/doc/xxd-fr.1
@@ -0,0 +1,395 @@
+.TH XXD 1 "août 1996" "Page de manuel pour xxd"
+.\"
+.\" 21st May 1996
+.\" Man page author:
+.\" Tony Nugent <tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
+.\" Changes by Bram Moolenaar <Bram@vim.org>
+.\" French translation by David Blanchet <david.blanchet@free.fr> 2005-03
+.SH NOM
+.I xxd
+\- convertit en représentation hexadécimale et inversement.
+.SH SYNOPSIS
+.B xxd
+\-h[elp]
+.br
+.B xxd
+[options] [fichier_entree [fichier_sortie]]
+.br
+.B xxd
+\-r[evert] [options] [fichier_entree [fichier_sortie]]
+.SH DESCRIPTION
+.I xxd
+crée un fichier contenant la représentation hexadécimale d'un fichier
+binaire ou de l'entrée standard.
+Il peut également convertir un fichier de codes hexadécimaux en un fichier
+binaire.
+Comme
+.BR uuencode(1)
+et
+.BR uudecode(1)
+il permet la transmission de données binaires dans une représentation ASCII
+compatible avec le courrier électronique, mais a l'avantage de décoder la
+sortie standard.
+De plus, il peut être utilisé pour appliquer des rustines à des fichiers
+binaires.
+.SH OPTIONS
+Si aucun
+.I fichier_entree
+n'est spécifié, l'entrée standard est utilisée.
+Si
+.I fichier_entree
+correspond au caractère
+.RB '\-'
+\, l'entrée standard est employée comme source des données en entrée.
+Si aucun
+.I fichier_sortie
+n'est spécifié (ou qu'un caractère
+.RB '\-'
+est donné à sa place), le résultat est envoyé sur la sortie standard.
+.PP
+NOTE : un analyseur paresseux est utilisé. Il ne vérifie pas au-delà de la
+première lettre de l'option, à moins que cette dernière ne requiert un
+paramètre.
+L'espace entre l'option et son paramètre est optionnel.
+Les paramètres des options peuvent être spécifiés en notation décimale,
+hexadécimale ou octale.
+Ainsi
+.BR \-c8 ,
+.BR "\-c 8" ,
+.B \-c 010
+et
+.B \-cols 8
+sont tous équivalents.
+.TP
+.IR \-a " | " \-autoskip
+active la fonctionnalité "autoskip" : le caractère '*' remplace les lignes
+d'octets nuls. Désactivée par défaut.
+.TP
+.IR \-b " | " \-bits
+Convertit en binaires plutôt qu'en hexadécimal.
+Cette option écrit les octets comme une séquence de "1" et de "0" au lieu
+d'une conversion en hexadécimal traditionnel. Chaque ligne est précédée par un
+numéro de ligne en hexadécimal et suivie de la représentation ASCII (ou
+EBCDIC) correspondante. Les options \-r, \-p, \-i ne fonctionnent pas dans ce
+mode.
+.TP
+.IR "\-c cols " | " \-cols cols"
+place
+.RI < cols >
+octets par ligne. 16 par défaut (\-i : 12, \-ps : 30, \-b : 6). Maximum 256.
+.TP
+.IR \-E " | " \-EBCDIC
+Passe le codage des caractères de la colonne de droite de ASCII à EBCDIC.
+Cela ne change pas la représentation hexadécimale. Cette option est sans effet
+quand elle est utilisée avec \-r, \-p or \-i.
+.TP
+.IR "\-g octets " | " \-groupsize octets"
+Regroupe les octets (deux chiffres hexadécimaux ou huit chiffres binaires)
+par groupe de
+.RI < octets >
+\, séparés par des espaces blancs. Spécifiez
+.I \-g 0
+pour supprimer le regroupement.
+.RI < octets >
+vaut 2 par défaut dans le mode normal et \fI1\fP en
+représentation binaire. Le regroupement ne s'applique pas aux styles
+Postscript et Include.
+.TP
+.IR \-h " | " \-help
+Affiche un résumé des commandes disponibles et quitte. Aucune conversion n'est
+effectuée.
+.TP
+.IR \-i " | " \-include
+produit une sortie dans le style #include (fichier C à inclure). La définition
+complète d'un tableau statique est écrite et est nommée d'après le fichier
+d'origine, à moins que xxd lise depuis l'entrée standard.
+.TP
+.IR "\-l long " | " \-len long"
+Arrête après l'écriture de
+.RI < long >
+octets.
+.TP
+.IR \-p " | " \-ps " | " \-postscript " | " \-plain
+Produit une conversion continue dans le style Postscript (postscript continuous
+hexdumd style).
+Également connu sous le nom de « conversion brute » (plain hexdump style).
+.TP
+.IR \-r " | " \-revert
+Opération inverse : convertit un fichier hexadécimal en un fichier binaire (ou
+applique une rustine à un fichier binaire).
+Si l'écriture n'a pas lieu sur la sortie standard, xxd écrit dans le fichier
+qu'il produit sans le tronquer. Utilisez la combinaison
+.I \-r \-p
+pour lire de l'hexadécimal brut sans information sur le numéro des lignes et
+sans format de colonnes particulier. Des espaces blancs et coupures de lignes
+supplémentaires sont autorisés à n'importe quel endroit.
+.TP
+.I \-seek décalage
+Utilisé après l'option
+.I \-r
+\: inverse la conversion en ajoutant
+.RI < décalage >
+aux positions dans le fichier données dans le code hexadécimal.
+.TP
+.I \-s [\+][\-]décalage
+Débute au
+.RI < décalage >
+absolu ou relatif dans fichier_entree.
+\fI\+ \fRindique que le décalage est relatif à la position courante dans
+l'entrée standard (sans effet si la lecture n'a pas lieu sur l'entrée
+standard). \fI\- \fRindique un décalage en caractères depuis la fin de
+l'entrée (utilisé avec \fI \+ \fR, désigne la position avant la position
+actuelle de l'entrée standard).
+Sans l'option \-s, xxd démarre à la position courante du fichier.
+.TP
+.I \-u
+Utilise des chiffres hexadécimaux majuscules. La casse par défaut est
+minuscule.
+.TP
+.IR \-v " | " \-version
+Affiche la version de xxd.
+.SH MISE EN GARDE
+.I xxd \-r
+effectue des opérations internes un peu obscures lors de l'évaluation
+des informations sur les numéros de lignes. Si le fichier de sortie est
+adressable, alors les numéros de lignes au début de chaque ligne d'hexadécimal
+peuvent être désordonnées, des lignes peuvent manquer ou se chevaucher. Dans
+ces cas, xxd utilisera lseek(2) pour déterminer la prochaine position. Si le
+fichier n'est pas adressable, seuls les vides sont autorisés, et ils seront
+comblés par des octets nuls.
+.PP
+.I xxd \-r
+ne génère aucune erreur lors de l'analyse. Le problème sont passés
+silencieusement.
+.PP
+Lors de l'édition de la représentation hexadécimale, veuillez noter que
+.I xxd \-r
+ignore tout ce qui se trouve sur la ligne après avoir lu suffisamment de
+données hexadécimales (voir l'option \-c). Cela signifie également que les
+modifications dans la colonne ASCII (ou EBCDIC) sont toujours ignorées. La
+conversion inverse de données hexadécimales brutes (postscript) avec xxd \-r
+\-p ne dépend pas d'un nombre correct de colonnes. Dans ce cas, tout ce qui
+ressemble à une paire de chiffres hexadécimaux est interprété.
+.PP
+Remarquez la différence entre
+.br
+\fI% xxd \-i fichier\fR
+.br
+et
+.br
+\fI% xxd \-i \< fichier\fR
+.PP
+.I xxd \-s \+seek
+peut différer de
+.I xxd \-s seek
+\, car lseek(2) est utilisé pour « revenir en arrière ». Le '+' fait une
+différence quand la source des données est l'entrée standard et si la position
+dans le fichier de l'entrée standard n'est pas au début du fichier lorsque xxd
+est démarré et qu'il reçoit ses données.
+L'exemple suivant peut vous aider à comprendre (ou bien vous perdre davantage
+encore !)...
+.PP
+Remettre l'entrée standard au départ avant de lire ; nécessaire car 'cat' a
+déjà lu jusqu'à la fin de l'entrée standard.
+.br
+\fI% sh \-c 'cat > donnees_binaires; xxd \-s 0 > donnees_hexa' < fichier\fR
+.PP
+Convertir à partir de la position 0x480 (= 1024 + 128) du fichier.
+Le symbole '+' signifie "relativement à la position actuelle', ainsi 128 est
+ajouté aux 1024 octets comptabilisés pour dd.
+.br
+\fI% sh \-c 'dd of=donnees_binaires bs=1k count=1; xxd \-s +128 >
+donnees_hexa' < fichier\fR
+.PP
+Convertir de fichier depuis la position 0x100 (= 1024 - 768) du fichier.
+.br
+\fI% sh \-c 'dd of=donnees_binaires bs=1k count=1; xxd \-s +\-768 >
+donnees_hexa' < fichier\fR
+.PP
+Toutefois, cette situation est peu fréquente et l'utilisation de '+' est
+rarement requise. L'auteur préfère surveiller les effets de xxd avec strace(1)
+ou truss(1) quand \-s est employé.
+.SH EXEMPLES
+Afficher la totalité du
+.B fichier
+sauf les trois premières lignes (0x30 octets en hexadécimal).
+.br
+\fI% xxd \-s 0x30 fichier\fR
+.PP
+afficher les trois dernières lignes (0x30 octets en hexadécimal) du
+.B fichier
+\.
+.br
+\fI% xxd \-s \-0x30 fichier\fR
+.PP
+.br
+Afficher 120 octets convertis en continu, avec 20 octets par ligne.
+.br
+\fI% xxd \-l 120 \-ps \-c 20 xxd\-fr.1\fR
+.br
+2e54482058584420312022616ffb742031393936
+.br
+22202250616765206465206d616e75656c20706f
+.br
+757220787864220a2e5c220a2e5c222032317374
+.br
+204d617920313939360a2e5c22204d616e207061
+.br
+676520617574686f723a0a2e5c2220202020546f
+.br
+6e79204e7567656e74203c746f6e79407363746e
+.br
+204e7567656e74203c746f6e79407363746e7567
+.br
+2e54482058584420312022417567757374203139
+.PP
+Convertir les 120 premiers octets de cette page de manuel avec 12 octets par
+ligne.
+.br
+\fI% xxd \-l 120 \-c 12 xxd\-fr.1\fR
+.br
+0000000: 2e54 4820 5858 4420 3120 2261 .TH XXD 1 "a
+.br
+000000c: 6ffb 7420 3139 3936 2220 2250 o.t 1996" "P
+.br
+0000018: 6167 6520 6465 206d 616e 7565 age de manue
+.br
+0000024: 6c20 706f 7572 2078 7864 220a l pour xxd".
+.br
+0000030: 2e5c 220a 2e5c 2220 3231 7374 .\"..\" 21st
+.br
+000003c: 204d 6179 2031 3939 360a 2e5c May 1996..\
+.br
+0000048: 2220 4d61 6e20 7061 6765 2061 " Man page a
+.br
+0000054: 7574 686f 723a 0a2e 5c22 2020 uthor:..\"
+.br
+0000060: 2020 546f 6e79 204e 7567 656e Tony Nugen
+.br
+000006c: 7420 3c74 6f6e 7940 7363 746e t <tony@sctn
+.PP
+Afficher la date écrite au début du fichier xxd\-fr.1.
+.br
+\fI% xxd \-s 0x38 \-l 13 \-c 13 xxd.1\fR
+.br
+0000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996
+.PP
+Copier
+.B fichier_entree
+vers
+.B fichier_sortie
+en ajoutant 100 octets de valeur 0x00 avant.
+.br
+\fI% xxd fichier_entree | xxd \-r \-s 100 \> fichier_sortie\fR
+.PP
+Patcher la date dans le fichier xxd.1
+.br
+\fI% echo '0000037: 3574 68' | xxd \-r \- xxd\-fr.1\fR
+.br
+\fI% xxd \-s 0x38 \-l 13 \-c 13 xxd\-fr.1\fR
+.br
+0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996
+.PP
+Créer un fichier de 65537 octets tous nuls (0x00),
+sauf le dernier qui vaut 'A' (0x41 en hexadécimal).
+.br
+\fI% echo '010000: 41' | xxd \-r \> fichier\fR
+.PP
+.br
+Convertir le fichier de l'exemple précédent avec la fonctionnalité "autoskip".
+.br
+\fI% xxd \-a \-c 12 fichier\fR
+.br
+0000000: 0000 0000 0000 0000 0000 0000 ............
+.br
+*
+.br
+000fffc: 0000 0000 40 ....A
+.PP
+Créer un fichier d'un octet, contenant seulement le caractère 'A'.
+Les nombres après '\-r \-s' s'ajoutent au numéros de lignes trouvées dans le
+fichier ; XXX in effects, les octets initiaux sont supprimés.
+.br
+\fI% echo '010000: 41' | xxd \-r \-s \-0x10000 \> fichier\fR
+.PP
+Utiliser xxd comme filtre dans un éditeur tel que
+.B vim(1)
+pour convertir une zone comprise entre les marques 'a' et 'z'.
+.br
+\fI:'a,'z!xxd\fR
+.PP
+Utiliser xxd comme filtre dans un éditeur tel que
+.B vim(1)
+pour récupérer une conversion binaire comprise entre les marques 'a' et 'z'.
+.br
+\fI:'a,'z!xxd \-r\fR
+.PP
+Utiliser xxd comme filtre dans un éditeur tel que
+.B vim(1)
+pour récupérer une ligne convertie. Placez le curseur sur la ligne et tapez :
+.br
+\fI!!xxd \-r\fR
+.PP
+Lire des caractères depuis une connexion série :
+.br
+\fI% xxd \-c1 < /dev/term/b &\fR
+.br
+\fI% stty < /dev/term/b \-echo \-opost \-isig \-icanon min 1\fR
+.br
+\fI% echo \-n foo > /dev/term/b\fR
+.SH VALEURS DE RETOUR
+Les erreurs suivantes sont rapportées :
+.TP
+0
+aucune erreur ne s'est produit.
+.TP
+\-1
+opération non supportée (
+.I xxd \-r \-i
+reste impossible).
+.TP
+1
+erreur lors de l'analyse des options.
+.TP
+2
+problème avec le fichier d'entrée.
+.TP
+3
+problème avec le fichier de sortie.
+.TP
+4, 5
+la position spécifiée n'est pas atteignable.
+.SH VOIR AUSSI
+uuencode(1), uudecode(1), patch(1)
+.SH AVERTISSEMENTS
+L'étrangeté de cet outil reflète celle du cerveau de ses créateurs.
+Utilisez cet outil à vos risques et périls. Dupliquez vos fichiers.
+Surveillez l'outil. Devenez un gourou.
+.SH VERSION
+Cette page de manuel documente la version 1.7 de xxd.
+.SH AUTEUR
+(c) 1990-1997 par Juergen Weigert
+.br
+<jnweiger@informatik.uni-erlangen.de>
+.LP
+"Distribute freely and credit me,
+.br
+make money and share with me,
+.br
+lose money and don't ask me."
+.PP
+Distribution libre en citant l'auteur,
+.br
+gagnez de l'argent, pensez à moi,
+.br
+perdez de l'argent, oubliez-moi.
+.PP
+Page de manuel débutée par Tony Nugent
+.br
+<tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
+.br
+Modifications mineures par Bram Moolenaar.
+Édité par Juergen Weigert.
+.SH TRADUCTION
+Cette page de manuel a été traduite par David Blanchet
+<david.blanchet@free.fr> 2004-12-24.
diff --git a/runtime/spell/README.txt b/runtime/spell/README.txt
new file mode 100644
index 000000000..ff56acc25
--- /dev/null
+++ b/runtime/spell/README.txt
@@ -0,0 +1,935 @@
+The spell files included here are in Vim's special format. You can't edit
+them. See ":help spell" for more information.
+
+
+Copyright
+
+The files used as input for the spell files come from the OpenOffice.org spell
+files. Most of them go under the LGPL or a similar license.
+
+Copyright notices for specific languages follow. Note that the files for
+different regions are merged, both to save space and to make it possible to
+highlight words for another region different from bad words.
+
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+en_US
+
+20040623 release.
+--
+This dictionary is based on a subset of the original
+English wordlist created by Kevin Atkinson for Pspell
+and Aspell and thus is covered by his original
+LGPL license. The affix file is a heavily modified
+version of the original english.aff file which was
+released as part of Geoff Kuenning's Ispell and as
+such is covered by his BSD license.
+
+Thanks to both authors for there wonderful work.
+
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+en_AU
+
+This dictionary was based on the en_GB Myspell dictionary
+which in turn was initially based on a subset of the
+original English wordlist created by Kevin Atkinson for
+Pspell and Aspell and thus is covered by his original
+LGPL licence.
+
+The credit for this en_AU dictionary goes to:
+
+Kelvin Eldridge (maintainer)
+Jean Hollis Weber
+David Wilson
+
+- Words incorrect in Australian English removed
+- a list from the previously removed words with corrected spelling was added
+- a list of major rivers was added
+- a list of place names was added
+- a list of Australian mammals was added
+- a list of Aboriginal/Koori words commonly used was added
+
+A total of 119,267 words are now recognized
+by the dictionary.
+
+Of course, special thanks go to the editors of the
+en_GB dictionary (David Bartlett, Brian Kelk and
+Andrew Brown) which provided the starting point
+for this dictionary.
+
+The affix file is currently a duplicate of the en_AU.aff
+created completely from scratch by David Bartlett and
+Andrew Brown, based on the published
+rules for MySpell and is also provided under the LGPL.
+
+If you find omissions or bugs or have new words to
+add to the dictionary, please contact the en_AU
+maintainer at:
+
+ "Kelvin" <audictionary@onlineconnections.com.au>
+
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+en_CA
+
+The dictionary file was created using the "final" English and Canadian SCOWL
+(Spell Checker Oriented Word Lists) wordlists available at Kevin's Word Lists
+Page (http://wordlist.sourceforge.net). Lists with the suffixes 10, 20, 35,
+50, 65 and 65 were used. Lists with the suffixes 70, 80 and 95 were excluded.
+Copyright information for SCOWL and the wordlists used in creating it is
+reproduced below.
+
+The affix file is identical to the MySpell English (United States) affix file.
+It is a heavily modified version of the original english.aff file which was
+released as part of Geoff Kuenning's Ispell and as such is covered by his BSD
+license.
+
+---
+
+COPYRIGHT, SOURCES, and CREDITS from SCOWL readme file:
+
+The collective work is Copyright 2000 by Kevin Atkinson as well as any
+of the copyrights mentioned below:
+
+ Copyright 2000 by Kevin Atkinson
+
+ Permission to use, copy, modify, distribute and sell these word
+ lists, the associated scripts, the output created from the scripts,
+ and its documentation for any purpose is hereby granted without fee,
+ provided that the above copyright notice appears in all copies and
+ that both that copyright notice and this permission notice appear in
+ supporting documentation. Kevin Atkinson makes no representations
+ about the suitability of this array for any purpose. It is provided
+ "as is" without express or implied warranty.
+
+Alan Beale <biljir@pobox.com> also deserves special credit as he has,
+in addition to providing the 12Dicts package and being a major
+contributor to the ENABLE word list, given me an incredible amount of
+feedback and created a number of special lists (those found in the
+Supplement) in order to help improve the overall quality of SCOWL.
+
+The 10 level includes the 1000 most common English words (according to
+the Moby (TM) Words II [MWords] package), a subset of the 1000 most
+common words on the Internet (again, according to Moby Words II), and
+frequently class 16 from Brian Kelk's "UK English Wordlist
+with Frequency Classification".
+
+The MWords package was explicitly placed in the public domain:
+
+ The Moby lexicon project is complete and has
+ been place into the public domain. Use, sell,
+ rework, excerpt and use in any way on any platform.
+
+ Placing this material on internal or public servers is
+ also encouraged. The compiler is not aware of any
+ export restrictions so freely distribute world-wide.
+
+ You can verify the public domain status by contacting
+
+ Grady Ward
+ 3449 Martha Ct.
+ Arcata, CA 95521-4884
+
+ grady@netcom.com
+ grady@northcoast.com
+
+The "UK English Wordlist With Frequency Classification" is also in the
+Public Domain:
+
+ Date: Sat, 08 Jul 2000 20:27:21 +0100
+ From: Brian Kelk <Brian.Kelk@cl.cam.ac.uk>
+
+> I was wondering what the copyright status of your "UK English
+ > Wordlist With Frequency Classification" word list as it seems to
+ > be lacking any copyright notice.
+
+ There were many many sources in total, but any text marked
+ "copyright" was avoided. Locally-written documentation was one
+ source. An earlier version of the list resided in a filespace called
+ PUBLIC on the University mainframe, because it was considered public
+ domain.
+
+ Date: Tue, 11 Jul 2000 19:31:34 +0100
+
+ > So are you saying your word list is also in the public domain?
+
+ That is the intention.
+
+The 20 level includes frequency classes 7-15 from Brian's word list.
+
+The 35 level includes frequency classes 2-6 and words appearing in at
+least 11 of 12 dictionaries as indicated in the 12Dicts package. All
+words from the 12Dicts package have had likely inflections added via
+my inflection database.
+
+The 12Dicts package and Supplement is in the Public Domain.
+
+The WordNet database, which was used in the creation of the
+Inflections database, is under the following copyright:
+
+ This software and database is being provided to you, the LICENSEE,
+ by Princeton University under the following license. By obtaining,
+ using and/or copying this software and database, you agree that you
+ have read, understood, and will comply with these terms and
+ conditions.:
+
+ Permission to use, copy, modify and distribute this software and
+ database and its documentation for any purpose and without fee or
+ royalty is hereby granted, provided that you agree to comply with
+ the following copyright notice and statements, including the
+ disclaimer, and that the same appear on ALL copies of the software,
+ database and documentation, including modifications that you make
+ for internal use or for distribution.
+
+ WordNet 1.6 Copyright 1997 by Princeton University. All rights
+ reserved.
+
+ THIS SOFTWARE AND DATABASE IS PROVIDED "AS IS" AND PRINCETON
+ UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+ IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PRINCETON
+ UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANT-
+ ABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE
+ LICENSED SOFTWARE, DATABASE OR DOCUMENTATION WILL NOT INFRINGE ANY
+ THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+ The name of Princeton University or Princeton may not be used in
+ advertising or publicity pertaining to distribution of the software
+ and/or database. Title to copyright in this software, database and
+ any associated documentation shall at all times remain with
+ Princeton University and LICENSEE agrees to preserve same.
+
+The 50 level includes Brian's frequency class 1, words words appearing
+in at least 5 of 12 of the dictionaries as indicated in the 12Dicts
+package, and uppercase words in at least 4 of the previous 12
+dictionaries. A decent number of proper names is also included: The
+top 1000 male, female, and Last names from the 1990 Census report; a
+list of names sent to me by Alan Beale; and a few names that I added
+myself. Finally a small list of abbreviations not commonly found in
+other word lists is included.
+
+The name files form the Census report is a government document which I
+don't think can be copyrighted.
+
+The name list from Alan Beale is also derived from the linux words
+list, which is derived from the DEC list. He also added a bunch of
+miscellaneous names to the list, which he released to the Public Domain.
+
+The DEC Word list doesn't have a formal name. It is labeled as "FILE:
+english.words; VERSION: DEC-SRC-92-04-05" and was put together by Jorge
+Stolfi <stolfi@src.dec.com> DEC Systems Research Center. The DEC Word
+list has the following copyright statement:
+
+ (NON-)COPYRIGHT STATUS
+
+ To the best of my knowledge, all the files I used to build these
+ wordlists were available for public distribution and use, at least
+ for non-commercial purposes. I have confirmed this assumption with
+ the authors of the lists, whenever they were known.
+
+ Therefore, it is safe to assume that the wordlists in this package
+ can also be freely copied, distributed, modified, and used for
+ personal, educational, and research purposes. (Use of these files in
+ commercial products may require written permission from DEC and/or
+ the authors of the original lists.)
+
+ Whenever you distribute any of these wordlists, please distribute
+ also the accompanying README file. If you distribute a modified
+ copy of one of these wordlists, please include the original README
+ file with a note explaining your modifications. Your users will
+ surely appreciate that.
+
+ (NO-)WARRANTY DISCLAIMER
+
+ These files, like the original wordlists on which they are based,
+ are still very incomplete, uneven, and inconsitent, and probably
+ contain many errors. They are offered "as is" without any warranty
+ of correctness or fitness for any particular purpose. Neither I nor
+ my employer can be held responsible for any losses or damages that
+ may result from their use.
+
+However since this Word List is used in the linux.words package which
+the author claims is free of any copyright I assume it is OK to use
+for most purposes. If you want to use this in a commercial project
+and this concerns you the information from the DEC word list can
+easily be removed without much sacrifice in quality as only the name
+lists were used.
+
+The file special-jargon.50 uses common.lst and word.lst from the
+"Unofficial Jargon File Word Lists" which is derived from "The Jargon
+File". All of which is in the Public Domain. This file also contain
+a few extra UNIX terms which are found in the file "unix-terms" in the
+special/ directory.
+
+The 60 level includes Brian's frequency class 0 and all words
+appearing in at least 2 of the 12 dictionaries as indicated by the
+12Dicts package. A large number of names are also included: The 4,946
+female names and 3,897 male names from the MWords package and the
+files "computer.names", "misc.names", and "org.names" from the DEC
+package.
+
+The 65 level includes words found in the Ispell "medium" word list.
+The Ispell word lists are under the same copyright of Ispell itself
+which is:
+
+ Copyright 1993, Geoff Kuenning, Granada Hills, CA
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. All modifications to the source code must be clearly marked as
+ such. Binary redistributions based on modified source code
+ must be clearly marked as modified versions in the documentation
+ and/or other materials provided with the distribution.
+ 4. All advertising materials mentioning features or use of this software
+ must display the following acknowledgment:
+ This product includes software developed by Geoff Kuenning and
+ other unpaid contributors.
+ 5. The name of Geoff Kuenning may not be used to endorse or promote
+ products derived from this software without specific prior
+ written permission.
+
+ THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS
+ IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GEOFF
+ KUENNING OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+The 70 level includes the 74,550 common dictionary words and the 21,986 names
+list from the MWords package. The common dictionary words, like those
+from the 12Dicts package, have had all likely inflections added.
+
+The 80 level includes the ENABLE word list, all the lists in the
+ENABLE supplement package (except for ABLE), the "UK Advanced Cryptics
+Dictionary" (UKACD), the list of signature words in from YAWL package,
+and the 10,196 places list from the MWords package.
+
+The ENABLE package, mainted by M\Cooper <thegrendel@theriver.com>,
+is in the Public Domain:
+
+ The ENABLE master word list, WORD.LST, is herewith formally released
+ into the Public Domain. Anyone is free to use it or distribute it in
+ any manner they see fit. No fee or registration is required for its
+ use nor are "contributions" solicited (if you feel you absolutely
+ must contribute something for your own peace of mind, the authors of
+ the ENABLE list ask that you make a donation on their behalf to your
+ favorite charity). This word list is our gift to the Scrabble
+ community, as an alternate to "official" word lists. Game designers
+ may feel free to incorporate the WORD.LST into their games. Please
+ mention the source and credit us as originators of the list. Note
+ that if you, as a game designer, use the WORD.LST in your product,
+ you may still copyright and protect your product, but you may *not*
+ legally copyright or in any way restrict redistribution of the
+ WORD.LST portion of your product. This *may* under law restrict your
+ rights to restrict your users' rights, but that is only fair.
+
+UKACD, by J Ross Beresford <ross@bryson.demon.co.uk>, is under the
+following copyright:
+
+ Copyright (c) J Ross Beresford 1993-1999. All Rights Reserved.
+
+ The following restriction is placed on the use of this publication:
+ if The UK Advanced Cryptics Dictionary is used in a software package
+ or redistributed in any form, the copyright notice must be
+ prominently displayed and the text of this document must be included
+ verbatim.
+
+ There are no other restrictions: I would like to see the list
+ distributed as widely as possible.
+
+The 95 level includes the 354,984 single words and 256,772 compound
+words from the MWords package, ABLE.LST from the ENABLE Supplement,
+and some additional words found in my part-of-speech database that
+were not found anywhere else.
+
+Accent information was taken from UKACD.
+
+My VARCON package was used to create the American, British, and
+Canadian word list.
+
+Since the original word lists used used in the
+VARCON package came from the Ispell distribution they are under the
+Ispell copyright.
+
+The variant word lists were created from a list of variants found in
+the 12dicts supplement package as well as a list of variants I created
+myself.
+
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+en_GB
+
+This dictionary was initially based on a subset of the
+original English wordlist created by Kevin Atkinson for
+Pspell and Aspell and thus is covered by his original
+LGPL licence.
+
+It has been extensively updated by David Bartlett, Brian Kelk
+and Andrew Brown:
+- numerous Americanism have been removed
+- numerous American spellings have been corrected
+- missing words have been added
+- many errors have been corrected
+- compound hyphenated words have been added where appropriate
+
+Valuable inputs to this process were received from many other
+people - far too numerous to name. Serious thanks to you all
+for your greatly appreciated help.
+
+This word list is intended to be a good representation of
+current modern British English and thus it should be a good
+basis for Commonwealth English in most countries of the world
+outside North America.
+
+The affix file has been created completely from scratch
+by David Bartlett and Andrew Brown, based on the published
+rules for MySpell and is also provided under the LGPL.
+
+In creating the affix rules an attempt has been made to
+reproduce the most general rules for English word
+formation, rather than merely use it as a means to
+compress the size of the dictionary. It is hoped that this
+will facilitate future localisation to other variants of
+English.
+
+Please let David Bartlett <dbartlett@iee.org> know of any
+errors that you find.
+
+The current release is R 1.14, 15/12/02 or later
+
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+en_NZ
+
+I. Copyright
+II. Copying (Licence)
+----------------------------
+
+I. Copyright
+
+NZ English Dictionary v0.9 beta - Build 06SEP03
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+NB This is an initial version, please check:
+http://lingucomponent.openoffice.org/download_dictionary.html
+or
+http://www.girlza.com/dictionary/download.html
+for a final version, after a little while (no hurry).
+
+This dictionary is based on the en_GB Myspell dictionary
+which in turn was initially based on a subset of the
+original English wordlist created by Kevin Atkinson for
+Pspell and Aspell and thus is covered by his original
+LGPL licence.
+
+
+Introduction
+~~~~~~~~~~~~
+en_NZ.dic has been altered to include New Zealand places,
+including major cities and towns, and major suburbs. It
+also contains NZ words, organisations and expressions.
+
+en_NZ.aff has had a few REPlace strings added, but is
+basically unchanged.
+
+
+Acknowledgements
+~~~~~~~~~~~~~~~~
+Thanks must go to the original creators of the British
+dictionary, David Bartlett, Brian Kelk and Andrew Brown.
+
+I wouldn't have started this without seeing the Australian
+dictionary, thanks Kelvin Eldridge, Jean Hollis Weber and
+David Wilson.
+
+And thank you to all who've contributed to OpenOffice.org.
+
+
+License
+~~~~~~~
+This dictionary is covered by the GNU Lesser General Public
+License, viewable at http://www.gnu.org/copyleft/lesser.html
+
+
+Issues
+~~~~~~
+Many of the proper nouns already in the dictionary do not have
+an affix for 's.
+All my new words start after the z's of the original dictionary.
+
+
+Contact
+~~~~~~~
+Contact Tristan Burtenshaw (hooty@slingshot.co.nz) with any words,
+places or other suggestions for the dictionary.
+
+
+
+II. Copying
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
diff --git a/runtime/spell/en.utf-8.spl b/runtime/spell/en.utf-8.spl
new file mode 100644
index 000000000..88bddbdaf
--- /dev/null
+++ b/runtime/spell/en.utf-8.spl
Binary files differ
diff --git a/runtime/syntax/cs.vim b/runtime/syntax/cs.vim
index 99844b965..948b12554 100644
--- a/runtime/syntax/cs.vim
+++ b/runtime/syntax/cs.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C#
" Maintainer: Johannes Zellner <johannes@zellner.org>
-" Last Change: Tue, 09 Mar 2004 14:32:13 CET
+" Last Change: Mi, 13 Apr 2005 22:52:57 CEST
" Filenames: *.cs
" $Id$
"
@@ -92,7 +92,7 @@ syn match csSpecialChar contained +\\["\\'0abfnrtvx]+
" unicode characters
syn match csUnicodeNumber +\\\(u\x\{4}\|U\x\{8}\)+ contained contains=csUnicodeSpecifier
syn match csUnicodeSpecifier +\\[uU]+ contained
-syn region csVerbatimString start=+@"+ end=+"+ end=+$+ contains=csVerbatimSpec
+syn region csVerbatimString start=+@"+ end=+"+ end=+$+ skip=+""+ contains=csVerbatimSpec
syn match csVerbatimSpec +@"+he=s+1 contained
syn region csString start=+"+ end=+"+ end=+$+ contains=csSpecialChar,csSpecialError,csUnicodeNumber
syn match csCharacter "'[^']*'" contains=csSpecialChar,csSpecialCharError
diff --git a/runtime/syntax/objc.vim b/runtime/syntax/objc.vim
index 5a965a0f1..1c296ddbb 100644
--- a/runtime/syntax/objc.vim
+++ b/runtime/syntax/objc.vim
@@ -3,7 +3,7 @@
" Maintainer: Kazunobu Kuriyama <kazunobu.kuriyama@nifty.com>
" Ex-maintainer: Anthony Hodsdon <ahodsdon@fastmail.fm>
" First Author: Valentino Kyriakides <1kyriaki@informatik.uni-hamburg.de>
-" Last Change: 2004 May 20
+" Last Change: 2005 Apr 13
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -30,8 +30,9 @@ endif
" ObjC keywords, types, type qualifiers etc.
syn keyword objcStatement self super _cmd
-syn keyword objcType id Class SEL IMP BOOL nil Nil
+syn keyword objcType id Class SEL IMP BOOL
syn keyword objcTypeModifier bycopy in out inout oneway
+syn keyword objcConstant nil Nil
" Match the ObjC #import directive (like C's #include)
syn region objcImported display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
@@ -98,6 +99,7 @@ if version >= 508 || !exists("did_objc_syntax_inits")
HiLink objcString cString
HiLink objcSpecial Special
HiLink objcProtocol None
+ HiLink objcConstant cConstant
delcommand HiLink
endif
diff --git a/runtime/syntax/xml.vim b/runtime/syntax/xml.vim
index af6c626cf..288ea54aa 100644
--- a/runtime/syntax/xml.vim
+++ b/runtime/syntax/xml.vim
@@ -3,7 +3,7 @@
" Maintainer: Johannes Zellner <johannes@zellner.org>
" Author and previous maintainer:
" Paul Siegmann <pauls@euronet.nl>
-" Last Change: Fri, 04 Jun 2004 10:41:54 CEST
+" Last Change: Mi, 13 Apr 2005 22:40:09 CEST
" Filenames: *.xml
" $Id$
@@ -58,8 +58,8 @@ syn match xmlError "[<&]"
"
" <tag foo.attribute = "value">
" ^^^^^^^
-syn region xmlString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=xmlEntity display
-syn region xmlString contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=xmlEntity display
+syn region xmlString contained start=+"+ end=+"+ contains=xmlEntity display
+syn region xmlString contained start=+'+ end=+'+ contains=xmlEntity display
" punctuation (within attributes) e.g. <tag xml:foo.attribute ...>
@@ -233,7 +233,7 @@ else
endif
-syn keyword xmlTodo contained TODO FIXME XXX display
+syn keyword xmlTodo contained TODO FIXME XXX
syn match xmlCommentError contained "[^><!]"
syn region xmlCommentPart
\ start=+--+
diff --git a/src/Makefile b/src/Makefile
index 366dcddb6..16d3338ec 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1292,6 +1292,9 @@ DEST_MAN_TOP = $(DESTDIR)$(MANDIR)
# directory first.
# FreeBSD uses ".../man/xx.ISO8859-1/man1" for latin1, use that one too.
DEST_MAN = $(DEST_MAN_TOP)$(MAN1DIR)
+DEST_MAN_FR = $(DEST_MAN_TOP)/fr$(MAN1DIR)
+DEST_MAN_FR_I = $(DEST_MAN_TOP)/fr.ISO8859-1$(MAN1DIR)
+DEST_MAN_FR_U = $(DEST_MAN_TOP)/fr.UTF-8$(MAN1DIR)
DEST_MAN_IT = $(DEST_MAN_TOP)/it$(MAN1DIR)
DEST_MAN_IT_I = $(DEST_MAN_TOP)/it.ISO8859-1$(MAN1DIR)
DEST_MAN_IT_U = $(DEST_MAN_TOP)/it.UTF-8$(MAN1DIR)
@@ -1823,6 +1826,9 @@ installtools: $(TOOLS) $(DESTDIR)$(exec_prefix) $(DEST_BIN) \
$(STRIP) $(DEST_BIN)/xxd$(EXEEXT)
chmod $(BINMOD) $(DEST_BIN)/xxd$(EXEEXT)
-$(SHELL) ./installman.sh xxd $(DEST_MAN) "" $(INSTALLMANARGS)
+ -$(SHELL) ./installman.sh xxd $(DEST_MAN_FR) "-fr" $(INSTALLMANARGS)
+ -$(SHELL) ./installman.sh xxd $(DEST_MAN_FR_I) "-fr" $(INSTALLMANARGS)
+ -$(SHELL) ./installman.sh xxd $(DEST_MAN_FR_U) "-fr.UTF-8" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh xxd $(DEST_MAN_IT) "-it" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh xxd $(DEST_MAN_IT_I) "-it" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh xxd $(DEST_MAN_IT_U) "-it.UTF-8" $(INSTALLMANARGS)
@@ -1845,12 +1851,21 @@ installtools: $(TOOLS) $(DESTDIR)$(exec_prefix) $(DEST_BIN) \
# install the language specific files, if they were unpacked
install-languages: languages $(DEST_LANG) $(DEST_KMAP)
+ -$(SHELL) ./installman.sh install $(DEST_MAN_FR) "-fr" $(INSTALLMANARGS)
+ -$(SHELL) ./installman.sh install $(DEST_MAN_FR_I) "-fr" $(INSTALLMANARGS)
+ -$(SHELL) ./installman.sh install $(DEST_MAN_FR_U) "-fr.UTF-8" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh install $(DEST_MAN_IT) "-it" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh install $(DEST_MAN_IT_I) "-it" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh install $(DEST_MAN_IT_U) "-it.UTF-8" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh install $(DEST_MAN_RU) "-ru" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh install $(DEST_MAN_RU_U) "-ru.UTF-8" $(INSTALLMANARGS)
-$(SHELL) ./installml.sh install "$(GUI_MAN_TARGETS)" \
+ $(DEST_MAN_FR) $(INSTALLMLARGS)
+ -$(SHELL) ./installml.sh install "$(GUI_MAN_TARGETS)" \
+ $(DEST_MAN_FR_I) $(INSTALLMLARGS)
+ -$(SHELL) ./installml.sh install "$(GUI_MAN_TARGETS)" \
+ $(DEST_MAN_FR_U) $(INSTALLMLARGS)
+ -$(SHELL) ./installml.sh install "$(GUI_MAN_TARGETS)" \
$(DEST_MAN_IT) $(INSTALLMLARGS)
-$(SHELL) ./installml.sh install "$(GUI_MAN_TARGETS)" \
$(DEST_MAN_IT_I) $(INSTALLMLARGS)
@@ -2006,6 +2021,9 @@ uninstall: uninstall_runtime
# Note: the "rmdir" will fail if any files were added after "make install"
uninstall_runtime:
-$(SHELL) ./installman.sh uninstall $(DEST_MAN) "" $(INSTALLMANARGS)
+ -$(SHELL) ./installman.sh uninstall $(DEST_MAN_FR) "" $(INSTALLMANARGS)
+ -$(SHELL) ./installman.sh uninstall $(DEST_MAN_FR_I) "" $(INSTALLMANARGS)
+ -$(SHELL) ./installman.sh uninstall $(DEST_MAN_FR_U) "" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh uninstall $(DEST_MAN_IT) "" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh uninstall $(DEST_MAN_IT_I) "" $(INSTALLMANARGS)
-$(SHELL) ./installman.sh uninstall $(DEST_MAN_IT_U) "" $(INSTALLMANARGS)
@@ -2014,6 +2032,12 @@ uninstall_runtime:
-$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
$(DEST_MAN) $(INSTALLMLARGS)
-$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
+ $(DEST_MAN_FR) $(INSTALLMLARGS)
+ -$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
+ $(DEST_MAN_FR_I) $(INSTALLMLARGS)
+ -$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
+ $(DEST_MAN_FR_U) $(INSTALLMLARGS)
+ -$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
$(DEST_MAN_IT) $(INSTALLMLARGS)
-$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
$(DEST_MAN_IT_I) $(INSTALLMLARGS)
@@ -2024,6 +2048,7 @@ uninstall_runtime:
-$(SHELL) ./installml.sh uninstall "$(GUI_MAN_TARGETS)" \
$(DEST_MAN_RU_U) $(INSTALLMLARGS)
-rm -f $(DEST_MAN)/xxd.1
+ -rm -f $(DEST_MAN_FR)/xxd.1 $(DEST_MAN_FR_I)/xxd.1 $(DEST_MAN_FR_U)/xxd.1
-rm -f $(DEST_MAN_IT)/xxd.1 $(DEST_MAN_IT_I)/xxd.1 $(DEST_MAN_IT_U)/xxd.1
-rm -f $(DEST_MAN_RU)/xxd.1 $(DEST_MAN_RU_U)/xxd.1
-rm -f $(DEST_HELP)/*.txt $(DEST_HELP)/tags $(DEST_HELP)/*.pl
diff --git a/src/charset.c b/src/charset.c
index bd319ffe7..a82a7264b 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -972,6 +972,19 @@ init_spell_chartab()
}
#endif
#ifdef FEAT_MBYTE
+ else if (STRCMP(p_enc, "iso-8859-2") == 0)
+ {
+ /* latin2 */
+ for ( ; i <= 0xa0; ++i)
+ spell_chartab[i] = FALSE;
+ for ( ; i <= 255; ++i)
+ spell_chartab[i] = TRUE;
+ spell_chartab[0xa4] = FALSE; /* currency sign */
+ spell_chartab[0xa7] = FALSE; /* paragraph sign */
+ spell_chartab[0xad] = FALSE; /* dash */
+ spell_chartab[0xb0] = FALSE; /* degrees */
+ spell_chartab[0xf7] = FALSE; /* divide-by */
+ }
else
#endif
#if defined(FEAT_MBYTE) || !defined(MSDOS)
@@ -1117,6 +1130,7 @@ win_lbr_chartabsize(wp, s, col, headp)
int numberextra;
char_u *ps;
int tab_corr = (*s == TAB);
+ int n;
/*
* No 'linebreak' and 'showbreak': return quickly.
@@ -1160,9 +1174,12 @@ win_lbr_chartabsize(wp, s, col, headp)
col2 = col;
colmax = W_WIDTH(wp) - numberextra;
if (col >= colmax)
- colmax += (((col - colmax)
- / (colmax + win_col_off2(wp))) + 1)
- * (colmax + win_col_off2(wp));
+ {
+ n = colmax + win_col_off2(wp);
+ if (n > 0)
+ colmax += (((col - colmax) / n) + 1) * n;
+ }
+
for (;;)
{
ps = s;
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 5f79af92c..76fafeff0 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -223,6 +223,9 @@ static void ex_popup __ARGS((exarg_T *eap));
#ifndef FEAT_SYN_HL
# define ex_syntax ex_ni
#endif
+#if !defined(FEAT_SYN_HL) || !defined(FEAT_MBYTE)
+# define ex_mkspell ex_ni
+#endif
#ifndef FEAT_MZSCHEME
# define ex_mzscheme ex_script_ni
# define ex_mzfile ex_ni
@@ -4149,11 +4152,11 @@ expand_filename(eap, cmdlinep, errormsgp)
/* For a shell command a '!' must be escaped. */
if ((eap->usefilter || eap->cmdidx == CMD_bang)
- && vim_strchr(repl, '!') != NULL)
+ && vim_strpbrk(repl, "!&;()") != NULL)
{
char_u *l;
- l = vim_strsave_escaped(repl, (char_u *)"!");
+ l = vim_strsave_escaped(repl, (char_u *)"!&;()");
if (l != NULL)
{
vim_free(repl);
@@ -7328,7 +7331,8 @@ ex_equal(eap)
ex_sleep(eap)
exarg_T *eap;
{
- int n;
+ int n;
+ long len;
if (cursor_valid())
{
@@ -7336,7 +7340,15 @@ ex_sleep(eap)
if (n >= 0)
windgoto((int)n, curwin->w_wcol);
}
- do_sleep(eap->line2 * (*eap->arg == 'm' ? 1L : 1000L));
+
+ len = eap->line2;
+ switch (*eap->arg)
+ {
+ case 'm': break;
+ case NUL: len *= 1000L; break;
+ default: EMSG2(_(e_invarg2), eap->arg); return;
+ }
+ do_sleep(len);
}
/*
diff --git a/src/fileio.c b/src/fileio.c
index a5e888abe..d88111a13 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2649,7 +2649,10 @@ buf_write(buf, fname, sfname, start, end, eap, append, forceit,
if (reset_changed
&& whole
&& buf == curbuf
- && curbuf->b_ffname == NULL
+#ifdef FEAT_QUICKFIX
+ && !bt_nofile(buf)
+#endif
+ && buf->b_ffname == NULL
&& !filtering
&& vim_strchr(p_cpo, CPO_FNAMEW) != NULL)
{
diff --git a/src/gui.c b/src/gui.c
index 82124d034..54804f71c 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -4326,17 +4326,18 @@ ex_gui(eap)
/*
* This is shared between Athena, Motif and GTK.
*/
-static char_u *gfp_buffer;
-
-static void gfp_setname __ARGS((char_u *fname));
+static void gfp_setname __ARGS((char_u *fname, void *cookie));
/*
* Callback function for do_in_runtimepath().
*/
static void
-gfp_setname(fname)
+gfp_setname(fname, cookie)
char_u *fname;
+ void *cookie;
{
+ char_u *gfp_buffer = cookie;
+
if (STRLEN(fname) >= MAXPATHL)
*gfp_buffer = NUL;
else
@@ -4356,8 +4357,8 @@ gui_find_bitmap(name, buffer, ext)
if (STRLEN(name) > MAXPATHL - 14)
return FAIL;
sprintf((char *)buffer, "bitmaps/%s.%s", name, ext);
- gfp_buffer = buffer;
- if (do_in_runtimepath(buffer, FALSE, gfp_setname) == FAIL || *buffer == NUL)
+ if (do_in_runtimepath(buffer, FALSE, gfp_setname, buffer) == FAIL
+ || *buffer == NUL)
return FAIL;
return OK;
}
diff --git a/src/gui_kde_x11.cc b/src/gui_kde_x11.cc
index 3bb80765a..21969c586 100644
--- a/src/gui_kde_x11.cc
+++ b/src/gui_kde_x11.cc
@@ -970,10 +970,20 @@ gui_mch_draw_part_cursor(int w, int h, guicolor_T color)//{{{
QPainter p(gui.w);
p.setPen(color);
p.fillRect(
+#ifdef FEAT_RIGHTLEFT
+ /* vertical line should be on the right of current point */
+ CURSOR_BAR_RIGHT ? FILL_X(gui.col + 1) - w :
+#endif
FILL_X(gui.col),
FILL_Y(gui.row) + gui.char_height - h + 1,
w, h - 2, QColor( color, color));
- p.drawRect(FILL_X(gui.col), FILL_Y(gui.row) + gui.char_height - h
+ p.drawRect(
+#ifdef FEAT_RIGHTLEFT
+ /* vertical line should be on the right of current point */
+ CURSOR_BAR_RIGHT ? FILL_X(gui.col + 1) - w :
+#endif
+ FILL_X(gui.col),
+ FILL_Y(gui.row) + gui.char_height - h
+ (int)p_linespace / 2,
w, h - (int)p_linespace);
}//}}}
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 50c5e5939..e83ff4060 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -1794,7 +1794,7 @@ gui_mch_draw_string(
#ifdef FEAT_MBYTE
static WCHAR *unicodebuf = NULL;
static int *unicodepdy = NULL;
- int unibuflen = 0;
+ static int unibuflen = 0;
int n = 0;
#endif
HPEN hpen, old_pen;
@@ -1923,7 +1923,7 @@ gui_mch_draw_string(
break;
/* Check if the Unicode buffer exists and is big enough. Create it
- * with the same lengt as the multi-byte string, the number of wide
+ * with the same length as the multi-byte string, the number of wide
* characters is always equal or smaller. */
if ((enc_utf8
|| (enc_codepage > 0 && (int)GetACP() != enc_codepage)
diff --git a/src/macros.h b/src/macros.h
index 233df0f25..f7bb10dca 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -260,8 +260,10 @@
# define mb_ptr_adv(p) p += has_mbyte ? (*mb_ptr2len_check)(p) : 1
# define mb_ptr_back(s, p) p -= has_mbyte ? ((*mb_head_off)(s, p - 1) + 1) : 1
# define MB_COPY_CHAR(f, t) if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++
+# define MB_CHARLEN(p) mb_charlen(p)
#else
# define mb_ptr_adv(p) ++p
# define mb_ptr_back(s, p) --p
# define MB_COPY_CHAR(f, t) *t++ = *f++
+# define MB_CHARLEN(p) STRLEN(p)
#endif
diff --git a/src/mbyte.c b/src/mbyte.c
index 7f8400d5c..70bb84389 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -706,6 +706,11 @@ codepage_invalid:
gui_mch_update_codec();
#endif
+#ifdef FEAT_SYN_HL
+ /* Need to reload spell dictionaries */
+ spell_reload();
+#endif
+
return NULL;
}
diff --git a/src/misc2.c b/src/misc2.c
index c8952074c..0735e2963 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -5241,7 +5241,8 @@ qsort(base, elm_count, elm_size, cmp)
}
#endif
-#if defined(FEAT_EX_EXTRA) || defined(FEAT_CMDL_COMPL) || defined(PROTO)
+#if defined(FEAT_EX_EXTRA) || defined(FEAT_CMDL_COMPL) \
+ || (defined(FEAT_SYN_HL) && defined(FEAT_MBYTE)) || defined(PROTO)
/*
* Sort an array of strings.
*/
diff --git a/src/normal.c b/src/normal.c
index fb6f8f981..85d84c45b 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -6065,6 +6065,18 @@ nv_brackets(cap)
}
#endif
+#ifdef FEAT_SYN_HL
+ /*
+ * "[s", "[S", "]s" and "]S": move to next spell error.
+ */
+ else if (cap->nchar == 's' || cap->nchar == 'S')
+ {
+ if (spell_move_to(cap->cmdchar == ']' ? FORWARD : BACKWARD,
+ cap->nchar == 's' ? TRUE : FALSE) == FAIL)
+ clearopbeep(cap->oap);
+ }
+#endif
+
/* Not a valid cap->nchar. */
else
clearopbeep(cap->oap);
@@ -8493,6 +8505,7 @@ nv_put(cap)
int regname = 0;
void *reg1 = NULL, *reg2 = NULL;
int empty = FALSE;
+ int was_visual = FALSE;
#endif
int dir;
int flags = 0;
@@ -8527,6 +8540,7 @@ nv_put(cap)
* Need to save and restore the registers that the delete
* overwrites if the old contents is being put.
*/
+ was_visual = TRUE;
regname = cap->oap->regname;
# ifdef FEAT_CLIPBOARD
adjust_clip_reg(&regname);
@@ -8587,8 +8601,17 @@ nv_put(cap)
/* If a register was saved, put it back now. */
if (reg2 != NULL)
put_register(regname, reg2);
+
+ /* What to reselect with "gv"? Selecting the just put text seems to
+ * be the most useful, since the original text was removed. */
+ if (was_visual)
+ {
+ curbuf->b_visual_start = curbuf->b_op_start;
+ curbuf->b_visual_end = curbuf->b_op_end;
+ }
+
/* When all lines were selected and deleted do_put() leaves an empty
- * line that needs to delete now. */
+ * line that needs to be deleted now. */
if (empty && *ml_get(curbuf->b_ml.ml_line_count) == NUL)
ml_delete(curbuf->b_ml.ml_line_count, TRUE);
#endif
diff --git a/src/os_unix.c b/src/os_unix.c
index afe9bfdc0..80735b69a 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -5177,6 +5177,8 @@ mch_expand_wildcards(num_pat, pat, num_file, file, flags)
else if (!intick && vim_strchr((char_u *)" '",
pat[i][j]) != NULL)
{
+ /* Put quotes around special characters, but not when
+ * inside ``. */
*p++ = '"';
while (pat[i][j] != NUL
&& vim_strchr((char_u *)" '", pat[i][j]) != NULL)
diff --git a/src/quickfix.c b/src/quickfix.c
index a4c016e09..e022c787a 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -2338,11 +2338,9 @@ ex_vimgrep(eap)
char_u **fnames;
char_u *s;
char_u *p;
- int i;
int fi;
qfline_T *prevp = NULL;
long lnum;
- garray_T ga;
buf_T *buf;
int duplicate_name = FALSE;
int using_dummy;
@@ -2404,12 +2402,7 @@ ex_vimgrep(eap)
;
/* parse the list of arguments */
- if (get_arglist(&ga, p) == FAIL)
- goto theend;
- i = gen_expand_wildcards(ga.ga_len, (char_u **)ga.ga_data,
- &fcount, &fnames, EW_FILE|EW_NOTFOUND);
- ga_clear(&ga);
- if (i == FAIL)
+ if (get_arglist_exp(p, &fcount, &fnames) == FAIL)
goto theend;
if (fcount == 0)
{
diff --git a/src/regexp.c b/src/regexp.c
index fe20b3a8f..8a2643dcc 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -738,65 +738,69 @@ reg_equi_class(c)
{
switch (c)
{
- case 'A': case 'À': case 'Á': case 'Â':
- case 'Ã': case 'Ä': case 'Å':
- regmbc('A'); regmbc('À'); regmbc('Á'); regmbc('Â');
- regmbc('Ã'); regmbc('Ä'); regmbc('Å');
+ case 'A': case '\300': case '\301': case '\302':
+ case '\303': case '\304': case '\305':
+ regmbc('A'); regmbc('\300'); regmbc('\301');
+ regmbc('\302'); regmbc('\303'); regmbc('\304');
+ regmbc('\305');
return;
- case 'C': case 'Ç':
- regmbc('C'); regmbc('Ç');
+ case 'C': case '\307':
+ regmbc('C'); regmbc('\307');
return;
- case 'E': case 'È': case 'É': case 'Ê': case 'Ë':
- regmbc('E'); regmbc('È'); regmbc('É'); regmbc('Ê');
- regmbc('Ë');
+ case 'E': case '\310': case '\311': case '\312': case '\313':
+ regmbc('E'); regmbc('\310'); regmbc('\311');
+ regmbc('\312'); regmbc('\313');
return;
- case 'I': case 'Ì': case 'Í': case 'Î': case 'Ï':
- regmbc('I'); regmbc('Ì'); regmbc('Í'); regmbc('Î');
- regmbc('Ï');
+ case 'I': case '\314': case '\315': case '\316': case '\317':
+ regmbc('I'); regmbc('\314'); regmbc('\315');
+ regmbc('\316'); regmbc('\317');
return;
- case 'N': case 'Ñ':
- regmbc('N'); regmbc('Ñ');
+ case 'N': case '\321':
+ regmbc('N'); regmbc('\321');
return;
- case 'O': case 'Ò': case 'Ó': case 'Ô': case 'Õ': case 'Ö':
- regmbc('O'); regmbc('Ò'); regmbc('Ó'); regmbc('Ô');
- regmbc('Õ'); regmbc('Ö');
+ case 'O': case '\322': case '\323': case '\324': case '\325':
+ case '\326':
+ regmbc('O'); regmbc('\322'); regmbc('\323');
+ regmbc('\324'); regmbc('\325'); regmbc('\326');
return;
- case 'U': case 'Ù': case 'Ú': case 'Û': case 'Ü':
- regmbc('U'); regmbc('Ù'); regmbc('Ú'); regmbc('Û');
- regmbc('Ü');
+ case 'U': case '\331': case '\332': case '\333': case '\334':
+ regmbc('U'); regmbc('\331'); regmbc('\332');
+ regmbc('\333'); regmbc('\334');
return;
- case 'Y': case 'Ý':
- regmbc('Y'); regmbc('Ý');
+ case 'Y': case '\335':
+ regmbc('Y'); regmbc('\335');
return;
- case 'a': case 'à': case 'á': case 'â':
- case 'ã': case 'ä': case 'å':
- regmbc('a'); regmbc('à'); regmbc('á'); regmbc('â');
- regmbc('ã'); regmbc('ä'); regmbc('å');
+ case 'a': case '\340': case '\341': case '\342':
+ case '\343': case '\344': case '\345':
+ regmbc('a'); regmbc('\340'); regmbc('\341');
+ regmbc('\342'); regmbc('\343'); regmbc('\344');
+ regmbc('\345');
return;
- case 'c': case 'ç':
- regmbc('c'); regmbc('ç');
+ case 'c': case '\347':
+ regmbc('c'); regmbc('\347');
return;
- case 'e': case 'è': case 'é': case 'ê': case 'ë':
- regmbc('e'); regmbc('è'); regmbc('é'); regmbc('ê');
- regmbc('ë');
+ case 'e': case '\350': case '\351': case '\352': case '\353':
+ regmbc('e'); regmbc('\350'); regmbc('\351');
+ regmbc('\352'); regmbc('\353');
return;
- case 'i': case 'ì': case 'í': case 'î': case 'ï':
- regmbc('i'); regmbc('ì'); regmbc('í'); regmbc('î');
- regmbc('ï');
+ case 'i': case '\354': case '\355': case '\356': case '\357':
+ regmbc('i'); regmbc('\354'); regmbc('\355');
+ regmbc('\356'); regmbc('\357');
return;
- case 'n': case 'ñ':
- regmbc('n'); regmbc('ñ');
+ case 'n': case '\361':
+ regmbc('n'); regmbc('\361');
return;
- case 'o': case 'ò': case 'ó': case 'ô': case 'õ': case 'ö':
- regmbc('o'); regmbc('ò'); regmbc('ó'); regmbc('ô');
- regmbc('õ'); regmbc('ö');
+ case 'o': case '\362': case '\363': case '\364': case '\365':
+ case '\366':
+ regmbc('o'); regmbc('\362'); regmbc('\363');
+ regmbc('\364'); regmbc('\365'); regmbc('\366');
return;
- case 'u': case 'ù': case 'ú': case 'û': case 'ü':
- regmbc('u'); regmbc('ù'); regmbc('ú'); regmbc('û');
- regmbc('ü');
+ case 'u': case '\371': case '\372': case '\373': case '\374':
+ regmbc('u'); regmbc('\371'); regmbc('\372');
+ regmbc('\373'); regmbc('\374');
return;
- case 'y': case 'ý': case 'ÿ':
- regmbc('y'); regmbc('ý'); regmbc('ÿ');
+ case 'y': case '\375': case '\377':
+ regmbc('y'); regmbc('\375'); regmbc('\377');
return;
}
}
diff --git a/src/screen.c b/src/screen.c
index 70c7ff189..b2e118127 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -3605,7 +3605,7 @@ win_line(wp, lnum, startrow, endrow)
iswordc = spell_iswordc(prev_ptr);
if (iswordc && !prev_iswordc)
{
- word_end = v + spell_check(wp, prev_ptr,
+ word_end = v + spell_check(wp, line, prev_ptr,
&spell_attr);
/* In Insert mode only highlight a word that
* doesn't touch the cursor. */
@@ -8002,7 +8002,7 @@ showmode()
if (gui.in_use)
{
if (hangul_input_state_get())
- MSG_PUTS_ATTR(" ÇѱÛ", attr); /* HANGUL */
+ MSG_PUTS_ATTR(" \307\321\261\333", attr); /* HANGUL */
}
#endif
#ifdef FEAT_INS_EXPAND
diff --git a/src/spell.c b/src/spell.c
index 30a02ab41..e3a97fc83 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -16,6 +16,11 @@
* "word" is either a "dword" or an "nword".
*/
+/*
+ * Why doesn't Vim use aspell/ispell/myspell/etc.?
+ * See ":help develop-spell".
+ */
+
#if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64)
# include <io.h> /* for lseek(), must be before vim.h */
#endif
@@ -32,8 +37,3860 @@
/*
* Structure that is used to store the text from the language file. This
- * avoids the need to allocate each individual word and copying it. It's
- * allocated in big chunks for speed.
+ * avoids the need to allocate space for each individual word. It's allocated
+ * in big chunks for speed.
+ */
+#define SBLOCKSIZE 4096 /* default size of sb_data */
+typedef struct sblock_S sblock_T;
+struct sblock_S
+{
+ sblock_T *sb_next; /* next block in list */
+ char_u sb_data[1]; /* data, actually longer */
+};
+
+/* Info from "REP" entries in ".aff" file used in af_rep. */
+typedef struct repentry_S
+{
+ char_u *re_from;
+ char_u *re_to;
+} repentry_T;
+
+/*
+ * Structure to store affix info.
+ */
+typedef struct affitem_S affitem_T;
+struct affitem_S
+{
+ affitem_T *ai_next; /* next affix with same ai_add[] or NULL */
+ short_u ai_nr; /* affix number */
+ char_u ai_combine; /* prefix combines with suffix */
+ char_u ai_choplen; /* length of ai_chop in bytes */
+ char_u ai_addlen; /* length of ai_add in bytes */
+ char_u *ai_chop; /* text chopped off basic word (can be NULL) */
+ char_u ai_add[1]; /* text added to basic word (actually longer) */
+};
+
+/* Get affitem_T pointer from hashitem that uses ai_add */
+static affitem_T dumai;
+#define HI2AI(hi) ((affitem_T *)((hi)->hi_key - (dumai.ai_add - (char_u *)&dumai)))
+
+/*
+ * Structure used to store words and other info for one language.
+ */
+typedef struct slang_S slang_T;
+struct slang_S
+{
+ slang_T *sl_next; /* next language */
+ char_u *sl_name; /* language name "en", "en.rare", "nl", etc. */
+ hashtab_T sl_words; /* main word table, fword_T */
+ int sl_prefcnt; /* number of prefix NRs */
+ garray_T sl_preftab; /* list of hashtables to lookup prefixes */
+ affitem_T *sl_prefzero; /* list of prefixes with zero add length */
+ int sl_suffcnt; /* number of suffix NRs */
+ garray_T sl_sufftab; /* list of hashtables to lookup suffixes */
+ affitem_T *sl_suffzero; /* list of suffixes with zero add length */
+ char_u *sl_try; /* "TRY" from .aff file */
+ garray_T sl_rep; /* list of repentry_T entries from REP lines */
+ char_u sl_regions[17]; /* table with up to 8 region names plus NUL */
+ sblock_T *sl_block; /* list with allocated memory blocks */
+ int sl_error; /* error while loading */
+};
+
+static slang_T *first_lang = NULL;
+
+/*
+ * Structure to store an addition to a basic word.
+ */
+typedef struct addword_S addword_T;
+struct addword_S
+{
+ addword_T *aw_next; /* next addition */
+ char_u aw_flags; /* ADD_ flags */
+ char_u aw_leadlen; /* length of lead in bytes */
+ char_u aw_wordlen; /* length of aw_word in bytes */
+ char_u aw_region; /* region for word with this addition */
+ char_u aw_word[1]; /* text, actually longer: case-folded addition
+ plus, with ADD_KEEPCAP: keep-case addition */
+};
+
+/*
+ * Structure to store a basic word.
+ */
+typedef struct fword_S fword_T;
+struct fword_S
+{
+ fword_T *fw_next; /* same basic word with different caps */
+ char_u fw_region; /* region bits */
+ char_u fw_prefixcnt; /* number of prefix numbers */
+ char_u fw_suffixcnt; /* number of suffix numbers */
+ short_u fw_flags; /* BWF_ flags */
+ void *fw_prefix; /* table with prefix numbers */
+ void *fw_suffix; /* table with suffix numbers */
+ addword_T *fw_adds; /* first addword_T entry */
+ char_u fw_word[1]; /* actually longer: case folded word, or
+ keep-case word when (flags & BWF_KEEPCAP) */
+};
+
+/* Get fword_T pointer from hashitem that uses fw_word */
+static fword_T dumfw;
+#define HI2FWORD(hi) ((fword_T *)((hi)->hi_key - (dumfw.fw_word - (char_u *)&dumfw)))
+
+#define REGION_ALL 0xff
+
+
+/*
+ * Structure used in "b_langp", filled from 'spelllang'.
+ */
+typedef struct langp_S
+{
+ slang_T *lp_slang; /* info for this language (NULL for last one) */
+ int lp_region; /* bitmask for region or REGION_ALL */
+} langp_T;
+
+#define LANGP_ENTRY(ga, i) (((langp_T *)(ga).ga_data) + (i))
+
+#define SP_OK 0
+#define SP_BAD 1
+#define SP_RARE 2
+#define SP_LOCAL 3
+
+/* flags used for basic words in the spell file */
+#define BWF_VALID 0x01 /* word is valid without additions */
+#define BWF_REGION 0x02 /* region byte follows */
+#define BWF_ONECAP 0x04 /* first letter must be capital */
+#define BWF_SUFFIX 0x08 /* has suffix NR list */
+#define BWF_SECOND 0x10 /* second flags byte follows */
+
+#define BWF_ADDS 0x0100 /* there are additions */
+#define BWF_PREFIX 0x0200 /* has prefix NR list */
+#define BWF_ALLCAP 0x0400 /* all letters must be capital (not used
+ for single-letter words) */
+#define BWF_KEEPCAP 0x0800 /* Keep case as-is */
+
+/* flags used for addition in the spell file */
+#define ADD_REGION 0x02 /* region byte follows */
+#define ADD_ONECAP 0x04 /* first letter must be capital */
+#define ADD_ALLCAP 0x40 /* all letters must be capital (not used
+ for single-letter words) */
+#define ADD_KEEPCAP 0x80 /* fixed case */
+
+/* Translate ADD_ flags to BWF_ flags.
+ * (Needed to keep ADD_ flags in one byte.) */
+#define ADD2BWF(x) (((x) & 0x0f) | (((x) & 0xf0) << 4))
+
+#define VIMSPELLMAGIC "VIMspell01" /* string at start of Vim spell file */
+#define VIMSPELLMAGICL 10
+
+/*
+ * Structure to store info for word matching.
+ */
+typedef struct matchinf_S
+{
+ langp_T *mi_lp; /* info for language and region */
+ slang_T *mi_slang; /* info for the language */
+ char_u *mi_line; /* start of line containing word */
+ char_u *mi_word; /* start of word being checked */
+ char_u *mi_end; /* first non-word char after mi_word */
+ char_u *mi_wend; /* end of matching word (is "mi_end"
+ * or further) */
+ char_u *mi_cword; /* word to check, can be "mi_fword" */
+ char_u mi_fword[MAXWLEN + 1]; /* "mi_word" to "mi_end" case-folded */
+ int mi_faddlen; /* length of valid bytes in "mi_fadd" */
+ char_u *mi_faddp; /* next char to be added to "mi_fadd" */
+ char_u mi_fadd[MAXWLEN + 1]; /* "mi_end" and further case-folded */
+ int mi_result; /* result so far: SP_BAD, SP_OK, etc. */
+ int mi_capflags; /* BWF_ONECAP BWF_ALLCAP BWF_KEEPCAP */
+} matchinf_T;
+
+static int word_match __ARGS((matchinf_T *mip));
+static int check_adds __ARGS((matchinf_T *mip, fword_T *fw, int req_pref, int req_suf));
+static int supports_afffix __ARGS((int cnt, void *afffix, int afffixcnt, int nr));
+static int prefix_match __ARGS((matchinf_T *mip));
+static int suffix_match __ARGS((matchinf_T *mip));
+static int match_caps __ARGS((int flags, char_u *caseword, matchinf_T *mip, char_u *cword, char_u *end));
+static slang_T *slang_alloc __ARGS((char_u *lang));
+static void slang_free __ARGS((slang_T *lp));
+static slang_T *spell_load_lang __ARGS((char_u *lang));
+static void spell_load_file __ARGS((char_u *fname, void *cookie));
+static int spell_load_affixes __ARGS((FILE *fd, slang_T *lp, int *bl_usedp, int affm, void **affp));
+static void *getroom __ARGS((slang_T *lp, int *bl_used, int len));
+static int find_region __ARGS((char_u *rp, char_u *region));
+static int captype __ARGS((char_u *word, char_u *end));
+
+/*
+ * Main spell-checking function.
+ * "ptr" points to the start of a word.
+ * "*attrp" is set to the attributes for a badly spelled word. For a non-word
+ * or when it's OK it remains unchanged.
+ * This must only be called when 'spelllang' is not empty.
+ * Returns the length of the word in bytes, also when it's OK, so that the
+ * caller can skip over the word.
+ */
+ int
+spell_check(wp, line, ptr, attrp)
+ win_T *wp; /* current window */
+ char_u *line; /* start of line where "ptr" points into */
+ char_u *ptr;
+ int *attrp;
+{
+ matchinf_T mi; /* Most things are put in "mi" so that it can
+ be passed to functions quickly. */
+
+ /* Find the end of the word. We already know that *ptr is a word char. */
+ mi.mi_word = ptr;
+ mi.mi_end = ptr;
+ do
+ {
+ mb_ptr_adv(mi.mi_end);
+ } while (*mi.mi_end != NUL && spell_iswordc(mi.mi_end));
+
+ /* A word starting with a number is always OK. */
+ if (*ptr >= '0' && *ptr <= '9')
+ return (int)(mi.mi_end - ptr);
+
+ /* Make case-folded copy of the Word. Compute its hash value. */
+ (void)str_foldcase(ptr, mi.mi_end - ptr, mi.mi_fword, MAXWLEN + 1);
+ mi.mi_cword = mi.mi_fword;
+
+ /* The word is bad unless we find it in the dictionary. */
+ mi.mi_result = SP_BAD;
+ mi.mi_wend = mi.mi_end;
+ mi.mi_faddp = mi.mi_end;
+ mi.mi_faddlen = 0;
+ mi.mi_capflags = captype(ptr, mi.mi_end);
+ mi.mi_line = line;
+
+ /*
+ * Loop over the languages specified in 'spelllang'.
+ * We check them all, because a matching word may have additions that are
+ * longer than an already found matching word.
+ */
+ for (mi.mi_lp = LANGP_ENTRY(wp->w_buffer->b_langp, 0);
+ mi.mi_lp->lp_slang != NULL; ++mi.mi_lp)
+ {
+ /*
+ * Check for a matching word.
+ * If not found or wrong region try removing prefixes (and then
+ * suffixes).
+ * If still not found or wrong region try removing suffixes.
+ */
+ mi.mi_slang = mi.mi_lp->lp_slang;
+ if (!word_match(&mi) || mi.mi_result != SP_OK)
+ if (!prefix_match(&mi) || mi.mi_result != SP_OK)
+ suffix_match(&mi);
+ }
+
+ if (mi.mi_result != SP_OK)
+ {
+ if (mi.mi_result == SP_BAD)
+ *attrp = highlight_attr[HLF_SPB];
+ else if (mi.mi_result == SP_RARE)
+ *attrp = highlight_attr[HLF_SPR];
+ else
+ *attrp = highlight_attr[HLF_SPL];
+ }
+
+ return (int)(mi.mi_wend - ptr);
+}
+
+/*
+ * Check if the word "mip->mi_cword" matches.
+ */
+ static int
+word_match(mip)
+ matchinf_T *mip;
+{
+ hash_T fhash = hash_hash(mip->mi_cword);
+ hashitem_T *hi;
+ fword_T *fw;
+ int valid = FALSE;
+
+ hi = hash_lookup(&mip->mi_slang->sl_words, mip->mi_cword, fhash);
+ if (HASHITEM_EMPTY(hi))
+ return FALSE;
+
+ /*
+ * Find a basic word for which the case of word "cword" is correct.
+ * If it is, check additions and use the longest one.
+ */
+ for (fw = HI2FWORD(hi); fw != NULL; fw = fw->fw_next)
+ if (match_caps(fw->fw_flags, fw->fw_word, mip,
+ mip->mi_word, mip->mi_end))
+ valid |= check_adds(mip, fw, -1, -1);
+
+ return valid;
+}
+
+/*
+ * Check a matching basic word for additions.
+ * Return TRUE if we have a valid match.
+ */
+ static int
+check_adds(mip, fw, req_pref, req_suf)
+ matchinf_T *mip;
+ fword_T *fw;
+ int req_pref; /* required prefix nr, -1 if none */
+ int req_suf; /* required suffix nr, -1 if none */
+{
+ int valid = FALSE;
+ addword_T *aw;
+ char_u *p;
+ int addlen;
+ int fl;
+
+ /* A word may be valid without additions. */
+ if ((fw->fw_flags & BWF_VALID)
+ && (req_pref < 0 || supports_afffix(mip->mi_slang->sl_prefcnt,
+ fw->fw_prefix, fw->fw_prefixcnt, req_pref))
+ && (req_suf < 0 || supports_afffix(mip->mi_slang->sl_suffcnt,
+ fw->fw_suffix, fw->fw_suffixcnt, req_suf)))
+ {
+ valid = TRUE;
+ if (mip->mi_result != SP_OK)
+ {
+ if ((fw->fw_region & mip->mi_lp->lp_region) == 0)
+ mip->mi_result = SP_LOCAL;
+ else
+ mip->mi_result = SP_OK;
+ }
+ }
+
+ /*
+ * Check additions, both before and after the word.
+ * This may make the word longer, thus we also need to check
+ * when we already found a matching word.
+ */
+ for (aw = fw->fw_adds; aw != NULL; aw = aw->aw_next)
+ {
+ if (aw->aw_leadlen > 0)
+ {
+ /* There is a leader, verify that it matches. */
+ if (aw->aw_leadlen > mip->mi_word - mip->mi_line
+ || STRNCMP(mip->mi_word - aw->aw_leadlen,
+ aw->aw_word, aw->aw_leadlen) != 0)
+ continue;
+ if (mip->mi_word - aw->aw_leadlen > mip->mi_line)
+ {
+ /* There must not be a word character just before the
+ * leader. */
+ p = mip->mi_word - aw->aw_leadlen;
+ mb_ptr_back(mip->mi_line, p);
+ if (spell_iswordc(p))
+ continue;
+ }
+ /* Leader matches. Addition is rest of "aw_word". */
+ p = aw->aw_word + aw->aw_leadlen;
+ }
+ else
+ /* No leader, use whole of "aw_word" for addition. */
+ p = aw->aw_word;
+
+ addlen = aw->aw_wordlen - aw->aw_leadlen;
+ if (addlen > 0)
+ {
+ /* Check for matching addition and no word character after it.
+ * First make sure we have enough case-folded chars to compare
+ * with. */
+ while (mip->mi_faddlen <= addlen)
+ {
+ if (*mip->mi_faddp == NUL)
+ {
+ mip->mi_fadd[mip->mi_faddlen] = NUL;
+ break;
+ }
+#ifdef FEAT_MBYTE
+ fl = (*mb_ptr2len_check)(mip->mi_faddp);
+#else
+ fl = 1;
+#endif
+ (void)str_foldcase(mip->mi_faddp, fl,
+ mip->mi_fadd + mip->mi_faddlen,
+ MAXWLEN - mip->mi_faddlen);
+ mip->mi_faddp += fl;
+ mip->mi_faddlen += STRLEN(mip->mi_fadd + mip->mi_faddlen);
+ }
+
+ if (STRNCMP(mip->mi_fadd, p, addlen) != 0
+ || (mip->mi_fadd[addlen] != NUL
+ && spell_iswordc(mip->mi_fadd + addlen)))
+ continue;
+
+ /* Compute the length in the original word, before case folding. */
+#ifdef FEAT_MBYTE
+ if (has_mbyte)
+ {
+ int l;
+
+ p = mip->mi_end;
+ for (l = 0; l < addlen;
+ l += (*mb_ptr2len_check)(mip->mi_fadd + l))
+ mb_ptr_adv(p);
+ addlen = p - mip->mi_end;
+ }
+#endif
+
+ /* Check case of the addition. */
+ if (!match_caps(ADD2BWF(aw->aw_flags),
+ aw->aw_word + aw->aw_wordlen + 1, mip,
+ mip->mi_end, mip->mi_end + addlen))
+ continue;
+ }
+
+ /* Match! Use the new length if it's longer. */
+ if (mip->mi_wend < mip->mi_end + addlen)
+ mip->mi_wend = mip->mi_end + addlen;
+
+ valid = TRUE;
+ if (mip->mi_result != SP_OK)
+ {
+ if ((aw->aw_region & mip->mi_lp->lp_region) == 0)
+ mip->mi_result = SP_LOCAL;
+ else
+ mip->mi_result = SP_OK;
+ }
+ }
+
+ return valid;
+}
+
+/*
+ * Return TRUE if word "fw" supports afffix "nr".
+ */
+ static int
+supports_afffix(cnt, afffix, afffixcnt, nr)
+ int cnt;
+ void *afffix;
+ int afffixcnt;
+ int nr;
+{
+ char_u *pc;
+ short_u *ps;
+ int i;
+
+ if (cnt <= 256)
+ {
+ /* char_u affix numbers */
+ pc = afffix;
+ for (i = afffixcnt; --i >= 0; )
+ if (*pc++ == nr)
+ return TRUE;
+ }
+ else
+ {
+ /* short_u affix numbers */
+ ps = afffix;
+ for (i = afffixcnt; --i >= 0; )
+ if (*ps++ == nr)
+ return TRUE;
+ }
+ return FALSE;
+}
+
+/*
+ * Try finding a match for "mip->mi_cword" by removing prefixes.
+ */
+ static int
+prefix_match(mip)
+ matchinf_T *mip;
+{
+ int len = 0;
+ int charlen = 0;
+ int cc;
+ affitem_T *ai;
+ char_u pword[MAXWLEN + 1];
+ fword_T *fw;
+ hashtab_T *ht;
+ hashitem_T *hi;
+ int i;
+ int found_valid = FALSE;
+ int cstart_charlen = 0;
+ char_u *cstart = mip->mi_word;
+ int capflags_save = mip->mi_capflags;
+ char_u *p;
+
+ /*
+ * Check for prefixes with different character lengths.
+ * Start with zero length (only chop off).
+ */
+ for (charlen = 0; charlen <= mip->mi_slang->sl_preftab.ga_len; ++charlen)
+ {
+ if (charlen > 0)
+ {
+#ifdef FEAT_MBYTE
+ if (has_mbyte)
+ len += mb_ptr2len_check(mip->mi_cword + len);
+ else
+#endif
+ len += 1;
+ }
+ if (mip->mi_cword[len] == NUL) /* end of word, no prefix possible */
+ break;
+
+ if (charlen == 0)
+ ai = mip->mi_slang->sl_prefzero;
+ else
+ {
+ /* Get pointer to hashtab for prefix of this many chars. */
+ ht = ((hashtab_T *)mip->mi_slang->sl_preftab.ga_data) + charlen - 1;
+ if (ht->ht_used == 0)
+ continue;
+
+ cc = mip->mi_cword[len];
+ mip->mi_cword[len] = NUL;
+ hi = hash_find(ht, mip->mi_cword);
+ mip->mi_cword[len] = cc;
+
+ if (HASHITEM_EMPTY(hi))
+ ai = NULL;
+ else
+ ai = HI2AI(hi);
+ }
+
+ /* Loop over all matching prefixes. */
+ for ( ; ai != NULL; ai = ai->ai_next)
+ {
+ /* Create the basic word by removing the prefix and adding the
+ * chop string. */
+ mch_memmove(pword, ai->ai_chop, ai->ai_choplen);
+ STRCPY(pword + ai->ai_choplen, mip->mi_cword + ai->ai_addlen);
+
+ /* Adjust the word start for case checks, we only check the
+ * part after the prefix. */
+ while (cstart_charlen < charlen)
+ {
+ mb_ptr_adv(cstart);
+ ++cstart_charlen;
+ }
+
+ /* Removing the prefix may change the caps, e.g. for
+ * "deAlf" removing "de" makes it ONECAP. */
+ mip->mi_capflags = captype(cstart, mip->mi_end);
+
+ /* Find the basic word. */
+ hi = hash_find(&mip->mi_slang->sl_words, pword);
+ if (!HASHITEM_EMPTY(hi))
+ {
+ /* Check if the word supports this prefix. */
+ for (fw = HI2FWORD(hi); fw != NULL; fw = fw->fw_next)
+ if (match_caps(fw->fw_flags, fw->fw_word, mip,
+ cstart, mip->mi_end))
+ found_valid |= check_adds(mip, fw, ai->ai_nr, -1);
+
+ if (found_valid && mip->mi_result == SP_OK)
+ {
+ /* Found a valid word, no need to try other suffixes. */
+ mip->mi_capflags = capflags_save;
+ return TRUE;
+ }
+ }
+
+ /* No matching basic word without prefix. When combining is
+ * allowed try with suffixes. */
+ if (ai->ai_combine)
+ {
+ /* Pass the word with prefix removed to suffix_match(). */
+ mip->mi_cword = pword;
+ p = mip->mi_word;
+ mip->mi_word = cstart;
+ i = suffix_match(mip);
+ mip->mi_cword = mip->mi_fword;
+ mip->mi_word = p;
+ if (i)
+ {
+ mip->mi_capflags = capflags_save;
+ return TRUE;
+ }
+ }
+ }
+ }
+
+ mip->mi_capflags = capflags_save;
+ return FALSE;
+}
+
+/*
+ * Try finding a match for "mip->mi_cword" by removing suffixes.
+ */
+ static int
+suffix_match(mip)
+ matchinf_T *mip;
+{
+ char_u *sufp;
+ int charlen;
+ affitem_T *ai;
+ char_u pword[MAXWLEN + 1];
+ fword_T *fw;
+ hashtab_T *ht;
+ hashitem_T *hi;
+ int tlen;
+ int cend_charlen = 0;
+ char_u *cend = mip->mi_end;
+ int found_valid = FALSE;
+ int capflags_save = mip->mi_capflags;
+
+ /*
+ * Try suffixes of different length, starting with an empty suffix (chop
+ * only, thus adds something).
+ * Stop checking if there are no suffixes with so many characters.
+ */
+ sufp = mip->mi_cword + STRLEN(mip->mi_cword);
+ for (charlen = 0; charlen <= mip->mi_slang->sl_sufftab.ga_len; ++charlen)
+ {
+ /* Move the pointer to the possible suffix back one character, unless
+ * doing the first round (empty suffix). */
+ if (charlen > 0)
+ {
+ mb_ptr_back(mip->mi_cword, sufp);
+ if (sufp <= mip->mi_cword) /* start of word, no suffix possible */
+ break;
+ }
+
+ if (charlen == 0)
+ ai = mip->mi_slang->sl_suffzero;
+ else
+ {
+ /* Get pointer to hashtab for suffix of this many chars. */
+ ht = ((hashtab_T *)mip->mi_slang->sl_sufftab.ga_data) + charlen - 1;
+ if (ht->ht_used == 0)
+ continue;
+
+ hi = hash_find(ht, sufp);
+ if (HASHITEM_EMPTY(hi))
+ ai = NULL;
+ else
+ ai = HI2AI(hi);
+ }
+
+ if (ai != NULL)
+ {
+ /* Found a list of matching suffixes. Now check that there is one
+ * we can use. */
+ tlen = sufp - mip->mi_cword; /* length of word without suffix */
+ mch_memmove(pword, mip->mi_cword, tlen);
+
+ for ( ; ai != NULL; ai = ai->ai_next)
+ {
+ /* Found a matching suffix. Create the basic word by removing
+ * the suffix and adding the chop string. */
+ if (ai->ai_choplen == 0)
+ pword[tlen] = NUL;
+ else
+ mch_memmove(pword + tlen, ai->ai_chop, ai->ai_choplen + 1);
+
+ /* Find the basic word. */
+ hi = hash_find(&mip->mi_slang->sl_words, pword);
+ if (!HASHITEM_EMPTY(hi))
+ {
+ /* Adjust the end for case checks, we only check the part
+ * before the suffix. */
+ while (cend_charlen < charlen)
+ {
+ mb_ptr_back(mip->mi_word, cend);
+ ++cend_charlen;
+ }
+
+ /* Removing the suffix may change the caps, e.g. for
+ * "UFOs" removing 's' makes it ALLCAP. */
+ mip->mi_capflags = captype(mip->mi_word, cend);
+
+ /* Check if the word supports this suffix. */
+ for (fw = HI2FWORD(hi); fw != NULL; fw = fw->fw_next)
+ if (match_caps(fw->fw_flags, fw->fw_word, mip,
+ mip->mi_word, cend))
+ found_valid |= check_adds(mip, fw, -1, ai->ai_nr);
+
+ if (found_valid && mip->mi_result == SP_OK)
+ {
+ /* Found a valid word, no need to try other suffixes. */
+ mip->mi_capflags = capflags_save;
+ return TRUE;
+ }
+ }
+ }
+ }
+ }
+
+ mip->mi_capflags = capflags_save;
+ return FALSE;
+}
+
+/*
+ * Return TRUE if case of "cword" meets the requirements of case flags
+ * "flags".
+ */
+ static int
+match_caps(flags, caseword, mip, cword, end)
+ int flags; /* flags required by basic word or addition */
+ char_u *caseword; /* word with case as required */
+ matchinf_T *mip;
+ char_u *cword; /* word to compare against "caseword" */
+ char_u *end; /* end of "cword" */
+{
+ char_u *p;
+ int c;
+ int len;
+ int capflags = mip->mi_capflags; /* flags of checked word */
+ int past_second;
+
+ if ((capflags & BWF_KEEPCAP) == 0 && end > mip->mi_end)
+ {
+ /* If "end" is past "mip->mi_end" we need to check the characters
+ * after the basic word. */
+#ifdef FEAT_MBYTE
+ past_second = (mip->mi_word + (*mb_ptr2len_check)(mip->mi_word)
+ < mip->mi_end);
+#else
+ past_second = mip->mi_word + 1 < mip->mi_end;
+#endif
+ for (p = mip->mi_end; p < end; )
+ {
+ if (!spell_iswordc(p))
+ mb_ptr_adv(p);
+ else
+ {
+#ifdef FEAT_MBYTE
+ if (has_mbyte)
+ c = mb_ptr2char_adv(&p);
+ else
+#endif
+ c = *p++;
+ if (MB_ISUPPER(c))
+ {
+ if (capflags == 0 || (capflags & BWF_ONECAP))
+ {
+ capflags = BWF_KEEPCAP; /* lU or UlU */
+ break;
+ }
+ }
+ else
+ {
+ if (capflags & BWF_ALLCAP)
+ {
+ if (past_second)
+ {
+ capflags = BWF_KEEPCAP; /* UUl */
+ break;
+ }
+ capflags = BWF_ONECAP; /* Uu */
+ }
+ }
+ past_second = TRUE;
+ }
+ }
+ }
+
+ if (capflags == BWF_ALLCAP)
+ return TRUE; /* All caps is always OK. */
+
+ if (flags & BWF_KEEPCAP)
+ {
+ len = STRLEN(caseword);
+ return (len == end - cword && STRNCMP(caseword, cword, len) == 0);
+ }
+
+ if (flags & BWF_ALLCAP)
+ return FALSE; /* need ALLCAP, already checked above */
+
+ if (flags & BWF_ONECAP)
+ return capflags == BWF_ONECAP;
+
+ return capflags != BWF_KEEPCAP; /* no case check, only KEEPCAP is bad */
+}
+
+/*
+ * Move to next spell error.
+ * Return OK if found, FAIL otherwise.
+ */
+ int
+spell_move_to(dir, allwords)
+ int dir; /* FORWARD or BACKWARD */
+ int allwords; /* TRUE for "[s" and "]s" */
+{
+ pos_T pos;
+ char_u *line;
+ char_u *p;
+ int wc;
+ int nwc;
+ int attr = 0;
+ int len;
+
+ if (!curwin->w_p_spell || *curwin->w_buffer->b_p_spl == NUL)
+ {
+ EMSG(_("E756: Spell checking not enabled"));
+ return FAIL;
+ }
+
+ /* TODO: moving backwards */
+
+ /* Start looking for bad word at the start of the line, because we can't
+ * start halfway a word and know where it ends. */
+ pos = curwin->w_cursor;
+ pos.col = 0;
+ wc = FALSE;
+
+ while (!got_int)
+ {
+ line = ml_get(pos.lnum);
+ p = line + pos.col;
+ while (*p != NUL)
+ {
+ nwc = spell_iswordc(p);
+ if (!wc && nwc)
+ {
+ /* start of word */
+ /* TODO: check for bad word attr */
+ len = spell_check(curwin, line, p, &attr);
+ if (attr != 0)
+ {
+ if (curwin->w_cursor.lnum < pos.lnum
+ || (curwin->w_cursor.lnum == pos.lnum
+ && curwin->w_cursor.col < (colnr_T)(p - line)))
+ {
+ curwin->w_cursor.lnum = pos.lnum;
+ curwin->w_cursor.col = p - line;
+ return OK;
+ }
+ attr = 0; /* bad word is before or at cursor */
+ }
+ p += len;
+ if (*p == NUL)
+ break;
+ nwc = FALSE;
+ }
+
+ /* advance to next character */
+ mb_ptr_adv(p);
+ wc = nwc;
+ }
+
+ /* Advance to next line. */
+ if (pos.lnum == curbuf->b_ml.ml_line_count)
+ return FAIL;
+ ++pos.lnum;
+ pos.col = 0;
+ wc = FALSE;
+
+ line_breakcheck();
+ }
+
+ return FAIL; /* interrupted */
+}
+
+/*
+ * Load word list for "lang" from a Vim spell file.
+ * "lang" must be the language without the region: "en" or "en-rare".
+ */
+ static slang_T *
+spell_load_lang(lang)
+ char_u *lang;
+{
+ slang_T *lp;
+ char_u fname_enc[80];
+ char_u *p;
+ int r;
+
+ lp = slang_alloc(lang);
+ if (lp != NULL)
+ {
+ /* Find all spell files for "lang" in 'runtimepath' and load them.
+ * Use 'encoding', except that we use "latin1" for "latin9". */
+#ifdef FEAT_MBYTE
+ if (STRLEN(p_enc) < 60 && STRCMP(p_enc, "iso-8859-15") != 0)
+ p = p_enc;
+ else
+#endif
+ p = (char_u *)"latin1";
+ sprintf((char *)fname_enc, "spell/%s.%s.spl", lang, p);
+
+ r = do_in_runtimepath(fname_enc, TRUE, spell_load_file, lp);
+ if (r == FAIL || lp->sl_error)
+ {
+ slang_free(lp);
+ lp = NULL;
+ if (r == FAIL)
+ smsg((char_u *)_("Warning: Cannot find word list \"%s\""),
+ fname_enc + 6);
+ }
+ else
+ {
+ lp->sl_next = first_lang;
+ first_lang = lp;
+ }
+ }
+
+ return lp;
+}
+
+/*
+ * Allocate a new slang_T.
+ * Caller must fill "sl_next".
+ */
+ static slang_T *
+slang_alloc(lang)
+ char_u *lang;
+{
+ slang_T *lp;
+
+ lp = (slang_T *)alloc(sizeof(slang_T));
+ if (lp != NULL)
+ {
+ lp->sl_name = vim_strsave(lang);
+ hash_init(&lp->sl_words);
+ ga_init2(&lp->sl_preftab, sizeof(hashtab_T), 4);
+ ga_init2(&lp->sl_sufftab, sizeof(hashtab_T), 4);
+ lp->sl_prefzero = NULL;
+ lp->sl_suffzero = NULL;
+ lp->sl_try = NULL;
+ ga_init2(&lp->sl_rep, sizeof(repentry_T), 4);
+ lp->sl_regions[0] = NUL;
+ lp->sl_block = NULL;
+ lp->sl_error = FALSE;
+ }
+ return lp;
+}
+
+/*
+ * Free the contents of an slang_T and the structure itself.
+ */
+ static void
+slang_free(lp)
+ slang_T *lp;
+{
+ sblock_T *sp;
+ int i;
+
+ vim_free(lp->sl_name);
+ hash_clear(&lp->sl_words);
+ for (i = 0; i < lp->sl_preftab.ga_len; ++i)
+ hash_clear(((hashtab_T *)lp->sl_preftab.ga_data) + i);
+ ga_clear(&lp->sl_preftab);
+ for (i = 0; i < lp->sl_sufftab.ga_len; ++i)
+ hash_clear(((hashtab_T *)lp->sl_sufftab.ga_data) + i);
+ ga_clear(&lp->sl_sufftab);
+ ga_clear(&lp->sl_rep);
+ vim_free(lp->sl_try);
+ while (lp->sl_block != NULL)
+ {
+ sp = lp->sl_block;
+ lp->sl_block = sp->sb_next;
+ vim_free(sp);
+ }
+ vim_free(lp);
+}
+
+/*
+ * Load one spell file into an slang_T.
+ * Invoked through do_in_runtimepath().
+ */
+ static void
+spell_load_file(fname, cookie)
+ char_u *fname;
+ void *cookie; /* points to the slang_T to be filled */
+{
+ slang_T *lp = cookie;
+ FILE *fd;
+ char_u buf[MAXWLEN + 1];
+ char_u cbuf[MAXWLEN + 1];
+ char_u fbuf[MAXWLEN + 1];
+ char_u *p;
+ int itm;
+ int i;
+ int affcount;
+ int affnr;
+ int affflags;
+ int affitemcnt;
+ int bl_used = SBLOCKSIZE;
+ int widx;
+ int prefm; /* 1 if <= 256 prefixes, sizeof(short_u) otherw. */
+ int suffm; /* 1 if <= 256 suffixes, sizeof(short_u) otherw. */
+ int wlen;
+ int flags;
+ affitem_T *ai, *ai2, **aip;
+ int round;
+ char_u *save_sourcing_name = sourcing_name;
+ linenr_T save_sourcing_lnum = sourcing_lnum;
+ int cnt;
+ int choplen;
+ int addlen;
+ int leadlen;
+ int wordcount;
+ fword_T *fw, *fw2;
+ garray_T *gap;
+ hashtab_T *ht;
+ hashitem_T *hi;
+ hash_T hash;
+ int adds;
+ addword_T *aw;
+ int flen;
+
+ fd = fopen((char *)fname, "r");
+ if (fd == NULL)
+ {
+ EMSG2(_(e_notopen), fname);
+ goto errorend;
+ }
+
+ /* Set sourcing_name, so that error messages mention the file name. */
+ sourcing_name = fname;
+ sourcing_lnum = 0;
+
+ /* <HEADER>: <fileID> <regioncnt> <regionname> ... */
+ for (i = 0; i < VIMSPELLMAGICL; ++i)
+ buf[i] = getc(fd); /* <fileID> */
+ if (STRNCMP(buf, VIMSPELLMAGIC, VIMSPELLMAGICL) != 0)
+ {
+ EMSG(_("E757: Wrong file ID in spell file"));
+ goto errorend;
+ }
+
+ cnt = getc(fd); /* <regioncnt> */
+ if (cnt == EOF)
+ {
+truncerr:
+ EMSG(_("E758: Truncated spell file"));
+ goto errorend;
+ }
+ if (cnt > 8)
+ {
+formerr:
+ EMSG(_("E759: Format error in spell file"));
+ goto errorend;
+ }
+ for (i = 0; i < cnt; ++i)
+ {
+ lp->sl_regions[i * 2] = getc(fd); /* <regionname> */
+ lp->sl_regions[i * 2 + 1] = getc(fd);
+ }
+ lp->sl_regions[cnt * 2] = NUL;
+
+ /* round 1: <PREFIXLIST>: <affcount> <afftotcnt> <affix> ...
+ * round 2: <SUFFIXLIST>: <affcount> <afftotcnt> <affix> ... */
+ for (round = 1; round <= 2; ++round)
+ {
+ affcount = (getc(fd) << 8) + getc(fd); /* <affcount> */
+ if (affcount < 0)
+ goto truncerr;
+ if (round == 1)
+ {
+ gap = &lp->sl_preftab;
+ aip = &lp->sl_prefzero;
+ lp->sl_prefcnt = affcount;
+ prefm = affcount > 256 ? sizeof(short_u) : 1;
+ }
+ else
+ {
+ gap = &lp->sl_sufftab;
+ aip = &lp->sl_suffzero;
+ lp->sl_suffcnt = affcount;
+ suffm = affcount > 256 ? sizeof(short_u) : 1;
+ }
+
+ i = (getc(fd) << 8) + getc(fd); /* <afftotcnt> */
+ /* afftotcnt is not used */
+
+ /*
+ * For each affix NR there can be several affixes.
+ */
+ for (affnr = 0; affnr < affcount; ++affnr)
+ {
+ /* <affix>: <affflags> <affitemcnt> <affitem> ... */
+ affflags = getc(fd); /* <affflags> */
+ if (affflags == EOF)
+ goto truncerr;
+ affitemcnt = (getc(fd) << 8) + getc(fd); /* <affitemcnt> */
+ if (affitemcnt < 0)
+ goto truncerr;
+ for (itm = 0; itm < affitemcnt; ++itm)
+ {
+ /* <affitem>: <affchoplen> <affchop> <affaddlen> <affadd> */
+ choplen = getc(fd); /* <affchoplen> */
+ if (choplen == EOF)
+ goto truncerr;
+ if (choplen >= MAXWLEN)
+ goto formerr;
+ for (i = 0; i < choplen; ++i) /* <affchop> */
+ buf[i] = getc(fd);
+ buf[i] = NUL;
+ addlen = getc(fd); /* <affaddlen> */
+ if (addlen == EOF)
+ goto truncerr;
+ /* Get room to store the affitem_T, chop and add strings. */
+ p = (char_u *)getroom(lp, &bl_used,
+ sizeof(affitem_T) + choplen + addlen + 1);
+ if (p == NULL)
+ goto errorend;
+
+ ai = (affitem_T *)p;
+ ai->ai_nr = affnr;
+ ai->ai_combine = affflags;
+ ai->ai_choplen = choplen;
+ ai->ai_addlen = addlen;
+
+ p += sizeof(affitem_T) + addlen;
+ ai->ai_chop = p;
+ STRCPY(p, buf);
+
+ p = ai->ai_add;
+ for (i = 0; i < addlen; ++i) /* <affadd> */
+ p[i] = getc(fd);
+ p[i] = NUL;
+
+ /*
+ * Add the affix to a hashtable. Which one depends on the
+ * length of the added string in characters.
+ */
+#ifdef FEAT_MBYTE
+ /* Change "addlen" from length in bytes to length in chars. */
+ if (has_mbyte)
+ addlen = mb_charlen(p);
+#endif
+ if (addlen == 0)
+ {
+ /* Link in list of zero length affixes. */
+ ai->ai_next = *aip;
+ *aip = ai;
+ }
+ else
+ {
+ if (gap->ga_len < addlen)
+ {
+ /* Longer affix, need more hashtables. */
+ if (ga_grow(gap, addlen - gap->ga_len) == FAIL)
+ goto errorend;
+
+ /* Re-allocating ga_data means that an ht_array
+ * pointing to ht_smallarray becomes invalid. We can
+ * recognize this: ht_mask is at its init value. */
+ for (i = 0; i < gap->ga_len; ++i)
+ {
+ ht = ((hashtab_T *)gap->ga_data) + i;
+ if (ht->ht_mask == HT_INIT_SIZE - 1)
+ ht->ht_array = ht->ht_smallarray;
+ }
+
+ /* Init the newly used hashtable(s). */
+ while (gap->ga_len < addlen)
+ {
+ hash_init(((hashtab_T *)gap->ga_data)
+ + gap->ga_len);
+ ++gap->ga_len;
+ }
+ }
+ ht = ((hashtab_T *)gap->ga_data) + addlen - 1;
+ hash = hash_hash(p);
+ hi = hash_lookup(ht, p, hash);
+ if (HASHITEM_EMPTY(hi))
+ {
+ /* First affix with this "ai_add", add to hashtable. */
+ hash_add_item(ht, hi, p, hash);
+ ai->ai_next = NULL;
+ }
+ else
+ {
+ /* There already is an affix with this "ai_add", link
+ * in the list. */
+ ai2 = HI2AI(hi);
+ ai->ai_next = ai2->ai_next;
+ ai2->ai_next = ai;
+ }
+ }
+ }
+ }
+ }
+
+ /* <SUGGEST> : <suggestlen> <more> ... */
+ /* TODO, just skip this for now */
+ i = (getc(fd) << 24) + (getc(fd) << 16) + (getc(fd) << 8) + getc(fd);
+ while (i-- > 0)
+ if (getc(fd) == EOF) /* <suggestlen> */
+ goto truncerr;
+
+ /* <WORDLIST>: <wordcount> <worditem> ... */ /* <wordcount> */
+ wordcount = (getc(fd) << 24) + (getc(fd) << 16) + (getc(fd) << 8)
+ + getc(fd);
+ if (wordcount < 0)
+ goto truncerr;
+
+ /* Init hashtable for this number of words, so that it doesn't need to
+ * reallocate the table halfway. */
+ hash_lock_size(&lp->sl_words, wordcount);
+
+ for (widx = 0; ; ++widx)
+ {
+ /* <worditem>: <nr> <string> <flags> [<flags2>]
+ * [<caselen> <caseword>]
+ * [<affixcnt> <affixNR> ...] (prefixes)
+ * [<affixcnt> <affixNR> ...] (suffixes)
+ * [<region>]
+ * [<addcnt> <add> ...]
+ */
+ /* Use <nr> bytes from the previous word. */
+ wlen = getc(fd); /* <nr> */
+ if (wlen == EOF)
+ {
+ if (widx >= wordcount) /* normal way to end the file */
+ break;
+ goto truncerr;
+ }
+
+ /* Read further word bytes until one below 0x20, that must be the
+ * flags. Keep this fast! */
+ for (;;)
+ {
+ if ((buf[wlen] = getc(fd)) < 0x20) /* <string> */
+ break;
+ if (++wlen == MAXWLEN)
+ goto formerr;
+ }
+ flags = buf[wlen]; /* <flags> */
+ buf[wlen] = NUL;
+
+ /* Get more flags if they're there. */
+ if (flags & BWF_SECOND)
+ flags += getc(fd) << 8; /* <flags2> */
+
+ if (flags & BWF_KEEPCAP)
+ {
+ /* Read <caselen> and <caseword> first, its length may differ from
+ * the case-folded word. Note: this should only happen after the
+ * basic word! */
+ wlen = getc(fd);
+ if (wlen == EOF)
+ goto truncerr;
+ for (i = 0; i < wlen; ++i)
+ cbuf[i] = getc(fd);
+ cbuf[i] = NUL;
+ }
+
+ /* Find room to store the word in a fword_T. */
+ fw = (fword_T *)getroom(lp, &bl_used, (int)sizeof(fword_T) + wlen);
+ if (fw == NULL)
+ goto errorend;
+ mch_memmove(fw->fw_word, (flags & BWF_KEEPCAP) ? cbuf : buf, wlen + 1);
+ fw->fw_flags = flags;
+
+ hash = hash_hash(buf);
+ hi = hash_lookup(&lp->sl_words, buf, hash);
+ if (HASHITEM_EMPTY(hi))
+ {
+ if (hash_add_item(&lp->sl_words, hi, fw->fw_word, hash) == FAIL)
+ goto errorend;
+ fw->fw_next = NULL;
+ }
+ else
+ {
+ /* Already have this basic word in the hashtable, this one will
+ * have different case flags. */
+ fw2 = HI2FWORD(hi);
+ fw->fw_next = fw2->fw_next;
+ fw2->fw_next = fw;
+ --widx; /* don't count this one */
+ }
+
+ /* Optional prefixes and suffixes. */
+ if (flags & BWF_PREFIX)
+ fw->fw_prefixcnt = spell_load_affixes(fd, lp, &bl_used,
+ prefm, &fw->fw_prefix);
+ else
+ fw->fw_prefixcnt = 0;
+ if (flags & BWF_SUFFIX)
+ fw->fw_suffixcnt = spell_load_affixes(fd, lp, &bl_used,
+ suffm, &fw->fw_suffix);
+ else
+ fw->fw_suffixcnt = 0;
+
+ if (flags & BWF_REGION)
+ fw->fw_region = getc(fd); /* <region> */
+ else
+ fw->fw_region = REGION_ALL;
+
+ fw->fw_adds = NULL;
+ if (flags & BWF_ADDS)
+ {
+ adds = (getc(fd) << 8) + getc(fd); /* <addcnt> */
+
+ while (--adds >= 0)
+ {
+ /* <add>: <addflags> <addlen> [<leadlen> <addstring>]
+ * [<region>] */
+ flags = getc(fd); /* <addflags> */
+ addlen = getc(fd); /* <addlen> */
+ if (addlen == EOF)
+ goto truncerr;
+ if (addlen >= MAXWLEN)
+ goto formerr;
+
+ if (addlen > 0)
+ {
+ leadlen = getc(fd); /* <leadlen> */
+ for (i = 0; i < addlen; ++i) /* <addstring> */
+ cbuf[i] = getc(fd);
+ cbuf[i] = NUL;
+ }
+ else
+ leadlen = 0;
+
+ if (flags & ADD_KEEPCAP)
+ {
+ /* <addstring> is in original case, need to get
+ * case-folded word too. */
+ (void)str_foldcase(cbuf, addlen, fbuf, MAXWLEN);
+ flen = addlen - leadlen + 1;
+ addlen = STRLEN(fbuf);
+ }
+ else
+ flen = 0;
+
+ aw = (addword_T *)getroom(lp, &bl_used,
+ sizeof(addword_T) + addlen + flen);
+ if (aw == NULL)
+ goto errorend;
+ aw->aw_next = fw->fw_adds;
+ fw->fw_adds = aw;
+ aw->aw_leadlen = leadlen;
+
+ if (flags & ADD_KEEPCAP)
+ {
+ /* Put the addition in original case after the case-folded
+ * string. */
+ STRCPY(aw->aw_word, fbuf);
+ STRCPY(aw->aw_word + addlen + 1, cbuf + leadlen);
+ }
+ else
+ STRCPY(aw->aw_word, cbuf);
+
+ aw->aw_flags = flags;
+ aw->aw_wordlen = addlen;
+
+ if (flags & ADD_REGION)
+ aw->aw_region = getc(fd); /* <region> */
+ else
+ aw->aw_region = REGION_ALL;
+ }
+ }
+ }
+ goto end_OK;
+
+errorend:
+ lp->sl_error = TRUE;
+end_OK:
+ if (fd != NULL)
+ fclose(fd);
+ hash_unlock(&lp->sl_words);
+ sourcing_name = save_sourcing_name;
+ sourcing_lnum = save_sourcing_lnum;
+}
+
+/*
+ * Read a list of affixes from the spell file.
+ */
+ static int
+spell_load_affixes(fd, lp, bl_usedp, affm, affp)
+ FILE *fd;
+ slang_T *lp;
+ int *bl_usedp;
+ int affm;
+ void **affp;
+{
+ int cnt;
+ int i, n;
+ char_u *p;
+
+ cnt = getc(fd); /* <affixcnt> */
+ if (cnt == EOF)
+ return 0;
+
+ /* Get room to store the affixNR list, either as char_u (1
+ * byte) or short_u (2 bytes). */
+ p = (char_u *)getroom(lp, bl_usedp, cnt * affm);
+ if (p == NULL)
+ return 0;
+ *affp = p;
+ for (n = 0; n < cnt; ++n)
+ {
+ i = getc(fd); /* <affixNR> */
+ if (affm > 1)
+ {
+ i = (i << 8) + getc(fd);
+ *(short_u *)p = i;
+ p += sizeof(short_u);
+ }
+ else
+ {
+ *(char_u *)p = i;
+ ++p;
+ }
+ }
+ return cnt;
+}
+
+/*
+ * Get part of an sblock_T, at least "len" bytes long.
+ * Returns NULL when out of memory.
+ */
+ static void *
+getroom(lp, bl_used, len)
+ slang_T *lp; /* lp->sl_block is current block or NULL */
+ int *bl_used; /* used up from current block */
+ int len; /* length needed */
+{
+ char_u *p;
+ sblock_T *bl = lp->sl_block;
+
+ if (bl == NULL || *bl_used + len > SBLOCKSIZE)
+ {
+ /* Allocate a block of memory. This is not freed until spell_reload()
+ * is called. */
+ bl = (sblock_T *)alloc((unsigned)(sizeof(sblock_T) + SBLOCKSIZE));
+ if (bl == NULL)
+ return NULL;
+ bl->sb_next = lp->sl_block;
+ lp->sl_block = bl;
+ *bl_used = 0;
+ }
+
+ p = bl->sb_data + *bl_used;
+ *bl_used += len;
+
+ return p;
+}
+
+/*
+ * Parse 'spelllang' and set buf->b_langp accordingly.
+ * Returns an error message or NULL.
+ */
+ char_u *
+did_set_spelllang(buf)
+ buf_T *buf;
+{
+ garray_T ga;
+ char_u *lang;
+ char_u *e;
+ char_u *region;
+ int region_mask;
+ slang_T *lp;
+ int c;
+ char_u lbuf[MAXWLEN + 1];
+
+ ga_init2(&ga, sizeof(langp_T), 2);
+
+ /* loop over comma separated languages. */
+ for (lang = buf->b_p_spl; *lang != NUL; lang = e)
+ {
+ e = vim_strchr(lang, ',');
+ if (e == NULL)
+ e = lang + STRLEN(lang);
+ if (e > lang + 2)
+ {
+ if (e - lang >= MAXWLEN)
+ {
+ ga_clear(&ga);
+ return e_invarg;
+ }
+ if (lang[2] == '_')
+ region = lang + 3;
+ }
+ else
+ region = NULL;
+
+ for (lp = first_lang; lp != NULL; lp = lp->sl_next)
+ if (STRNICMP(lp->sl_name, lang, 2) == 0)
+ break;
+
+ if (lp == NULL)
+ {
+ /* Not found, load the language. */
+ STRNCPY(lbuf, lang, e - lang);
+ lbuf[e - lang] = NUL;
+ if (region != NULL)
+ mch_memmove(lbuf + 2, lbuf + 5, e - lang - 4);
+ lp = spell_load_lang(lbuf);
+ }
+
+ if (lp != NULL)
+ {
+ if (region == NULL)
+ region_mask = REGION_ALL;
+ else
+ {
+ /* find region in sl_regions */
+ c = find_region(lp->sl_regions, region);
+ if (c == REGION_ALL)
+ {
+ c = *e;
+ *e = NUL;
+ smsg((char_u *)_("Warning: region %s not supported"), lang);
+ *e = c;
+ region_mask = REGION_ALL;
+ }
+ else
+ region_mask = 1 << c;
+ }
+
+ if (ga_grow(&ga, 1) == FAIL)
+ {
+ ga_clear(&ga);
+ return e_outofmem;
+ }
+ LANGP_ENTRY(ga, ga.ga_len)->lp_slang = lp;
+ LANGP_ENTRY(ga, ga.ga_len)->lp_region = region_mask;
+ ++ga.ga_len;
+ }
+
+ if (*e == ',')
+ ++e;
+ }
+
+ /* Add a NULL entry to mark the end of the list. */
+ if (ga_grow(&ga, 1) == FAIL)
+ {
+ ga_clear(&ga);
+ return e_outofmem;
+ }
+ LANGP_ENTRY(ga, ga.ga_len)->lp_slang = NULL;
+ ++ga.ga_len;
+
+ /* Everything is fine, store the new b_langp value. */
+ ga_clear(&buf->b_langp);
+ buf->b_langp = ga;
+
+ return NULL;
+}
+
+/*
+ * Find the region "region[2]" in "rp" (points to "sl_regions").
+ * Each region is simply stored as the two characters of it's name.
+ * Returns the index if found, REGION_ALL if not found.
+ */
+ static int
+find_region(rp, region)
+ char_u *rp;
+ char_u *region;
+{
+ int i;
+
+ for (i = 0; ; i += 2)
+ {
+ if (rp[i] == NUL)
+ return REGION_ALL;
+ if (rp[i] == region[0] && rp[i + 1] == region[1])
+ break;
+ }
+ return i / 2;
+}
+
+/*
+ * Return type of word:
+ * w word 0
+ * Word BWF_ONECAP
+ * W WORD BWF_ALLCAP
+ * WoRd wOrd BWF_KEEPCAP
+ */
+ static int
+captype(word, end)
+ char_u *word;
+ char_u *end;
+{
+ char_u *p;
+ int c;
+ int firstcap;
+ int allcap;
+ int past_second = FALSE; /* past second word char */
+
+ /* find first letter */
+ for (p = word; !spell_iswordc(p); mb_ptr_adv(p))
+ if (p >= end)
+ return 0; /* only non-word characters, illegal word */
+#ifdef FEAT_MBYTE
+ c = mb_ptr2char_adv(&p);
+#else
+ c = *p++;
+#endif
+ firstcap = allcap = MB_ISUPPER(c);
+
+ /*
+ * Need to check all letters to find a word with mixed upper/lower.
+ * But a word with an upper char only at start is a ONECAP.
+ */
+ for ( ; p < end; mb_ptr_adv(p))
+ if (spell_iswordc(p))
+ {
+#ifdef FEAT_MBYTE
+ c = mb_ptr2char(p);
+#else
+ c = *p;
+#endif
+ if (!MB_ISUPPER(c))
+ {
+ /* UUl -> KEEPCAP */
+ if (past_second && allcap)
+ return BWF_KEEPCAP;
+ allcap = FALSE;
+ }
+ else if (!allcap)
+ /* UlU -> KEEPCAP */
+ return BWF_KEEPCAP;
+ past_second = TRUE;
+ }
+
+ if (allcap)
+ return BWF_ALLCAP;
+ if (firstcap)
+ return BWF_ONECAP;
+ return 0;
+}
+
+# if defined(FEAT_MBYTE) || defined(PROTO)
+/*
+ * Clear all spelling tables and reload them.
+ * Used after 'encoding' is set.
+ */
+ void
+spell_reload()
+{
+ buf_T *buf;
+ slang_T *lp;
+
+ /* Initialize the table for spell_iswordc(). */
+ init_spell_chartab();
+
+ /* Unload all allocated memory. */
+ while (first_lang != NULL)
+ {
+ lp = first_lang;
+ first_lang = lp->sl_next;
+ slang_free(lp);
+ }
+
+ /* Go through all buffers and handle 'spelllang'. */
+ for (buf = firstbuf; buf != NULL; buf = buf->b_next)
+ {
+ ga_clear(&buf->b_langp);
+ if (*buf->b_p_spl != NUL)
+ did_set_spelllang(buf);
+ }
+}
+# endif
+
+/*
+ * Recognizing words uses a two-step mechanism:
+ * 1. Locate a basic word, made out of word characters only and separated by
+ * non-word characters.
+ * 2. When a basic word is found, check if (possibly required) additions
+ * before and after the word are present.
+ *
+ * Both mechanisms use affixes (prefixes and suffixes) to reduce the number of
+ * words. When no matching word was found in the hashtable the start of the
+ * word is checked for matching prefixes and the end of the word for matching
+ * suffixes. All matching affixes are removed and then the resulting word is
+ * searched for. If found it is checked if it supports the used affix.
+ */
+
+
+#if defined(FEAT_MBYTE) || defined(PROTO)
+/*
+ * Functions for ":mkspell".
+ * Only possible with the multi-byte feature.
+ */
+
+#define MAXLINELEN 300 /* Maximum length in bytes of a line in a .aff
+ and .dic file. */
+/*
+ * Main structure to store the contents of a ".aff" file.
+ */
+typedef struct afffile_S
+{
+ char_u *af_enc; /* "SET", normalized, alloc'ed string or NULL */
+ char_u *af_try; /* "TRY" line in "af_enc" encoding */
+ hashtab_T af_pref; /* hashtable for prefixes, affheader_T */
+ hashtab_T af_suff; /* hashtable for suffixes, affheader_T */
+ garray_T af_rep; /* list of repentry_T entries from REP lines */
+} afffile_T;
+
+typedef struct affentry_S affentry_T;
+
+/* Affix header from ".aff" file. Used for af_pref and af_suff. */
+typedef struct affheader_S
+{
+ char_u ah_key[2]; /* key for hashtable == name of affix entry */
+ int ah_combine;
+ affentry_T *ah_first; /* first affix entry */
+ short_u ah_affnr; /* used in get_new_aff() */
+} affheader_T;
+
+#define HI2AH(hi) ((affheader_T *)(hi)->hi_key)
+
+/* Affix entry from ".aff" file. Used for prefixes and suffixes. */
+struct affentry_S
+{
+ affentry_T *ae_next; /* next affix with same name/number */
+ char_u *ae_chop; /* text to chop off basic word (can be NULL) */
+ char_u *ae_add; /* text to add to basic word (can be NULL) */
+ char_u *ae_add_nw; /* first non-word character in "ae_add" */
+ char_u *ae_cond; /* condition (NULL for ".") */
+ regprog_T *ae_prog; /* regexp program for ae_cond or NULL */
+ short_u ae_affnr; /* for old affix: new affix number */
+};
+
+/*
+ * Structure to store a word from a ".dic" file.
+ */
+typedef struct dicword_S
+{
+ char_u *dw_affnm; /* original affix names */
+ char_u dw_word[1]; /* actually longer: the word in 'encoding' */
+} dicword_T;
+
+static dicword_T dumdw;
+#define HI2DW(hi) ((dicword_T *)((hi)->hi_key - (dumdw.dw_word - (char_u *)&dumdw)))
+
+/*
+ * Structure to store a basic word for the spell file.
+ * This is used for ":mkspell", not for spell checking.
+ */
+typedef struct basicword_S basicword_T;
+struct basicword_S
+{
+ basicword_T *bw_next; /* next word with same basic word */
+ basicword_T *bw_cnext; /* next word with same caps */
+ int bw_flags; /* BWF_ flags */
+ garray_T bw_prefix; /* table with prefix numbers */
+ garray_T bw_suffix; /* table with suffix numbers */
+ int bw_region; /* region bits */
+ char_u *bw_caseword; /* keep-case word */
+ char_u *bw_leadstring; /* must come before bw_word */
+ char_u *bw_addstring; /* must come after bw_word */
+ char_u bw_word[1]; /* actually longer: word case folded */
+};
+
+static basicword_T dumbw;
+#define KEY2BW(p) ((basicword_T *)((p) - (dumbw.bw_word - (char_u *)&dumbw)))
+#define HI2BW(hi) KEY2BW((hi)->hi_key)
+
+/* Store the affix number related with a certain string. */
+typedef struct affhash_S
+{
+ short_u as_nr; /* the affix nr */
+ char_u as_word[1]; /* actually longer */
+} affhash_T;
+
+static affhash_T dumas;
+#define HI2AS(hi) ((affhash_T *)((hi)->hi_key - (dumas.as_word - (char_u *)&dumas)))
+
+
+static afffile_T *spell_read_aff __ARGS((char_u *fname, vimconv_T *conv));
+static void spell_free_aff __ARGS((afffile_T *aff));
+static int spell_read_dic __ARGS((hashtab_T *ht, char_u *fname, vimconv_T *conv));
+static int get_new_aff __ARGS((hashtab_T *oldaff, garray_T *gap));
+static void spell_free_dic __ARGS((hashtab_T *dic));
+static int same_affentries __ARGS((affheader_T *ah1, affheader_T *ah2));
+static void add_affhash __ARGS((hashtab_T *ht, char_u *key, int newnr));
+static void clear_affhash __ARGS((hashtab_T *ht));
+static void trans_affixes __ARGS((dicword_T *dw, basicword_T *bw, afffile_T *oldaff, hashtab_T *newwords));
+static int build_wordlist __ARGS((hashtab_T *newwords, hashtab_T *oldwords, afffile_T *oldaff, int regionmask));
+static void combine_regions __ARGS((hashtab_T *newwords));
+static int same_affixes __ARGS((basicword_T *bw, basicword_T *nbw));
+static void expand_affixes __ARGS((hashtab_T *newwords, garray_T *prefgap, garray_T *suffgap));
+static void expand_one_aff __ARGS((basicword_T *bw, garray_T *add_words, affentry_T *pae, affentry_T *sae));
+static void add_to_wordlist __ARGS((hashtab_T *newwords, basicword_T *bw));
+static void put_bytes __ARGS((FILE *fd, long_u nr, int len));
+static void write_affix __ARGS((FILE *fd, affheader_T *ah));
+static void write_affixlist __ARGS((FILE *fd, garray_T *aff, int bytes));
+static void write_vim_spell __ARGS((char_u *fname, garray_T *prefga, garray_T *suffga, hashtab_T *newwords, int regcount, char_u *regchars));
+static void write_bword __ARGS((FILE *fd, basicword_T *bw, int lowcap, basicword_T **prevbw, int regionmask, int prefm, int suffm));
+static void free_wordtable __ARGS((hashtab_T *ht));
+static void free_basicword __ARGS((basicword_T *bw));
+static void free_affixentries __ARGS((affentry_T *first));
+
+/*
+ * Read an affix ".aff" file.
+ * Returns an afffile_T, NULL for failure.
+ */
+ static afffile_T *
+spell_read_aff(fname, conv)
+ char_u *fname;
+ vimconv_T *conv; /* info for encoding conversion */
+{
+ FILE *fd;
+ afffile_T *aff;
+ char_u rline[MAXLINELEN];
+ char_u *line;
+ char_u *pc = NULL;
+ char_u *(items[6]);
+ int itemcnt;
+ char_u *p;
+ int lnum = 0;
+ affheader_T *cur_aff = NULL;
+ int aff_todo = 0;
+ hashtab_T *tp;
+
+ fd = fopen((char *)fname, "r");
+ if (fd == NULL)
+ {
+ EMSG2(_(e_notopen), fname);
+ return NULL;
+ }
+
+ smsg((char_u *)_("Reading affix file %s..."), fname);
+ out_flush();
+
+ aff = (afffile_T *)alloc_clear((unsigned)sizeof(afffile_T));
+ if (aff == NULL)
+ return NULL;
+ hash_init(&aff->af_pref);
+ hash_init(&aff->af_suff);
+ ga_init2(&aff->af_rep, (int)sizeof(repentry_T), 20);
+
+ /*
+ * Read all the lines in the file one by one.
+ */
+ while (!vim_fgets(rline, MAXLINELEN, fd))
+ {
+ ++lnum;
+
+ /* Skip comment lines. */
+ if (*rline == '#')
+ continue;
+
+ /* Convert from "SET" to 'encoding' when needed. */
+ vim_free(pc);
+ if (conv->vc_type != CONV_NONE)
+ {
+ pc = string_convert(conv, rline, NULL);
+ line = pc;
+ }
+ else
+ {
+ pc = NULL;
+ line = rline;
+ }
+
+ /* Split the line up in white separated items. Put a NUL after each
+ * item. */
+ itemcnt = 0;
+ for (p = line; ; )
+ {
+ while (*p != NUL && *p <= ' ') /* skip white space and CR/NL */
+ ++p;
+ if (*p == NUL)
+ break;
+ items[itemcnt++] = p;
+ while (*p > ' ') /* skip until white space or CR/NL */
+ ++p;
+ if (*p == NUL)
+ break;
+ *p++ = NUL;
+ }
+
+ /* Handle non-empty lines. */
+ if (itemcnt > 0)
+ {
+ if (STRCMP(items[0], "SET") == 0 && itemcnt == 2
+ && aff->af_enc == NULL)
+ {
+ if (aff->af_enc != NULL)
+ smsg((char_u *)_("Duplicate SET line ignored in %s line %d: %s"),
+ fname, lnum, line);
+ else
+ {
+ /* Setup for conversion from "ENC" to 'encoding'. */
+ aff->af_enc = enc_canonize(items[1]);
+ if (aff->af_enc != NULL
+ && convert_setup(conv, aff->af_enc, p_enc) == FAIL)
+ smsg((char_u *)_("Conversion in %s not supported: from %s to %s"),
+ fname, aff->af_enc, p_enc);
+ }
+ }
+ else if (STRCMP(items[0], "TRY") == 0 && itemcnt == 2
+ && aff->af_try == NULL)
+ aff->af_try = vim_strsave(items[1]);
+ else if ((STRCMP(items[0], "PFX") == 0
+ || STRCMP(items[0], "SFX") == 0)
+ && aff_todo == 0
+ && itemcnt == 4)
+ {
+ /* New affix letter. */
+ cur_aff = (affheader_T *)alloc((unsigned)sizeof(affheader_T));
+ if (cur_aff == NULL)
+ break;
+ cur_aff->ah_key[0] = *items[1];
+ cur_aff->ah_key[1] = NUL;
+ if (items[1][1] != NUL)
+ smsg((char_u *)_("Affix name too long in %s line %d: %s"),
+ fname, lnum, items[1]);
+ if (*items[2] == 'Y')
+ cur_aff->ah_combine = TRUE;
+ else if (*items[2] == 'N')
+ cur_aff->ah_combine = FALSE;
+ else if (p_verbose > 0)
+ smsg((char_u *)_("Expected Y or N in %s line %d: %s"),
+ fname, lnum, items[2]);
+ cur_aff->ah_first = NULL;
+ if (*items[0] == 'P')
+ tp = &aff->af_pref;
+ else
+ tp = &aff->af_suff;
+ if (!HASHITEM_EMPTY(hash_find(tp, cur_aff->ah_key)))
+ smsg((char_u *)_("Duplicate affix in %s line %d: %s"),
+ fname, lnum, items[1]);
+ else
+ hash_add(tp, cur_aff->ah_key);
+
+ aff_todo = atoi((char *)items[3]);
+ }
+ else if ((STRCMP(items[0], "PFX") == 0
+ || STRCMP(items[0], "SFX") == 0)
+ && aff_todo > 0
+ && STRCMP(cur_aff->ah_key, items[1]) == 0
+ && itemcnt == 5)
+ {
+ affentry_T *aff_entry;
+
+ /* New item for an affix letter. */
+ --aff_todo;
+ aff_entry = (affentry_T *)alloc_clear(
+ (unsigned)sizeof(affentry_T));
+ if (aff_entry == NULL)
+ break;
+ aff_entry->ae_next = cur_aff->ah_first;
+ cur_aff->ah_first = aff_entry;
+ if (STRCMP(items[2], "0") != 0)
+ aff_entry->ae_chop = vim_strsave(items[2]);
+ if (STRCMP(items[3], "0") != 0)
+ aff_entry->ae_add = vim_strsave(items[3]);
+ if (STRCMP(items[4], ".") != 0)
+ {
+ char_u buf[MAXLINELEN];
+
+ aff_entry->ae_cond = vim_strsave(items[4]);
+ if (*items[0] == 'P')
+ sprintf((char *)buf, "^%s", items[4]);
+ else
+ sprintf((char *)buf, "%s$", items[4]);
+ aff_entry->ae_prog = vim_regcomp(buf, RE_MAGIC + RE_STRING);
+ }
+ }
+ else if (STRCMP(items[0], "REP") == 0 && itemcnt == 2)
+ /* Ignore REP count */;
+ else if (STRCMP(items[0], "REP") == 0 && itemcnt == 3)
+ {
+ repentry_T *rp;
+
+ /* REP item */
+ if (ga_grow(&aff->af_rep, 1) == FAIL)
+ break;
+ rp = ((repentry_T *)aff->af_rep.ga_data) + aff->af_rep.ga_len;
+ rp->re_from = vim_strsave(items[1]);
+ rp->re_to = vim_strsave(items[2]);
+ ++aff->af_rep.ga_len;
+ }
+ else if (p_verbose > 0)
+ smsg((char_u *)_("Unrecognized item in %s line %d: %s"),
+ fname, lnum, items[0]);
+ }
+
+ }
+
+ vim_free(pc);
+ fclose(fd);
+ return aff;
+}
+
+/*
+ * Free the structure filled by spell_read_aff().
+ */
+ static void
+spell_free_aff(aff)
+ afffile_T *aff;
+{
+ hashtab_T *ht;
+ hashitem_T *hi;
+ int todo;
+ int i;
+ repentry_T *rp;
+ affheader_T *ah;
+
+ vim_free(aff->af_enc);
+ vim_free(aff->af_try);
+
+ for (ht = &aff->af_pref; ; ht = &aff->af_suff)
+ {
+ todo = ht->ht_used;
+ for (hi = ht->ht_array; todo > 0; ++hi)
+ {
+ if (!HASHITEM_EMPTY(hi))
+ {
+ --todo;
+ ah = HI2AH(hi);
+ free_affixentries(ah->ah_first);
+ vim_free(ah);
+ }
+ }
+ if (ht == &aff->af_suff)
+ break;
+ }
+ hash_clear(&aff->af_pref);
+ hash_clear(&aff->af_suff);
+
+ for (i = 0; i < aff->af_rep.ga_len; ++i)
+ {
+ rp = ((repentry_T *)aff->af_rep.ga_data) + i;
+ vim_free(rp->re_from);
+ vim_free(rp->re_to);
+ }
+ ga_clear(&aff->af_rep);
+
+ vim_free(aff);
+}
+
+/*
+ * Read a dictionary ".dic" file.
+ * Returns OK or FAIL;
+ * Each entry in the hashtab_T is a dicword_T.
+ */
+ static int
+spell_read_dic(ht, fname, conv)
+ hashtab_T *ht;
+ char_u *fname;
+ vimconv_T *conv; /* info for encoding conversion */
+{
+ char_u line[MAXLINELEN];
+ char_u *p;
+ dicword_T *dw;
+ char_u *pc;
+ char_u *w;
+ int l;
+ hash_T hash;
+ hashitem_T *hi;
+ FILE *fd;
+ int lnum = 1;
+
+ fd = fopen((char *)fname, "r");
+ if (fd == NULL)
+ {
+ EMSG2(_(e_notopen), fname);
+ return FAIL;
+ }
+
+ smsg((char_u *)_("Reading dictionary file %s..."), fname);
+ out_flush();
+
+ /* Read and ignore the first line: word count. */
+ (void)vim_fgets(line, MAXLINELEN, fd);
+ if (!isdigit(*skipwhite(line)))
+ EMSG2(_("E760: No word count in %s"), fname);
+
+ /*
+ * Read all the lines in the file one by one.
+ * The words are converted to 'encoding' here, before being added to
+ * the hashtable.
+ */
+ while (!vim_fgets(line, MAXLINELEN, fd))
+ {
+ ++lnum;
+
+ /* Remove CR, LF and white space from end. */
+ l = STRLEN(line);
+ while (l > 0 && line[l - 1] <= ' ')
+ --l;
+ if (l == 0)
+ continue; /* empty line */
+ line[l] = NUL;
+
+ /* Find the optional affix names. */
+ p = vim_strchr(line, '/');
+ if (p != NULL)
+ *p++ = NUL;
+
+ /* Convert from "SET" to 'encoding' when needed. */
+ if (conv->vc_type != CONV_NONE)
+ {
+ pc = string_convert(conv, line, NULL);
+ w = pc;
+ }
+ else
+ {
+ pc = NULL;
+ w = line;
+ }
+
+ dw = (dicword_T *)alloc_clear((unsigned)sizeof(dicword_T)
+ + STRLEN(w));
+ if (dw == NULL)
+ break;
+ STRCPY(dw->dw_word, w);
+ vim_free(pc);
+
+ hash = hash_hash(dw->dw_word);
+ hi = hash_lookup(ht, dw->dw_word, hash);
+ if (!HASHITEM_EMPTY(hi))
+ smsg((char_u *)_("Duplicate word in %s line %d: %s"),
+ fname, lnum, line);
+ else
+ hash_add_item(ht, hi, dw->dw_word, hash);
+
+ if (p != NULL)
+ dw->dw_affnm = vim_strsave(p);
+ }
+
+ fclose(fd);
+ return OK;
+}
+
+/*
+ * Free the structure filled by spell_read_dic().
+ */
+ static void
+spell_free_dic(dic)
+ hashtab_T *dic;
+{
+ int todo;
+ dicword_T *dw;
+ hashitem_T *hi;
+
+ todo = dic->ht_used;
+ for (hi = dic->ht_array; todo > 0; ++hi)
+ {
+ if (!HASHITEM_EMPTY(hi))
+ {
+ --todo;
+ dw = HI2DW(hi);
+ vim_free(dw->dw_affnm);
+ vim_free(dw);
+ }
+ }
+ hash_clear(dic);
+}
+
+/*
+ * Take the affixes read by spell_read_aff() and add them to the new list.
+ * Attempts to re-use the same number for identical affixes (ignoring the
+ * condition, since we remove that). That is especially important when using
+ * multiple regions.
+ * Returns OK or FAIL;
+ */
+ static int
+get_new_aff(oldaff, gap)
+ hashtab_T *oldaff; /* hashtable with affheader_T */
+ garray_T *gap; /* table with new affixes */
+{
+ int oldtodo;
+ affheader_T *oldah, *newah, *gapah;
+ affentry_T *oldae, *newae;
+ hashitem_T *oldhi;
+ hashitem_T *hi;
+ hashtab_T condht; /* conditions already found */
+ char_u condkey[MAXLINELEN];
+ int newnr;
+ int gapnr;
+ int retval = OK;
+ char_u *p;
+ garray_T tga;
+
+ /*
+ * Loop over all the old affix names.
+ */
+ oldtodo = oldaff->ht_used;
+ for (oldhi = oldaff->ht_array; oldtodo > 0 && retval == OK; ++oldhi)
+ {
+ if (!HASHITEM_EMPTY(oldhi))
+ {
+ --oldtodo;
+ oldah = (affheader_T *)oldhi->hi_key;
+
+ /* Put entries with the same condition under the same new affix
+ * nr in "tga". Use hashtable "condht" to find them. */
+ ga_init2(&tga, sizeof(affheader_T), 10);
+ hash_init(&condht);
+
+ /*
+ * Loop over all affixes with the same name.
+ * The affixes with the same condition will get the same number,
+ * since they can be used with the same words.
+ * 1. build the lists of new affentry_T, with the headers in "tga".
+ * 2. Check if some of the lists already exist in "gap", re-use
+ * their number.
+ * 3. Assign the new numbers to the old affixes.
+ */
+
+ /* 1. build the lists of new affentry_T. */
+ for (oldae = oldah->ah_first; oldae != NULL && retval == OK;
+ oldae = oldae->ae_next)
+ {
+ oldae->ae_add_nw = NULL;
+ if (oldae->ae_add != NULL)
+ {
+ /* Check for non-word characters in the suffix. If there
+ * is one this affix will be turned into an addition.
+ * This is stored with the old affix, that is where
+ * trans_affixes() will check. */
+ for (p = oldae->ae_add; *p != NUL; mb_ptr_adv(p))
+ if (!spell_iswordc(p))
+ break;
+ if (*p != NUL)
+ oldae->ae_add_nw = p;
+ }
+
+ if (oldae->ae_cond == NULL)
+ /* hashtable requires a non-empty key */
+ STRCPY(condkey, "---");
+ else
+ STRCPY(condkey, oldae->ae_cond);
+
+ /* Look for an existing list with this name and condition. */
+ hi = hash_find(&condht, condkey);
+ if (!HASHITEM_EMPTY(hi))
+ /* Match with existing affix, use that one. */
+ newnr = HI2AS(hi)->as_nr;
+ else
+ {
+ /* Add a new affix number. */
+ newnr = tga.ga_len;
+ if (ga_grow(&tga, 1) == FAIL)
+ retval = FAIL;
+ else
+ {
+ newah = ((affheader_T *)tga.ga_data) + newnr;
+ newah->ah_combine = oldah->ah_combine;
+ newah->ah_first = NULL;
+ ++tga.ga_len;
+
+ /* Add the new list to the condht hashtable. */
+ add_affhash(&condht, condkey, newnr);
+ }
+ }
+
+ /* Add the new affentry_T to the list. */
+ newah = ((affheader_T *)tga.ga_data) + newnr;
+ newae = (affentry_T *)alloc_clear((unsigned)sizeof(affentry_T));
+ if (newae == NULL)
+ retval = FAIL;
+ else
+ {
+ newae->ae_next = newah->ah_first;
+ newah->ah_first = newae;
+ if (oldae->ae_chop == NULL)
+ newae->ae_chop = NULL;
+ else
+ newae->ae_chop = vim_strsave(oldae->ae_chop);
+ if (oldae->ae_add == NULL)
+ newae->ae_add = NULL;
+ else
+ newae->ae_add = vim_strsave(oldae->ae_add);
+
+ /* The condition is not copied, since the new affix is
+ * only used for words where the condition matches. */
+ }
+ }
+
+ /* 2. Check if some of the lists already exist, re-use their
+ * number. Otherwise add the list to "gap". */
+ for (newnr = 0; newnr < tga.ga_len; ++newnr)
+ {
+ newah = ((affheader_T *)tga.ga_data) + newnr;
+ for (gapnr = 0; gapnr < gap->ga_len; ++gapnr)
+ {
+ gapah = ((affheader_T *)gap->ga_data) + gapnr;
+ if (same_affentries(newah, gapah))
+ /* Found an existing affheader_T entry with same
+ * affentry_T list, use its number. */
+ break;
+ }
+
+ newah->ah_affnr = gapnr;
+ if (gapnr == gap->ga_len)
+ {
+ /* This is a new affentry_T list, add it. */
+ if (ga_grow(gap, 1) == FAIL)
+ retval = FAIL;
+ else
+ {
+ *(((affheader_T *)gap->ga_data) + gap->ga_len) = *newah;
+ ++gap->ga_len;
+ }
+ }
+ else
+ {
+ /* free unused affentry_T list */
+ free_affixentries(newah->ah_first);
+ }
+ }
+
+ /* 3. Assign the new affix numbers to the old affixes. */
+ for (oldae = oldah->ah_first; oldae != NULL && retval == OK;
+ oldae = oldae->ae_next)
+ {
+ if (oldae->ae_cond == NULL)
+ /* hashtable requires a non-empty key */
+ STRCPY(condkey, "---");
+ else
+ STRCPY(condkey, oldae->ae_cond);
+
+ /* Look for an existing affix with this name and condition. */
+ hi = hash_find(&condht, condkey);
+ if (!HASHITEM_EMPTY(hi))
+ /* Match with existing affix, use that one. */
+ newnr = HI2AS(hi)->as_nr;
+ else
+ {
+ EMSG(_(e_internal));
+ retval = FAIL;
+ }
+ newah = ((affheader_T *)tga.ga_data) + newnr;
+ oldae->ae_affnr = newah->ah_affnr;
+ }
+
+ ga_clear(&tga);
+ clear_affhash(&condht);
+ }
+ }
+
+ return retval;
+}
+
+/*
+ * Return TRUE if the affentry_T lists for "ah1" and "ah2" contain the same
+ * items, ignoring the order.
+ * Only compares the chop and add strings, not the condition.
+ */
+ static int
+same_affentries(ah1, ah2)
+ affheader_T *ah1;
+ affheader_T *ah2;
+{
+ affentry_T *ae1, *ae2;
+
+ /* Check the length of the lists first. */
+ ae2 = ah2->ah_first;
+ for (ae1 = ah1->ah_first; ae1 != NULL; ae1 = ae1->ae_next)
+ {
+ if (ae2 == NULL)
+ return FALSE; /* "ah1" list is longer */
+ ae2 = ae2->ae_next;
+ }
+ if (ae2 != NULL)
+ return FALSE; /* "ah2" list is longer */
+
+ /* Check that each entry in "ah1" appears in "ah2". */
+ for (ae1 = ah1->ah_first; ae1 != NULL; ae1 = ae1->ae_next)
+ {
+ for (ae2 = ah2->ah_first; ae2 != NULL; ae2 = ae2->ae_next)
+ {
+ if ((ae1->ae_chop == NULL) == (ae2->ae_chop == NULL)
+ && (ae1->ae_add == NULL) == (ae2->ae_add == NULL)
+ && (ae1->ae_chop == NULL
+ || STRCMP(ae1->ae_chop, ae2->ae_chop) == 0)
+ && (ae1->ae_add == NULL
+ || STRCMP(ae1->ae_add, ae2->ae_add) == 0))
+ break;
+ }
+ if (ae2 == NULL)
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/*
+ * Add a chop/add or cond hashtable entry.
+ */
+ static void
+add_affhash(ht, key, newnr)
+ hashtab_T *ht;
+ char_u *key;
+ int newnr;
+{
+ affhash_T *as;
+
+ as = (affhash_T *)alloc((unsigned)sizeof(affhash_T) + STRLEN(key));
+ if (as != NULL)
+ {
+ as->as_nr = newnr;
+ STRCPY(as->as_word, key);
+ hash_add(ht, as->as_word);
+ }
+}
+
+/*
+ * Clear the chop/add hashtable used to detect identical affixes.
+ */
+ static void
+clear_affhash(ht)
+ hashtab_T *ht;
+{
+ int todo;
+ hashitem_T *hi;
+
+ todo = ht->ht_used;
+ for (hi = ht->ht_array; todo > 0; ++hi)
+ {
+ if (!HASHITEM_EMPTY(hi))
+ {
+ --todo;
+ vim_free(HI2AS(hi));
+ }
+ }
+ hash_clear(ht);
+}
+
+/*
+ * Translate list of affix names for an old word to affix numbers in a new
+ * basic word.
+ * This checks if the conditions match with the old word. The result is that
+ * the new affix does not need to store the condition.
+ */
+ static void
+trans_affixes(dw, bw, oldaff, newwords)
+ dicword_T *dw; /* old word */
+ basicword_T *bw; /* basic word */
+ afffile_T *oldaff; /* affixes for "oldwords" */
+ hashtab_T *newwords; /* table with words */
+{
+ char_u key[2];
+ char_u *p;
+ char_u *affnm;
+ garray_T *gap;
+ hashitem_T *aff_hi;
+ affheader_T *ah;
+ affentry_T *ae;
+ regmatch_T regmatch;
+ int i;
+ basicword_T *nbw;
+ int alen;
+ int wlen;
+ garray_T fixga;
+ char_u nword[MAXWLEN];
+ int flags;
+ int n;
+
+ ga_init2(&fixga, (int)sizeof(basicword_T *), 5);
+
+ /* Loop over all the affix names of the old word. */
+ key[1] = NUL;
+ for (affnm = dw->dw_affnm; *affnm != NUL; ++affnm)
+ {
+ key[0] = *affnm;
+ aff_hi = hash_find(&oldaff->af_pref, key);
+ if (!HASHITEM_EMPTY(aff_hi))
+ gap = &bw->bw_prefix; /* found a prefix */
+ else
+ {
+ gap = &bw->bw_suffix; /* must be a suffix */
+ aff_hi = hash_find(&oldaff->af_suff, key);
+ if (HASHITEM_EMPTY(aff_hi))
+ {
+ smsg((char_u *)_("No affix entry '%s' for word %s"),
+ key, dw->dw_word);
+ continue;
+ }
+ }
+
+ /* Loop over all the affix entries for this affix name. */
+ ah = HI2AH(aff_hi);
+ for (ae = ah->ah_first; ae != NULL; ae = ae->ae_next)
+ {
+ regmatch.regprog = ae->ae_prog;
+ regmatch.rm_ic = FALSE; /* TODO: Should this be TRUE??? */
+ if (ae->ae_prog == NULL
+ || vim_regexec(&regmatch, dw->dw_word, (colnr_T)0))
+ {
+ if (ae->ae_add_nw != NULL && (gap == &bw->bw_suffix
+ ? bw->bw_addstring : bw->bw_leadstring) == NULL)
+ {
+ /* Affix has a non-word character and isn't prepended to
+ * leader or appended to addition. Need to use another
+ * word with an addition. It's a copy of the basicword_T
+ * "bw". */
+ if (gap == &bw->bw_suffix)
+ {
+ alen = ae->ae_add_nw - ae->ae_add;
+ nbw = (basicword_T *)alloc((unsigned)(
+ sizeof(basicword_T) + STRLEN(bw->bw_word)
+ + alen + 1));
+ if (nbw != NULL)
+ {
+ *nbw = *bw;
+ ga_init2(&nbw->bw_prefix, sizeof(short_u), 1);
+ ga_init2(&nbw->bw_suffix, sizeof(short_u), 1);
+
+ /* Adding the suffix may change the caps. */
+ STRCPY(nword, dw->dw_word);
+ if (ae->ae_chop != NULL)
+ {
+ /* Remove chop string. */
+ p = nword + STRLEN(nword);
+ for (i = mb_charlen(ae->ae_chop); i > 0; --i)
+ mb_ptr_back(nword, p);
+ *p = NUL;
+ }
+ STRCAT(nword, ae->ae_add);
+ flags = captype(nword, nword + STRLEN(nword));
+ if (flags & BWF_KEEPCAP)
+ {
+ nword[STRLEN(dw->dw_word) + alen] = NUL;
+ nbw->bw_caseword = vim_strsave(nword);
+ }
+ nbw->bw_flags &= ~(BWF_ONECAP | BWF_ALLCAP
+ | BWF_KEEPCAP);
+ nbw->bw_flags |= flags;
+
+ if (bw->bw_leadstring != NULL)
+ nbw->bw_leadstring =
+ vim_strsave(bw->bw_leadstring);
+ nbw->bw_addstring = vim_strsave(ae->ae_add_nw);
+
+ STRCPY(nbw->bw_word, bw->bw_word);
+ if (alen > 0 || ae->ae_chop != NULL)
+ {
+ /* Suffix starts with word character. Append
+ * it to the word. Add new word entry. */
+ wlen = STRLEN(nbw->bw_word);
+ if (ae->ae_chop != NULL)
+ wlen -= STRLEN(ae->ae_chop);
+ mch_memmove(nbw->bw_word + wlen, ae->ae_add,
+ alen);
+ nbw->bw_word[wlen + alen] = NUL;
+ add_to_wordlist(newwords, nbw);
+ }
+ else
+ /* Basic word is the same, link "nbw" after
+ * "bw". */
+ bw->bw_next = nbw;
+
+ /* Remember this word, we need to set bw_prefix
+ * and bw_suffix later. */
+ if (ga_grow(&fixga, 1) == OK)
+ ((basicword_T **)fixga.ga_data)[fixga.ga_len++]
+ = nbw;
+ }
+ }
+ else
+ {
+ /* TODO: prefix with non-word char */
+ }
+ }
+ else
+ {
+ /* Affix applies to this word, add the related affix
+ * number. But only if it's not there yet. And keep the
+ * list sorted, so that we can compare it later. */
+ for (i = 0; i < gap->ga_len; ++i)
+ {
+ n = ((short_u *)gap->ga_data)[i];
+ if (n >= ae->ae_affnr)
+ {
+ if (n == ae->ae_affnr)
+ i = -1;
+ break;
+ }
+ }
+ if (i >= 0 && ga_grow(gap, 1) == OK)
+ {
+ if (i < gap->ga_len)
+ mch_memmove(((short_u *)gap->ga_data) + i + 1,
+ ((short_u *)gap->ga_data) + i,
+ sizeof(short_u) * (gap->ga_len - i));
+ ((short_u *)gap->ga_data)[i] = ae->ae_affnr;
+ ++gap->ga_len;
+ }
+ }
+ }
+ }
+ }
+
+ /*
+ * For the words that we added for suffixes with non-word characters: Use
+ * the prefix list of the main word.
+ * TODO: do the same for prefixes.
+ */
+ for (i = 0; i < fixga.ga_len; ++i)
+ {
+ nbw = ((basicword_T **)fixga.ga_data)[i];
+ if (ga_grow(&nbw->bw_prefix, bw->bw_prefix.ga_len) == OK)
+ {
+ mch_memmove(nbw->bw_prefix.ga_data, bw->bw_prefix.ga_data,
+ bw->bw_prefix.ga_len * sizeof(short_u));
+ nbw->bw_prefix.ga_len = bw->bw_prefix.ga_len;
+ }
+ }
+
+ ga_clear(&fixga);
+}
+
+/*
+ * Go over all words in "oldwords" and change the old affix names to the new
+ * affix numbers, check the conditions, fold case, extract the basic word and
+ * additions.
+ */
+ static int
+build_wordlist(newwords, oldwords, oldaff, regionmask)
+ hashtab_T *newwords; /* basicword_T entries */
+ hashtab_T *oldwords; /* dicword_T entries */
+ afffile_T *oldaff; /* affixes for "oldwords" */
+ int regionmask; /* value for bw_region */
+{
+ int todo;
+ hashitem_T *old_hi;
+ dicword_T *dw;
+ basicword_T *bw;
+ char_u foldword[MAXLINELEN];
+ int leadlen;
+ char_u leadstring[MAXLINELEN];
+ int addlen;
+ char_u addstring[MAXLINELEN];
+ int dwlen;
+ char_u *p;
+ int clen;
+ int flags;
+ char_u *cp;
+ int l;
+
+ todo = oldwords->ht_used;
+ for (old_hi = oldwords->ht_array; todo > 0; ++old_hi)
+ {
+ if (!HASHITEM_EMPTY(old_hi))
+ {
+ --todo;
+ dw = HI2DW(old_hi);
+
+ /* This takes time, print a message now and then. */
+ if ((todo & 0x3ff) == 0 || todo == oldwords->ht_used - 1)
+ {
+ if (todo != oldwords->ht_used - 1)
+ {
+ msg_didout = FALSE;
+ msg_col = 0;
+ }
+ smsg((char_u *)_("%6d todo - %s"), todo, dw->dw_word);
+ out_flush();
+ ui_breakcheck();
+ if (got_int)
+ break;
+ }
+
+ /* The basic words are always stored with folded case. */
+ dwlen = STRLEN(dw->dw_word);
+ (void)str_foldcase(dw->dw_word, dwlen, foldword, MAXLINELEN);
+ flags = captype(dw->dw_word, dw->dw_word + dwlen);
+
+ /* Check for non-word characters before the word. */
+ clen = 0;
+ leadlen = 0;
+ if (!spell_iswordc(foldword))
+ {
+ p = foldword;
+ for (;;)
+ {
+ mb_ptr_adv(p);
+ ++clen;
+ if (*p == NUL) /* Only non-word chars (bad word!) */
+ {
+ if (p_verbose > 0)
+ smsg((char_u *)_("Warning: word without word characters: \"%s\""),
+ foldword);
+ break;
+ }
+ if (spell_iswordc(p))
+ {
+ /* Move the leader to "leadstring" and remove it from
+ * "foldword". */
+ leadlen = p - foldword;
+ mch_memmove(leadstring, foldword, leadlen);
+ leadstring[leadlen] = NUL;
+ mch_memmove(foldword, p, STRLEN(p) + 1);
+ break;
+ }
+ }
+ }
+
+ /* Check for non-word characters after word characters. */
+ addlen = 0;
+ for (p = foldword; spell_iswordc(p); mb_ptr_adv(p))
+ {
+ if (*p == NUL)
+ break;
+ ++clen;
+ }
+ if (*p != NUL)
+ {
+ /* Move the addition to "addstring" and truncate "foldword". */
+ if (flags & BWF_KEEPCAP)
+ {
+ /* Preserve caps, need to skip the right number of
+ * characters in the original word (case folding may
+ * change the byte count). */
+ l = 0;
+ for (cp = dw->dw_word; l < clen; mb_ptr_adv(cp))
+ ++l;
+ addlen = STRLEN(cp);
+ mch_memmove(addstring, cp, addlen + 1);
+ }
+ else
+ {
+ addlen = STRLEN(p);
+ mch_memmove(addstring, p, addlen + 1);
+ }
+ *p = NUL;
+ }
+
+ bw = (basicword_T *)alloc_clear((unsigned)sizeof(basicword_T)
+ + STRLEN(foldword));
+ if (bw == NULL)
+ break;
+ STRCPY(bw->bw_word, foldword);
+ bw->bw_region = regionmask;
+
+ if (leadlen > 0)
+ bw->bw_leadstring = vim_strsave(leadstring);
+ else
+ bw->bw_leadstring = NULL;
+ if (addlen > 0)
+ bw->bw_addstring = vim_strsave(addstring);
+ else
+ bw->bw_addstring = NULL;
+
+ add_to_wordlist(newwords, bw);
+
+ if (flags & BWF_KEEPCAP)
+ {
+ if (addlen == 0)
+ /* use the whole word */
+ bw->bw_caseword = vim_strsave(dw->dw_word + leadlen);
+ else
+ /* use only up to the addition */
+ bw->bw_caseword = vim_strnsave(dw->dw_word + leadlen,
+ cp - dw->dw_word - leadlen);
+ if (bw->bw_caseword == NULL) /* out of memory */
+ flags &= ~BWF_KEEPCAP;
+ }
+ bw->bw_flags = flags;
+
+ /* Deal with any affix names on the old word, translate them
+ * into affix numbers. */
+ ga_init2(&bw->bw_prefix, sizeof(short_u), 10);
+ ga_init2(&bw->bw_suffix, sizeof(short_u), 10);
+ if (dw->dw_affnm != NULL)
+ trans_affixes(dw, bw, oldaff, newwords);
+ }
+ }
+ if (todo > 0)
+ return FAIL;
+ return OK;
+}
+
+/*
+ * Go through the list of words and combine the ones that are identical except
+ * for the region.
+ */
+ static void
+combine_regions(newwords)
+ hashtab_T *newwords;
+{
+ int todo;
+ hashitem_T *hi;
+ basicword_T *bw, *nbw, *pbw;
+
+ /* Loop over all basic words in the words table. */
+ todo = newwords->ht_used;
+ for (hi = newwords->ht_array; todo > 0; ++hi)
+ {
+ if (!HASHITEM_EMPTY(hi))
+ {
+ --todo;
+
+ /* Loop over the list of words for this basic word. Compare with
+ * each following word in the same list. */
+ for (bw = HI2BW(hi); bw != NULL; bw = bw->bw_next)
+ {
+ pbw = bw;
+ for (nbw = pbw->bw_next; nbw != NULL; nbw = pbw->bw_next)
+ {
+ if (bw->bw_flags == nbw->bw_flags
+ && (bw->bw_leadstring == NULL)
+ == (nbw->bw_leadstring == NULL)
+ && (bw->bw_addstring == NULL)
+ == (nbw->bw_addstring == NULL)
+ && ((bw->bw_flags & BWF_KEEPCAP) == 0
+ || (STRCMP(bw->bw_caseword,
+ nbw->bw_caseword) == 0))
+ && (bw->bw_leadstring == NULL
+ || (STRCMP(bw->bw_leadstring,
+ nbw->bw_leadstring) == 0))
+ && (bw->bw_addstring == NULL
+ || (STRCMP(bw->bw_addstring,
+ nbw->bw_addstring) == 0))
+ && same_affixes(bw, nbw)
+ )
+ {
+ /* Match, combine regions and delete "nbw". */
+ pbw->bw_next = nbw->bw_next;
+ bw->bw_region |= nbw->bw_region;
+ free_basicword(nbw);
+ }
+ else
+ /* No match, continue with next one. */
+ pbw = nbw;
+ }
+ }
+ }
+ }
+}
+
+/*
+ * Return TRUE when the prefixes and suffixes for "bw" and "nbw" are equal.
+ */
+ static int
+same_affixes(bw, nbw)
+ basicword_T *bw;
+ basicword_T *nbw;
+{
+ return (bw->bw_prefix.ga_len == nbw->bw_prefix.ga_len
+ && bw->bw_suffix.ga_len == nbw->bw_suffix.ga_len
+ && (bw->bw_prefix.ga_len == 0
+ || vim_memcmp(bw->bw_prefix.ga_data,
+ nbw->bw_prefix.ga_data,
+ bw->bw_prefix.ga_len * sizeof(short_u)) == 0)
+ && (bw->bw_suffix.ga_len == 0
+ || vim_memcmp(bw->bw_suffix.ga_data,
+ nbw->bw_suffix.ga_data,
+ bw->bw_suffix.ga_len * sizeof(short_u)) == 0));
+}
+
+/*
+ * For each basic word with additions turn the affixes into other additions
+ * and/or new basic words. The result is that no affixes apply to a word with
+ * additions.
+ */
+ static void
+expand_affixes(newwords, prefgap, suffgap)
+ hashtab_T *newwords;
+ garray_T *prefgap;
+ garray_T *suffgap;
+{
+ int todo;
+ hashitem_T *hi;
+ basicword_T *bw;
+ int pi, si;
+ affentry_T *pae, *sae;
+ garray_T add_words;
+ int n;
+
+ ga_init2(&add_words, sizeof(basicword_T *), 10);
+
+ todo = newwords->ht_used;
+ for (hi = newwords->ht_array; todo > 0; ++hi)
+ {
+ if (!HASHITEM_EMPTY(hi))
+ {
+ --todo;
+ for (bw = HI2BW(hi); bw != NULL; bw = bw->bw_next)
+ {
+ /*
+ * Need to fix affixes if there is a leader or addition and
+ * there are prefixes or suffixes.
+ */
+ if ((bw->bw_leadstring != NULL || bw->bw_addstring != NULL)
+ && (bw->bw_prefix.ga_len != 0
+ || bw->bw_suffix.ga_len != 0))
+ {
+ /* Loop over all prefix numbers, but first without a
+ * prefix. */
+ for (pi = -1; pi < bw->bw_prefix.ga_len; ++pi)
+ {
+ pae = NULL;
+ if (pi >= 0)
+ {
+ n = ((short_u *)bw->bw_prefix.ga_data)[pi];
+ pae = ((affheader_T *)prefgap->ga_data + n)
+ ->ah_first;
+ }
+
+ /* Loop over all entries for prefix "pi". Do it once
+ * when there is no prefix (pi == -1). */
+ do
+ {
+ /* Loop over all suffix numbers. Do without a
+ * suffix first when there is a prefix. */
+ for (si = (pi == -1 ? 0 : -1);
+ si < bw->bw_suffix.ga_len; ++si)
+ {
+ sae = NULL;
+ if (si >= 0)
+ {
+ n = ((short_u *)bw->bw_suffix.ga_data)[si];
+ sae = ((affheader_T *)suffgap->ga_data + n)
+ ->ah_first;
+ }
+
+ /* Loop over all entries for suffix "si". Do
+ * it once when there is no suffix (si == -1).
+ */
+ do
+ {
+ /* Expand the word for this combination of
+ * prefixes and affixes. */
+ expand_one_aff(bw, &add_words, pae, sae);
+
+ /* Advance to next suffix entry, if there
+ * is one. */
+ if (sae != NULL)
+ sae = sae->ae_next;
+ } while (sae != NULL);
+ }
+
+ /* Advance to next prefix entry, if there is one. */
+ if (pae != NULL)
+ pae = pae->ae_next;
+ } while (pae != NULL);
+ }
+ }
+ }
+ }
+ }
+
+ /*
+ * Add the new words afterwards, can't change "newwords" while going over
+ * all its items.
+ */
+ for (pi = 0; pi < add_words.ga_len; ++pi)
+ add_to_wordlist(newwords, ((basicword_T **)add_words.ga_data)[pi]);
+
+ ga_clear(&add_words);
+}
+
+/*
+ * Add one word to "add_words" for basic word "bw" with additions, adding
+ * prefix "pae" and suffix "sae". Either "pae" or "sae" can be NULL.
+ */
+ static void
+expand_one_aff(bw, add_words, pae, sae)
+ basicword_T *bw;
+ garray_T *add_words;
+ affentry_T *pae;
+ affentry_T *sae;
+{
+ char_u word[MAXWLEN + 1];
+ char_u caseword[MAXWLEN + 1];
+ int l = 0;
+ int choplen = 0;
+ int ll;
+ basicword_T *nbw;
+
+ /* Prepend prefix to the basic word if there is a prefix and there is no
+ * leadstring. */
+ if (pae != NULL && bw->bw_leadstring == NULL)
+ {
+ if (pae->ae_add != NULL)
+ {
+ l = STRLEN(pae->ae_add);
+ mch_memmove(word, pae->ae_add, l);
+ }
+ if (pae->ae_chop != NULL)
+ choplen = STRLEN(pae->ae_chop);
+ }
+
+ /* Copy the body of the word. */
+ STRCPY(word + l, bw->bw_word + choplen);
+
+ /* Do the same for bw_caseword, if it's there. */
+ if (bw->bw_flags & BWF_KEEPCAP)
+ {
+ if (l > 0)
+ mch_memmove(caseword, pae->ae_add, l);
+ STRCPY(caseword + l, bw->bw_caseword + choplen);
+ }
+
+ /* Append suffix to the basic word if there is a suffix and there is no
+ * addstring. */
+ if (sae != 0 && bw->bw_addstring == NULL)
+ {
+ l = STRLEN(word);
+ if (sae->ae_chop != NULL)
+ l -= STRLEN(sae->ae_chop);
+ if (sae->ae_add == NULL)
+ word[l] = NUL;
+ else
+ STRCPY(word + l, sae->ae_add);
+
+ if (bw->bw_flags & BWF_KEEPCAP)
+ {
+ /* Do the same for the caseword. */
+ l = STRLEN(caseword);
+ if (sae->ae_chop != NULL)
+ l -= STRLEN(sae->ae_chop);
+ if (sae->ae_add == NULL)
+ caseword[l] = NUL;
+ else
+ STRCPY(caseword + l, sae->ae_add);
+ }
+ }
+
+ nbw = (basicword_T *)alloc_clear((unsigned)
+ sizeof(basicword_T) + STRLEN(word));
+ if (nbw != NULL)
+ {
+ /* Add the new word to the list of words to be added later. */
+ if (ga_grow(add_words, 1) == FAIL)
+ {
+ vim_free(nbw);
+ return;
+ }
+ ((basicword_T **)add_words->ga_data)[add_words->ga_len++] = nbw;
+
+ /* Copy the (modified) basic word, flags and region. */
+ STRCPY(nbw->bw_word, word);
+ nbw->bw_flags = bw->bw_flags;
+ nbw->bw_region = bw->bw_region;
+
+ /* Set the (modified) caseword. */
+ if (bw->bw_flags & BWF_KEEPCAP)
+ if ((nbw->bw_caseword = vim_strsave(caseword)) == NULL)
+ nbw->bw_flags &= ~BWF_KEEPCAP;
+
+ if (bw->bw_leadstring != NULL)
+ {
+ if (pae != NULL)
+ {
+ /* Prepend prefix to leadstring. */
+ ll = STRLEN(bw->bw_leadstring);
+ l = choplen = 0;
+ if (pae->ae_add != NULL)
+ l = STRLEN(pae->ae_add);
+ if (pae->ae_chop != NULL)
+ {
+ choplen = STRLEN(pae->ae_chop);
+ if (choplen > ll) /* TODO: error? */
+ choplen = ll;
+ }
+ nbw->bw_leadstring = alloc((unsigned)(ll + l - choplen + 1));
+ if (nbw->bw_leadstring != NULL)
+ {
+ if (l > 0)
+ mch_memmove(nbw->bw_leadstring, pae->ae_add, l);
+ STRCPY(nbw->bw_leadstring + l, bw->bw_leadstring + choplen);
+ }
+ }
+ else
+ nbw->bw_leadstring = vim_strsave(bw->bw_leadstring);
+ }
+
+ if (bw->bw_addstring != NULL)
+ {
+ if (sae != NULL)
+ {
+ /* Append suffix to addstring. */
+ l = STRLEN(bw->bw_addstring);
+ if (sae->ae_chop != NULL)
+ {
+ l -= STRLEN(sae->ae_chop);
+ if (l < 0) /* TODO: error? */
+ l = 0;
+ }
+ if (sae->ae_add == NULL)
+ ll = 0;
+ else
+ ll = STRLEN(sae->ae_add);
+ nbw->bw_addstring = alloc((unsigned)(ll + l - choplen + 1));
+ if (nbw->bw_addstring != NULL)
+ {
+ STRCPY(nbw->bw_addstring, bw->bw_addstring);
+ if (sae->ae_add == NULL)
+ nbw->bw_addstring[l] = NUL;
+ else
+ STRCPY(nbw->bw_addstring + l, sae->ae_add);
+ }
+ }
+ else
+ nbw->bw_addstring = vim_strsave(bw->bw_addstring);
+ }
+ }
+}
+
+/*
+ * Add basicword_T "*bw" to wordlist "newwords".
+ */
+ static void
+add_to_wordlist(newwords, bw)
+ hashtab_T *newwords;
+ basicword_T *bw;
+{
+ hashitem_T *hi;
+ basicword_T *bw2;
+
+ hi = hash_find(newwords, bw->bw_word);
+ if (HASHITEM_EMPTY(hi))
+ {
+ /* New entry, add to hashlist. */
+ hash_add(newwords, bw->bw_word);
+ bw->bw_next = NULL;
+ }
+ else
+ {
+ /* Existing entry, append to list of basic words. */
+ bw2 = HI2BW(hi);
+ bw->bw_next = bw2->bw_next;
+ bw2->bw_next = bw;
+ }
+}
+
+/*
+ * Write a number to file "fd", MSB first, in "len" bytes.
+ */
+ static void
+put_bytes(fd, nr, len)
+ FILE *fd;
+ long_u nr;
+ int len;
+{
+ int i;
+
+ for (i = len - 1; i >= 0; --i)
+ putc((int)(nr >> (i * 8)), fd);
+}
+
+/*
+ * Write affix info. <affflags> <affitemcnt> <affitem> ...
+ */
+ static void
+write_affix(fd, ah)
+ FILE *fd;
+ affheader_T *ah;
+{
+ int i = 0;
+ affentry_T *ae;
+ char_u *p;
+ int round;
+
+ fputc(ah->ah_combine ? 1 : 0, fd); /* <affflags> */
+
+ /* Count the number of entries. */
+ for (ae = ah->ah_first; ae != NULL; ae = ae->ae_next)
+ ++i;
+ put_bytes(fd, (long_u)i, 2); /* <affitemcnt> */
+
+ for (ae = ah->ah_first; ae != NULL; ae = ae->ae_next)
+ for (round = 1; round <= 2; ++round)
+ {
+ p = round == 1 ? ae->ae_chop : ae->ae_add;
+ if (p == NULL)
+ putc(0, fd); /* <affchoplen> / <affaddlen> */
+ else
+ {
+ putc(STRLEN(p), fd); /* <affchoplen> / <affaddlen> */
+ /* <affchop> / <affadd> */
+ fwrite(p, STRLEN(p), (size_t)1, fd);
+ }
+ }
+}
+
+/*
+ * Write list of affix NRs: <affixcnt> <affixNR> ...
+ */
+ static void
+write_affixlist(fd, aff, bytes)
+ FILE *fd;
+ garray_T *aff;
+ int bytes;
+{
+ int i;
+
+ if (aff->ga_len > 0)
+ {
+ putc(aff->ga_len, fd); /* <affixcnt> */
+ for (i = 0; i < aff->ga_len; ++i)
+ put_bytes(fd, (long_u )((short_u *)aff->ga_data)[i], bytes);
+ }
+}
+
+/*
+ * Vim spell file format: <HEADER> <PREFIXLIST> <SUFFIXLIST>
+ * <SUGGEST> <WORDLIST>
+ *
+ * <HEADER>: <fileID> <regioncnt> <regionname> ...
+ *
+ * <fileID> 10 bytes "VIMspell01"
+ * <regioncnt> 1 byte number of regions following (8 supported)
+ * <regionname> 2 bytes Region name: ca, au, etc.
+ * First <regionname> is region 1.
+ *
+ *
+ * <PREFIXLIST>: <affcount> <afftotcnt> <affix> ...
+ * <SUFFIXLIST>: <affcount> <afftotcnt> <affix> ...
+ * list of possible affixes: prefixes and suffixes.
+ *
+ * <affcount> 2 bytes Number of affixes (MSB comes first).
+ * When more than 256 an affixNR is 2 bytes.
+ * This is separate for prefixes and suffixes!
+ * First affixNR is 0.
+ * <afftotcnt> 2 bytes Total number of affix items (MSB comes first).
+ *
+ * <affix>: <affflags> <affitemcnt> <affitem> ...
+ *
+ * <affflags> 1 byte 0x01: prefix combines with suffix.
+ * 0x02-0x80: unset
+ * <affitemcnt> 2 bytes Number of affixes with this affixNR (MSB first).
+ *
+ * <affitem>: <affchoplen> <affchop> <affaddlen> <affadd>
+ *
+ * <affchoplen> 1 byte Length of <affchop> in bytes.
+ * <affchop> N bytes To be removed from basic word.
+ * <affaddlen> 1 byte Length of <affadd> in bytes.
+ * <affadd> N bytes To be added to basic word.
+ *
+ *
+ * <SUGGEST> : <suggestlen> <more> ...
+ *
+ * <suggestlen> 4 bytes Length of <SUGGEST> in bytes, excluding
+ * <suggestlen>. MSB first.
+ * <more> To be defined.
+ *
+ *
+ * <WORDLIST>: <wordcount> <worditem> ...
+ *
+ * <wordcount> 4 bytes Number of <worditem> following. MSB first.
+ *
+ * <worditem>: <nr> <string> <flags> [<flags2>]
+ * [<caselen> <caseword>]
+ * [<affixcnt> <affixNR> ...] (prefixes)
+ * [<affixcnt> <affixNR> ...] (suffixes)
+ * [<region>]
+ * [<addcnt> <add> ...]
+ *
+ * <nr> i 1 byte Number of bytes copied from previous word.
+ * <string> N bytes Additional bytes for word, up to byte smaller than
+ * 0x20 (space).
+ * Must only contain case-folded word characters.
+ * <flags> 1 byte 0x01: word is valid without addition
+ * 0x02: has region byte
+ * 0x04: first letter must be upper-case
+ * 0x08: has suffixes, <affixcnt> and <affixNR> follow
+ * 0x10: more flags, <flags2> follows next
+ * 0x20-0x80: can't be used, unset
+ * <flags2> 1 byte 0x01: has additions, <addcnt> and <add> follow
+ * 0x02: has prefixes, <affixcnt> and <affixNR> follow
+ * 0x04: all letters must be upper-case
+ * 0x08: case must match
+ * 0x10-0x80: unset
+ * <caselen> 1 byte Length of <caseword>.
+ * <caseword> N bytes Word with matching case.
+ * <affixcnt> 1 byte Number of affix NRs following.
+ * <affixNR> 1 or 2 byte Number of possible affix for this word.
+ * When using 2 bytes MSB comes first.
+ * <region> 1 byte Bitmask for regions in which word is valid. When
+ * omitted it's valid in all regions.
+ * Lowest bit is for region 1.
+ * <addcnt> 2 bytes Number of <add> items following.
+ *
+ * <add>: <addflags> <addlen> [<leadlen> <addstring>] [<region>]
+ *
+ * <addflags> 1 byte 0x01: fixed case, <addstring> is the whole word
+ * with matching case.
+ * 0x02: first letter must be upper-case
+ * 0x04: all letters must be upper-case
+ * 0x08: has region byte
+ * 0x10-0x80: unset
+ * <addlen> 1 byte Length of <addstring> in bytes.
+ * <leadlen> 1 byte Number of bytes at start of <addstring> that must
+ * come before the start of the basic word.
+ * <addstring> N bytes Word characters, before/in/after the word.
+ *
+ * All text characters are in 'encoding': <affchop>, <affadd>, <string>,
+ * <caseword>> and <addstring>.
+ * All other fields are ASCII: <regionname>
+ * <string> is always case-folded.
+ */
+
+/*
+ * Write the Vim spell file "fname".
+ */
+ static void
+write_vim_spell(fname, prefga, suffga, newwords, regcount, regchars)
+ char_u *fname;
+ garray_T *prefga; /* prefixes, affheader_T entries */
+ garray_T *suffga; /* suffixes, affheader_T entries */
+ hashtab_T *newwords; /* basic words, basicword_T entries */
+ int regcount; /* number of regions */
+ char_u *regchars; /* region names */
+{
+ FILE *fd;
+ garray_T *gap;
+ hashitem_T *hi;
+ char_u **wtab;
+ int todo;
+ int flags, aflags;
+ basicword_T *bw, *bwf, *bw2, *prevbw = NULL;
+ int regionmask; /* mask for all relevant region bits */
+ int i;
+ int cnt;
+ affentry_T *ae;
+ int round;
+ int prefm, suffm;
+ garray_T bwga;
+
+ fd = fopen((char *)fname, "w");
+ if (fd == NULL)
+ {
+ EMSG2(_(e_notopen), fname);
+ return;
+ }
+
+ fwrite(VIMSPELLMAGIC, VIMSPELLMAGICL, (size_t)1, fd);
+
+ /* write the region names if there is more than one */
+ if (regcount > 1)
+ {
+ putc(regcount, fd);
+ fwrite(regchars, (size_t)(regcount * 2), (size_t)1, fd);
+ regionmask = (1 << regcount) - 1;
+ }
+ else
+ {
+ putc(0, fd);
+ regionmask = 0;
+ }
+
+ /* Write the prefix and suffix lists. */
+ for (round = 1; round <= 2; ++round)
+ {
+ gap = round == 1 ? prefga : suffga;
+ put_bytes(fd, (long_u)gap->ga_len, 2); /* <affcount> */
+
+ /* Count the total number of affix items. */
+ cnt = 0;
+ for (i = 0; i < gap->ga_len; ++i)
+ for (ae = ((affheader_T *)gap->ga_data + i)->ah_first;
+ ae != NULL; ae = ae->ae_next)
+ ++cnt;
+ put_bytes(fd, (long_u)cnt, 2); /* <afftotcnt> */
+
+ for (i = 0; i < gap->ga_len; ++i)
+ write_affix(fd, (affheader_T *)gap->ga_data + i);
+ }
+
+ /* Number of bytes used for affix NR depends on affix count. */
+ prefm = (prefga->ga_len > 256) ? 2 : 1;
+ suffm = (suffga->ga_len > 256) ? 2 : 1;
+
+ /* Write the suggest info. TODO */
+ put_bytes(fd, 0L, 4);
+
+ /*
+ * Write the word list. <wordcount> <worditem> ...
+ */
+ /* number of basic words in 4 bytes */
+ put_bytes(fd, newwords->ht_used, 4); /* <wordcount> */
+
+ /*
+ * Sort the word list, so that we can reuse as many bytes as possible.
+ */
+ wtab = (char_u **)alloc((unsigned)(sizeof(char_u *) * newwords->ht_used));
+ if (wtab != NULL)
+ {
+ /* Make a table with pointers to each word. */
+ todo = newwords->ht_used;
+ for (hi = newwords->ht_array; todo > 0; ++hi)
+ if (!HASHITEM_EMPTY(hi))
+ wtab[--todo] = hi->hi_key;
+
+ /* Sort. */
+ sort_strings(wtab, (int)newwords->ht_used);
+
+ /* Now write each basic word to the spell file. */
+ ga_init2(&bwga, sizeof(basicword_T *), 10);
+ for (todo = 0; todo < newwords->ht_used; ++todo)
+ {
+ bwf = KEY2BW(wtab[todo]);
+
+ /*
+ * Reorder the list of basicword_T words: make a list for words
+ * with the same case-folded word. Put them together for same
+ * caps (ONECAP, ALLCAP and various KEEPCAP words) and same
+ * affixes. Each list will then be put as a basic word with
+ * additions.
+ * This won't take much space, since the basic word is the same
+ * every time, only its length is written.
+ */
+ bwga.ga_len = 0;
+ for (bw = bwf; bw != NULL; bw = bw->bw_next)
+ {
+ flags = bw->bw_flags & (BWF_ONECAP | BWF_KEEPCAP | BWF_ALLCAP);
+
+ /* Go through the lists we found so far. Break when the case
+ * matches. */
+ for (i = 0; i < bwga.ga_len; ++i)
+ {
+ bw2 = ((basicword_T **)bwga.ga_data)[i];
+ aflags = bw2->bw_flags & (BWF_ONECAP | BWF_KEEPCAP
+ | BWF_ALLCAP);
+ if (flags == aflags
+ && ((flags & BWF_KEEPCAP) == 0
+ || (STRCMP(bw->bw_caseword,
+ bw2->bw_caseword) == 0))
+ && same_affixes(bw, bw2))
+ break;
+ }
+ if (i == bwga.ga_len)
+ {
+ /* No word with similar caps, make a new list. */
+ if (ga_grow(&bwga, 1) == FAIL)
+ break;
+ ((basicword_T **)bwga.ga_data)[i] = bw;
+ bw->bw_cnext = NULL;
+ ++bwga.ga_len;
+ }
+ else
+ {
+ /* Add to list of words with similar caps. */
+ bw->bw_cnext = bw2->bw_cnext;
+ bw2->bw_cnext = bw;
+ }
+ }
+
+ /* Prefer the word with no caps to use as the first basic word.
+ * At least one without KEEPCAP. */
+ bw = NULL;
+ for (i = 0; i < bwga.ga_len; ++i)
+ {
+ bw2 = ((basicword_T **)bwga.ga_data)[i];
+ if (bw == NULL
+ || (bw2->bw_flags & (BWF_ONECAP | BWF_KEEPCAP
+ | BWF_ALLCAP)) == 0
+ || (bw->bw_flags & BWF_KEEPCAP))
+ bw = bw2;
+ }
+
+ /* Write first basic word. If it's KEEPCAP then we need a word
+ * without VALID flag first (makes it easier to read the list back
+ * in). */
+ if (bw->bw_flags & BWF_KEEPCAP)
+ write_bword(fd, bw, TRUE, &prevbw, regionmask, prefm, suffm);
+ write_bword(fd, bw, FALSE, &prevbw, regionmask, prefm, suffm);
+
+ /* Write other basic words, with different caps. */
+ for (i = 0; i < bwga.ga_len; ++i)
+ {
+ bw2 = ((basicword_T **)bwga.ga_data)[i];
+ if (bw2 != bw)
+ write_bword(fd, bw2, FALSE, &prevbw, regionmask,
+ prefm, suffm);
+ }
+ }
+
+ ga_clear(&bwga);
+ }
+
+ fclose(fd);
+}
+
+/*
+ * Write basic word, followed by any additions.
+ *
+ * <worditem>: <nr> <string> <flags> [<flags2>]
+ * [<caselen> <caseword>]
+ * [<affixcnt> <affixNR> ...] (prefixes)
+ * [<affixcnt> <affixNR> ...] (suffixes)
+ * [<region>]
+ * [<addcnt> <add> ...]
+ */
+ static void
+write_bword(fd, bwf, lowcap, prevbw, regionmask, prefm, suffm)
+ FILE *fd;
+ basicword_T *bwf;
+ int lowcap; /* write KEEPKAP word as not-valid */
+ basicword_T **prevbw; /* last written basic word */
+ int regionmask; /* mask that includes all possible regions */
+ int prefm;
+ int suffm;
+{
+ int flags;
+ int aflags;
+ int len;
+ int leadlen, addlen;
+ int clen;
+ int adds = 0;
+ int i;
+ basicword_T *bw, *bw2;
+
+ /* Check how many bytes can be copied from the previous word. */
+ len = STRLEN(bwf->bw_word);
+ if (*prevbw == NULL)
+ clen = 0;
+ else
+ for (clen = 0; clen < len
+ && (*prevbw)->bw_word[clen] == bwf->bw_word[clen]; ++clen)
+ ;
+ putc(clen, fd); /* <nr> */
+ *prevbw = bwf;
+ /* <string> */
+ if (len > clen)
+ fwrite(bwf->bw_word + clen, (size_t)(len - clen), (size_t)1, fd);
+
+ /* Try to find a word without additions to use first. */
+ bw = bwf;
+ for (bw2 = bwf; bw2 != NULL; bw2 = bw2->bw_cnext)
+ {
+ if (bw2->bw_addstring != NULL || bw2->bw_leadstring != NULL)
+ ++adds;
+ else
+ bw = bw2;
+ }
+
+ /* Flags: If there is no leadstring and no addstring the basic word is
+ * valid, may have prefixes, suffixes and region. */
+ flags = bw->bw_flags;
+ if (bw->bw_addstring == NULL && bw->bw_leadstring == NULL)
+ {
+ flags |= BWF_VALID;
+
+ /* Add the prefix/suffix list if there are prefixes/suffixes. */
+ if (bw->bw_prefix.ga_len > 0)
+ flags |= BWF_PREFIX;
+ if (bw->bw_suffix.ga_len > 0)
+ flags |= BWF_SUFFIX;
+
+ /* Flags: add the region byte if the word isn't valid in all
+ * regions. */
+ if (regionmask != 0 && (bw->bw_region & regionmask) != regionmask)
+ flags |= BWF_REGION;
+ }
+
+ /* Flags: may have additions. */
+ if (adds > 0)
+ flags |= BWF_ADDS;
+
+ /* The dummy word before a KEEPCAP word doesn't have any flags, they are
+ * in the actual word that follows. */
+ if (lowcap)
+ flags = 0;
+
+ /* Flags: when the upper byte is not used we only write one flags
+ * byte, if it's used then set an extra flag in the first byte and
+ * also write the second byte. */
+ if ((flags & 0xff00) == 0)
+ putc(flags, fd); /* <flags> */
+ else
+ {
+ putc(flags | BWF_SECOND, fd); /* <flags> */
+ putc((int)((unsigned)flags >> 8), fd); /* <flags2> */
+ }
+
+ /* First dummy word doesn't need anything but flags. */
+ if (lowcap)
+ return;
+
+ if (flags & BWF_KEEPCAP)
+ {
+ len = STRLEN(bw->bw_caseword);
+ putc(len, fd); /* <caselen> */
+ for (i = 0; i < len; ++i)
+ putc(bw->bw_caseword[i], fd); /* <caseword> */
+ }
+
+ /* write prefix and suffix lists: <affixcnt> <affixNR> ... */
+ if (flags & BWF_PREFIX)
+ write_affixlist(fd, &bw->bw_prefix, prefm);
+ if (flags & BWF_SUFFIX)
+ write_affixlist(fd, &bw->bw_suffix, suffm);
+
+ if (flags & BWF_REGION)
+ putc(bw->bw_region, fd); /* <region> */
+
+ /*
+ * Additions.
+ */
+ if (adds > 0)
+ {
+ put_bytes(fd, (long_u)adds, 2); /* <addcnt> */
+
+ for (bw = bwf; bw != NULL; bw = bw->bw_cnext)
+ if (bw->bw_leadstring != NULL || bw->bw_addstring != NULL)
+ {
+ /* <add>: <addflags> <addlen> [<leadlen> <addstring>]
+ * [<region>] */
+ aflags = 0;
+ if (bw->bw_flags & BWF_ONECAP)
+ aflags |= ADD_ONECAP;
+ if (bw->bw_flags & BWF_ALLCAP)
+ aflags |= ADD_ALLCAP;
+ if (bw->bw_flags & BWF_KEEPCAP)
+ aflags |= ADD_KEEPCAP;
+ if (regionmask != 0
+ && (bw->bw_region & regionmask) != regionmask)
+ aflags |= ADD_REGION;
+ putc(aflags, fd); /* <addflags> */
+
+ if (bw->bw_leadstring == NULL)
+ leadlen = 0;
+ else
+ leadlen = STRLEN(bw->bw_leadstring);
+ if (bw->bw_addstring == NULL)
+ addlen = 0;
+ else
+ addlen = STRLEN(bw->bw_addstring);
+ putc(leadlen + addlen, fd); /* <addlen> */
+ putc(leadlen, fd); /* <leadlen> */
+ /* <addstring> */
+ if (bw->bw_leadstring != NULL)
+ fwrite(bw->bw_leadstring, (size_t)leadlen, (size_t)1, fd);
+ if (bw->bw_addstring != NULL)
+ fwrite(bw->bw_addstring, (size_t)addlen, (size_t)1, fd);
+
+ if (aflags & ADD_REGION)
+ putc(bw->bw_region, fd); /* <region> */
+ }
+ }
+}
+
+
+/*
+ * ":mkspell outfile infile ..."
+ */
+ void
+ex_mkspell(eap)
+ exarg_T *eap;
+{
+ int fcount;
+ char_u **fnames;
+ char_u fname[MAXPATHL];
+ char_u wfname[MAXPATHL];
+ afffile_T *(afile[8]);
+ hashtab_T dfile[8];
+ int i;
+ int len;
+ char_u region_name[16];
+ struct stat st;
+ int round;
+ vimconv_T conv;
+
+ /* Expand all the arguments (e.g., $VIMRUNTIME). */
+ if (get_arglist_exp(eap->arg, &fcount, &fnames) == FAIL)
+ return;
+ if (fcount < 2)
+ EMSG(_(e_invarg)); /* need at least output and input names */
+ else if (fcount > 9)
+ EMSG(_("E754: Only up to 8 regions supported"));
+ else
+ {
+ /* Check for overwriting before doing things that may take a lot of
+ * time. */
+ sprintf((char *)wfname, "%s.%s.spl", fnames[0], p_enc);
+ if (!eap->forceit && mch_stat((char *)wfname, &st) >= 0)
+ {
+ EMSG(_(e_exists));
+ goto theend;
+ }
+ if (mch_isdir(fnames[0]))
+ {
+ EMSG2(_(e_isadir2), fnames[0]);
+ goto theend;
+ }
+
+ /*
+ * Init the aff and dic pointers.
+ * Get the region names if there are more than 2 arguments.
+ */
+ for (i = 1; i < fcount; ++i)
+ {
+ afile[i - 1] = NULL;
+ hash_init(&dfile[i - 1]);
+ if (fcount > 2)
+ {
+ len = STRLEN(fnames[i]);
+ if (STRLEN(gettail(fnames[i])) < 5 || fnames[i][len - 3] != '_')
+ {
+ EMSG2(_("E755: Invalid region in %s"), fnames[i]);
+ goto theend;
+ }
+ else
+ {
+ region_name[(i - 1) * 2] = TOLOWER_ASC(fnames[i][len - 2]);
+ region_name[(i - 1) * 2 + 1] =
+ TOLOWER_ASC(fnames[i][len - 1]);
+ }
+ }
+ }
+
+ /*
+ * Read all the .aff and .dic files.
+ * Text is converted to 'encoding'.
+ */
+ for (i = 1; i < fcount; ++i)
+ {
+ /* Read the .aff file. Will init "conv" based on the "SET" line. */
+ conv.vc_type = CONV_NONE;
+ sprintf((char *)fname, "%s.aff", fnames[i]);
+ if ((afile[i - 1] = spell_read_aff(fname, &conv)) == NULL)
+ break;
+
+ /* Read the .dic file. */
+ sprintf((char *)fname, "%s.dic", fnames[i]);
+ if (spell_read_dic(&dfile[i - 1], fname, &conv) == FAIL)
+ break;
+
+ /* Free any conversion stuff. */
+ convert_setup(&conv, NULL, NULL);
+ }
+
+ /* Process the data when all the files could be read. */
+ if (i == fcount)
+ {
+ garray_T prefga;
+ garray_T suffga;
+ garray_T *gap;
+ hashtab_T newwords;
+
+ /*
+ * Combine all the affixes into one new affix list. This is done
+ * for prefixes and suffixes separately.
+ * We need to do this for each region, try to re-use the same
+ * affixes.
+ * Since we number the new affix entries, a growarray will do. In
+ * the affheader_T the ah_key is unused.
+ */
+ MSG(_("Combining affixes..."));
+ out_flush();
+ for (round = 1; round <= 2; ++round)
+ {
+ gap = round == 1 ? &prefga : &suffga;
+ ga_init2(gap, sizeof(affheader_T), 50);
+ for (i = 1; i < fcount; ++i)
+ get_new_aff(round == 1 ? &afile[i - 1]->af_pref
+ : &afile[i - 1]->af_suff, gap);
+ }
+
+ /*
+ * Go over all words and:
+ * - change the old affix names to the new affix numbers
+ * - check the conditions
+ * - fold case
+ * - extract the basic word and additions.
+ * Do this for each region.
+ */
+ MSG(_("Building word list..."));
+ out_flush();
+ hash_init(&newwords);
+
+ for (i = 1; i < fcount; ++i)
+ build_wordlist(&newwords, &dfile[i - 1], afile[i - 1],
+ 1 << (i - 1));
+
+ if (fcount > 2)
+ {
+ /* Combine words for the different regions into one. */
+ MSG(_("Combining regions..."));
+ out_flush();
+ combine_regions(&newwords);
+ }
+
+ /*
+ * Affixes on a word with additions are clumsy, would require
+ * inefficient searching. Turn the affixes into additions and/or
+ * the expanded word.
+ */
+ MSG(_("Processing words..."));
+ out_flush();
+ expand_affixes(&newwords, &prefga, &suffga);
+
+ /* Write the info in the spell file. */
+ smsg((char_u *)_("Writing spell file %s..."), wfname);
+ out_flush();
+ write_vim_spell(wfname, &prefga, &suffga, &newwords,
+ fcount - 1, region_name);
+ MSG(_("Done!"));
+ out_flush();
+
+ /* Free the allocated stuff. */
+ free_wordtable(&newwords);
+ for (round = 1; round <= 2; ++round)
+ {
+ gap = round == 1 ? &prefga: &suffga;
+ for (i = 0; i < gap->ga_len; ++i)
+ free_affixentries(((affheader_T *)gap->ga_data + i)
+ ->ah_first);
+ ga_clear(gap);
+ }
+ }
+
+ /* Free the .aff and .dic file structures. */
+ for (i = 1; i < fcount; ++i)
+ {
+ if (afile[i - 1] != NULL)
+ spell_free_aff(afile[i - 1]);
+ spell_free_dic(&dfile[i - 1]);
+ }
+ }
+
+theend:
+ FreeWild(fcount, fnames);
+}
+
+ static void
+free_wordtable(ht)
+ hashtab_T *ht;
+{
+ int todo;
+ basicword_T *bw, *nbw;
+ hashitem_T *hi;
+
+ todo = ht->ht_used;
+ for (hi = ht->ht_array; todo > 0; ++hi)
+ {
+ if (!HASHITEM_EMPTY(hi))
+ {
+ --todo;
+ for (bw = HI2BW(hi); bw != NULL; bw = nbw)
+ {
+ nbw = bw->bw_next;
+ free_basicword(bw);
+ }
+ }
+ }
+}
+
+/*
+ * Free a basicword_T and what it contains.
+ */
+ static void
+free_basicword(bw)
+ basicword_T *bw;
+{
+ ga_clear(&bw->bw_prefix);
+ ga_clear(&bw->bw_suffix);
+ vim_free(bw->bw_caseword);
+ vim_free(bw->bw_leadstring);
+ vim_free(bw->bw_addstring);
+ vim_free(bw);
+}
+
+/*
+ * Free a list of affentry_T.
+ */
+ static void
+free_affixentries(first)
+ affentry_T *first;
+{
+ affentry_T *ap, *an;
+
+ for (ap = first; ap != NULL; ap = an)
+ {
+ an = ap->ae_next;
+ vim_free(ap->ae_chop);
+ vim_free(ap->ae_add);
+ vim_free(ap->ae_cond);
+ vim_free(ap->ae_prog);
+ vim_free(ap);
+ }
+}
+
+#endif /* FEAT_MBYTE */
+
+#endif /* FEAT_SYN_HL */
+
+#if 0 /* old spell code with words in .spl file */
+/*
+ * Structure that is used to store the text from the language file. This
+ * avoids the need to allocate space for each individual word. It's allocated
+ * in big chunks for speed.
*/
#define SBLOCKSIZE 4096 /* default size of sb_data */
typedef struct sblock_S sblock_T;
@@ -75,7 +3932,7 @@ static slang_T *first_lang = NULL;
typedef struct dword_S
{
char_u dw_region; /* one bit per region where it's valid */
- char_u dw_flags; /* WF_ flags */
+ char_u dw_flags; /* DW_ flags */
char_u dw_word[1]; /* actually longer, NUL terminated */
} dword_T;
@@ -91,7 +3948,7 @@ typedef struct nword_S
starting with non-word character */
int nw_maxlen; /* longest nword length (after the dword) */
char_u nw_region; /* one bit per region where it's valid */
- char_u nw_flags; /* WF_ flags */
+ char_u nw_flags; /* DW_ flags */
char_u nw_word[1]; /* actually longer, NUL terminated */
} nword_T;
@@ -921,163 +4778,5 @@ theend:
vim_free(rbuf);
}
-/*
- * Parse 'spelllang' and set buf->b_langp accordingly.
- * Returns an error message or NULL.
- */
- char_u *
-did_set_spelllang(buf)
- buf_T *buf;
-{
- garray_T ga;
- char_u *lang;
- char_u *e;
- char_u *region;
- int region_mask;
- slang_T *lp;
- int c;
-
- ga_init2(&ga, sizeof(langp_T), 2);
-
- /* loop over comma separated languages. */
- for (lang = buf->b_p_spl; *lang != NUL; lang = e)
- {
- e = vim_strchr(lang, ',');
- if (e == NULL)
- e = lang + STRLEN(lang);
- if (e > lang + 2)
- {
- if (lang[2] != '_' || e - lang != 5)
- {
- ga_clear(&ga);
- return e_invarg;
- }
- region = lang + 3;
- }
- else
- region = NULL;
-
- for (lp = first_lang; lp != NULL; lp = lp->sl_next)
- if (STRNICMP(lp->sl_name, lang, 2) == 0)
- break;
-
- if (lp == NULL)
- /* Not found, load the language. */
- lp = spell_load_lang(lang);
-
- if (lp != NULL)
- {
- if (region == NULL)
- region_mask = REGION_ALL;
- else
- {
- /* find region in sl_regions */
- c = find_region(lp->sl_regions, region);
- if (c == REGION_ALL)
- {
- c = lang[5];
- lang[5] = NUL;
- smsg((char_u *)_("Warning: region %s not supported"), lang);
- lang[5] = c;
- region_mask = REGION_ALL;
- }
- else
- region_mask = 1 << c;
- }
-
- if (ga_grow(&ga, 1) == FAIL)
- {
- ga_clear(&ga);
- return e_outofmem;
- }
- LANGP_ENTRY(ga, ga.ga_len)->lp_slang = lp;
- LANGP_ENTRY(ga, ga.ga_len)->lp_region = region_mask;
- ++ga.ga_len;
- }
-
- if (*e == ',')
- ++e;
- }
-
- /* Add a NULL entry to mark the end of the list. */
- if (ga_grow(&ga, 1) == FAIL)
- {
- ga_clear(&ga);
- return e_outofmem;
- }
- LANGP_ENTRY(ga, ga.ga_len)->lp_slang = NULL;
- ++ga.ga_len;
-
- /* Everything is fine, store the new b_langp value. */
- ga_clear(&buf->b_langp);
- buf->b_langp = ga;
-
- return NULL;
-}
-
-/*
- * Find the region "region[2]" in "rp" (points to "sl_regions").
- * Each region is simply stored as the two characters of it's name.
- * Returns the index if found, REGION_ALL if not found.
- */
- static int
-find_region(rp, region)
- char_u *rp;
- char_u *region;
-{
- int i;
-
- for (i = 0; ; i += 2)
- {
- if (rp[i] == NUL)
- return REGION_ALL;
- if (rp[i] == region[0] && rp[i + 1] == region[1])
- break;
- }
- return i / 2;
-}
-
-# if defined(FEAT_MBYTE) || defined(PROTO)
-/*
- * Clear all spelling tables and reload them.
- * Used after 'encoding' is set.
- */
- void
-spell_reload()
-{
- buf_T *buf;
- slang_T *lp;
- sblock_T *sp;
- /* Initialize the table for spell_iswordc(). */
- init_spell_chartab();
-
- /* Unload all allocated memory. */
- while (first_lang != NULL)
- {
- lp = first_lang;
- first_lang = lp->sl_next;
-
- hash_clear(&lp->sl_fwords.wi_ht);
- ga_clear(&lp->sl_fwords.wi_add);
- hash_clear(&lp->sl_kwords.wi_ht);
- ga_clear(&lp->sl_kwords.wi_add);
- while (lp->sl_block != NULL)
- {
- sp = lp->sl_block;
- lp->sl_block = sp->sb_next;
- vim_free(sp);
- }
- }
-
- /* Go through all buffers and handle 'spelllang'. */
- for (buf = firstbuf; buf != NULL; buf = buf->b_next)
- {
- ga_clear(&buf->b_langp);
- if (*buf->b_p_spl != NUL)
- did_set_spelllang(buf);
- }
-}
-# endif
-
-#endif /* FEAT_SYN_HL */
+#endif
diff --git a/src/tag.c b/src/tag.c
index fa8016269..f9797de9e 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -2333,15 +2333,17 @@ findtag_end:
}
static garray_T tag_fnames = GA_EMPTY;
-static void found_tagfile_cb __ARGS((char_u *fname));
+static void found_tagfile_cb __ARGS((char_u *fname, void *cookie));
/*
* Callback function for finding all "tags" and "tags-??" files in
* 'runtimepath' doc directories.
*/
+/*ARGSUSED*/
static void
-found_tagfile_cb(fname)
+found_tagfile_cb(fname, cookie)
char_u *fname;
+ void *cookie;
{
if (ga_grow(&tag_fnames, 1) == OK)
((char_u **)(tag_fnames.ga_data))[tag_fnames.ga_len++] =
@@ -2390,7 +2392,7 @@ get_tagfname(first, buf)
#else
"doc/tags"
#endif
- , TRUE, found_tagfile_cb);
+ , TRUE, found_tagfile_cb, NULL);
hf_idx = 0;
}
else if (*curbuf->b_p_tags != NUL)
diff --git a/src/version.h b/src/version.h
index d0bad957c..5a8c7c2c2 100644
--- a/src/version.h
+++ b/src/version.h
@@ -36,5 +36,5 @@
#define VIM_VERSION_NODOT "vim70aa"
#define VIM_VERSION_SHORT "7.0aa"
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
-#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Mar 28)"
-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Mar 28, compiled "
+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Apr 15)"
+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Apr 15, compiled "