0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.0216

This commit is contained in:
Bram Moolenaar 2006-03-06 23:29:24 +00:00
parent 768b8c4dbc
commit 362e1a30c6
95 changed files with 9798 additions and 1335 deletions

View File

@ -248,6 +248,7 @@ SRC_DOS = \
src/Make_mvc.mak \ src/Make_mvc.mak \
src/Make_w16.mak \ src/Make_w16.mak \
src/bigvim.bat \ src/bigvim.bat \
src/msvcsetup.bat \
src/dimm.idl \ src/dimm.idl \
src/dlldata.c \ src/dlldata.c \
src/dosinst.c \ src/dosinst.c \
@ -285,6 +286,7 @@ SRC_DOS = \
src/uninstal.c \ src/uninstal.c \
src/vim.def \ src/vim.def \
src/vim.rc \ src/vim.rc \
src/vimio.h \
src/gvim.exe.mnf \ src/gvim.exe.mnf \
src/vim16.def \ src/vim16.def \
src/vim16.rc \ src/vim16.rc \

View File

@ -128,21 +128,24 @@ MINOR = 0aa
# - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and # - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and
# "uninstald32.exe". # "uninstald32.exe".
# Win32 console version: # Win32 console version:
# - Set environment for Visual C++ 5.0: "vcvars32" # - Set environment for Visual C++ Toolkit 2003: "msvcsetup.bat"
# - "nmake -f Make_mvc.mak" # - "nmake -f Make_mvc.mak"
# - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output. # - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output.
# - Rename the executables to "vimw32.exe", "xxdw32.exe". # - Rename the executables to "vimw32.exe", "xxdw32.exe".
# - Rename ObjC/vim.pdb to vimw32.pdb.
# - When building the Win32s version later, delete vimrun.exe, install.exe and # - When building the Win32s version later, delete vimrun.exe, install.exe and
# uninstal.exe. Otherwise rename executables to installw32.exe and # uninstal.exe. Otherwise rename executables to installw32.exe and
# uninstalw32.exe. # uninstalw32.exe.
# Win32 GUI version: # Win32 GUI version:
# - "nmake -f Make_mvc.mak GUI=yes. # - "nmake -f Make_mvc.mak GUI=yes.
# - move "gvim.exe" to here (otherwise the OLE version will overwrite it). # - move "gvim.exe" to here (otherwise the OLE version will overwrite it).
# - Move ObjC/gvim.pdb to here.
# - Delete vimrun.exe, install.exe and uninstall.exe. # - Delete vimrun.exe, install.exe and uninstall.exe.
# - Copy "GvimExt/gvimext.dll" to here. # - Copy "GvimExt/gvimext.dll" to here.
# Win32 GUI version with OLE, PERL, TCL, PYTHON and dynamic IME: # Win32 GUI version with OLE, PERL, TCL, PYTHON and dynamic IME:
# - Run src/bigvim.bat ("nmake -f Make_mvc.mak GUI=yes OLE=yes IME=yes ...) # - Run src/bigvim.bat ("nmake -f Make_mvc.mak GUI=yes OLE=yes IME=yes ...)
# - Rename "gvim.exe" to "gvim_ole.exe". # - Rename "gvim.exe" to "gvim_ole.exe".
# - Rename ObjC/gvim.pdb to "gvim_ole.pdb".
# - Delete install.exe and uninstall.exe. # - Delete install.exe and uninstall.exe.
# - If building the Win32s version delete vimrun.exe. # - If building the Win32s version delete vimrun.exe.
# Win32s GUI version: # Win32s GUI version:
@ -430,6 +433,7 @@ dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM)
cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
cp gvimext.dll dist/vim/$(VIMRTDIR)/gvimext.dll cp gvimext.dll dist/vim/$(VIMRTDIR)/gvimext.dll
cd dist && zip -9 -rD -z gvim$(VERSION).zip vim <$(COMMENT_GVIM) cd dist && zip -9 -rD -z gvim$(VERSION).zip vim <$(COMMENT_GVIM)
cp gvim.pdb dist/gvim$(VERSION).pdb
# make Win32 console # make Win32 console
dosbin_w32: dist no_title.vim dist/$(COMMENT_W32) dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
@ -446,6 +450,7 @@ dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
cd dist && zip -9 -rD -z vim$(VERSION)w32.zip vim <$(COMMENT_W32) cd dist && zip -9 -rD -z vim$(VERSION)w32.zip vim <$(COMMENT_W32)
cp vimw32.pdb dist/vim$(VERSION)w32.pdb
# make 32bit DOS # make 32bit DOS
dosbin_d32: dist no_title.vim dist/$(COMMENT_D32) dosbin_d32: dist no_title.vim dist/$(COMMENT_D32)
@ -500,6 +505,7 @@ dosbin_ole: dist no_title.vim dist/$(COMMENT_OLE)
cp src/VisVim/VisVim.dll dist/vim/$(VIMRTDIR)/VisVim.dll cp src/VisVim/VisVim.dll dist/vim/$(VIMRTDIR)/VisVim.dll
cp src/VisVim/README_VisVim.txt dist/vim/$(VIMRTDIR) cp src/VisVim/README_VisVim.txt dist/vim/$(VIMRTDIR)
cd dist && zip -9 -rD -z gvim$(VERSION)ole.zip vim <$(COMMENT_OLE) cd dist && zip -9 -rD -z gvim$(VERSION)ole.zip vim <$(COMMENT_OLE)
cp gvim_ole.pdb dist/gvim$(VERSION)ole.pdb
# make Win32s gvim # make Win32s gvim
dosbin_s: dist no_title.vim dist/$(COMMENT_W32S) dosbin_s: dist no_title.vim dist/$(COMMENT_W32S)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
*change.txt* For Vim version 7.0aa. Last change: 2006 Feb 15 *change.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -765,6 +765,10 @@ break the line.
For convenience a <NL> character is also used as a line break. Prepend a For convenience a <NL> character is also used as a line break. Prepend a
backslash to get a real <NL> character (which will be a NUL in the file). backslash to get a real <NL> character (which will be a NUL in the file).
When the result is a |List| then the items are joined with separating line
breaks. Thus each item becomes a line, except that they can contain line
breaks themselves.
The whole matched text can be accessed with "submatch(0)". The text matched The whole matched text can be accessed with "submatch(0)". The text matched
with the first pair of () with "submatch(1)". Likewise for further with the first pair of () with "submatch(1)". Likewise for further
sub-matches in (). sub-matches in ().

View File

@ -1,4 +1,4 @@
*editing.txt* For Vim version 7.0aa. Last change: 2006 Feb 24 *editing.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -414,7 +414,9 @@ You can have the backticks expanded as a Vim expression, instead of an
external command, by using the syntax `={expr}` e.g.: > external command, by using the syntax `={expr}` e.g.: >
:e `=tempname()` :e `=tempname()`
The expression can contain just about anything, thus this can also be used to The expression can contain just about anything, thus this can also be used to
avoid the special meaning of '"', '|', '%' and '#'. avoid the special meaning of '"', '|', '%' and '#'. Names are to be separated
with line breaks. When the result is a |List| then each item is used as a
name. Line breaks also separate names.
*++opt* *[++opt]* *++opt* *[++opt]*
The [++opt] argument can be used to force the value of 'fileformat', The [++opt] argument can be used to force the value of 'fileformat',

View File

@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.0aa. Last change: 2006 Mar 04 *eval.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -3371,7 +3371,7 @@ match({expr}, {pat}[, {start}[, {count}]]) *match()*
If there is no match -1 is returned. If there is no match -1 is returned.
Example: > Example: >
:echo match("testing", "ing") " results in 4 :echo match("testing", "ing") " results in 4
:echo match([1, 'x'], '\a') " results in 2 :echo match([1, 'x'], '\a') " results in 1
< See |string-match| for how {pat} is used. < See |string-match| for how {pat} is used.
*strpbrk()* *strpbrk()*
Vim doesn't have a strpbrk() function. But you can do: > Vim doesn't have a strpbrk() function. But you can do: >
@ -3728,6 +3728,9 @@ readfile({fname} [, {binary} [, {max}]])
remote_expr({server}, {string} [, {idvar}]) remote_expr({server}, {string} [, {idvar}])
Send the {string} to {server}. The string is sent as an Send the {string} to {server}. The string is sent as an
expression and the result is returned after evaluation. expression and the result is returned after evaluation.
The result must be a String or a |List|. A |List| is turned
into a String by joining the items with a line break in
between (not at the end), like with join(expr, "\n").
If {idvar} is present, it is taken as the name of a If {idvar} is present, it is taken as the name of a
variable and a {serverid} for later use with variable and a {serverid} for later use with
remote_read() is stored there. remote_read() is stored there.
@ -3884,9 +3887,11 @@ search({pattern} [, {flags} [, {stopline}]]) *search()*
If there is no match a 0 is returned and the cursor doesn't If there is no match a 0 is returned and the cursor doesn't
move. No error message is given. move. No error message is given.
When a match has been found its line number is returned. With When a match has been found its line number is returned.
the 'p' flag the returned value is one more than the first *search()-sub-match*
sub-match in \(\). One if there is none. With the 'p' flag the returned value is one more than the
first sub-match in \(\). One if none of them matched but the
whole pattern did match.
To get the column number too use |searchpos()|. To get the column number too use |searchpos()|.
The cursor will be positioned at the match, unless the 'n' The cursor will be positioned at the match, unless the 'n'
@ -4039,9 +4044,15 @@ searchpos({pattern} [, {flags} [, {stopline}]]) *searchpos()*
is the line number and the second element is the byte index of is the line number and the second element is the byte index of
the column position of the match. If no match is found, the column position of the match. If no match is found,
returns [0, 0]. returns [0, 0].
> Example: >
:let [lnum, col] = searchpos('mypattern', 'n') :let [lnum, col] = searchpos('mypattern', 'n')
<
< When the 'p' flag is given then there is an extra item with
the sub-pattern match number |search()-sub-match|. Example: >
:let [lnum, col, submatch] = searchpos('\(\l\)\|\(\u\)', 'np')
< In this example "submatch" is 2 when a lowercase letter is
found |/\l|, 3 when an uppercase letter is found |/\u|.
server2client( {clientid}, {string}) *server2client()* server2client( {clientid}, {string}) *server2client()*
Send a reply string to {clientid}. The most recent {clientid} Send a reply string to {clientid}. The most recent {clientid}
that sent a string can be retrieved with expand("<client>"). that sent a string can be retrieved with expand("<client>").

View File

@ -1,4 +1,4 @@
*if_mzsch.txt* For Vim version 7.0aa. Last change: 2006 Jan 05 *if_mzsch.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Sergey Khorev VIM REFERENCE MANUAL by Sergey Khorev
@ -166,7 +166,10 @@ interface.
Common Common
------ ------
(command {command-string}) Perform the vim ":Ex" style command. (command {command-string}) Perform the vim ":Ex" style command.
(eval {expr-string}) Evaluate the vim command string. (eval {expr-string}) Evaluate the vim expression to a string.
A |List| is turned into a string by
joining the items and inserting line
breaks.
NOTE clashes with MzScheme eval NOTE clashes with MzScheme eval
(range-start) Start/End of the range passed with (range-start) Start/End of the range passed with
(range-end) the Scheme command. (range-end) the Scheme command.

View File

@ -1,4 +1,4 @@
*if_ole.txt* For Vim version 7.0aa. Last change: 2005 Mar 29 *if_ole.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Paul Moore VIM REFERENCE MANUAL by Paul Moore
@ -77,7 +77,8 @@ Eval(expr) Evaluate an expression.
This method takes a single parameter, which is an expression in Vim's normal This method takes a single parameter, which is an expression in Vim's normal
format (see |expression|). It returns a string, which is the result of format (see |expression|). It returns a string, which is the result of
evaluating the expression. evaluating the expression. A |List| is turned into a string by joining the
items and inserting line breaks.
Examples (Visual Basic syntax) > Examples (Visual Basic syntax) >
Line20 = Vim.Eval("getline(20)") Line20 = Vim.Eval("getline(20)")

View File

@ -1,4 +1,4 @@
*if_perl.txt* For Vim version 7.0aa. Last change: 2005 Oct 14 *if_perl.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Sven Verdoolaege VIM REFERENCE MANUAL by Sven Verdoolaege
@ -181,6 +181,8 @@ VIM::Eval({expr}) Evaluates {expr} and returns (success, val).
value of internal |variables| x, and '$x' is equivalent value of internal |variables| x, and '$x' is equivalent
to perl's $ENV{x}. All |functions| accessible from to perl's $ENV{x}. All |functions| accessible from
the command-line are valid for {expr}. the command-line are valid for {expr}.
A |List| is turned into a string by joining the items
and inserting line breaks.
*perl-SetHeight* *perl-SetHeight*
Window->SetHeight({height}) Window->SetHeight({height})

View File

@ -1,4 +1,4 @@
*if_ruby.txt* For Vim version 7.0aa. Last change: 2005 Oct 14 *if_ruby.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Shugo Maeda VIM REFERENCE MANUAL by Shugo Maeda
@ -117,6 +117,8 @@ VIM::command({cmd})
VIM::evaluate({expr}) VIM::evaluate({expr})
Evaluates {expr} using the vim internal expression evaluator (see 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.
A |List| is turned into a string by joining the items and inserting
line breaks.
============================================================================== ==============================================================================
3. VIM::Buffer objects *ruby-buffer* 3. VIM::Buffer objects *ruby-buffer*

View File

@ -1,4 +1,4 @@
*if_tcl.txt* For Vim version 7.0aa. Last change: 2005 Oct 14 *if_tcl.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Ingo Wilken VIM REFERENCE MANUAL by Ingo Wilken
@ -133,7 +133,8 @@ Commands:
Evaluates the expression {expr} using vim's internal expression Evaluates the expression {expr} using vim's internal expression
evaluator (see |expression|). Any expression that queries a buffer evaluator (see |expression|). Any expression that queries a buffer
or window property uses the current buffer/current window. Returns or window property uses the current buffer/current window. Returns
the result as a string. the result as a string. A |List| is turned into a string by joining
the items and inserting line breaks.
Examples: > Examples: >
set perl_available [::vim::expr has("perl")] set perl_available [::vim::expr has("perl")]
< See also |tcl-window-expr| and |tcl-buffer-expr|. < See also |tcl-window-expr| and |tcl-buffer-expr|.

View File

@ -1,4 +1,4 @@
*index.txt* For Vim version 7.0aa. Last change: 2006 Mar 04 *index.txt* For Vim version 7.0aa. Last change: 2006 Mar 05
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -1419,6 +1419,7 @@ The commands are sorted on the non-optional part of their name.
|:source| :so[urce] read Vim or Ex commands from a file |:source| :so[urce] read Vim or Ex commands from a file
|:spelldump| :spelld[ump] split window and fill with all correct words |:spelldump| :spelld[ump] split window and fill with all correct words
|:spellgood| :spe[llgood] add good word for spelling |:spellgood| :spe[llgood] add good word for spelling
|:spellinfo| :spelli[nfo] show info about loaded spell files
|:spellrepall| :spellr[epall] replace all bad words like last |z=| |:spellrepall| :spellr[epall] replace all bad words like last |z=|
|:spellundo| :spellu[ndo] remove good or bad word |:spellundo| :spellu[ndo] remove good or bad word
|:spellwrong| :spellw[rong] add spelling mistake |:spellwrong| :spellw[rong] add spelling mistake

View File

@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.0aa. Last change: 2006 Mar 04 *insert.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -130,6 +130,9 @@ CTRL-R {0-9a-z"%#*+:.-=} *i_CTRL-R*
the cursor up: the cursor up:
CTRL-R ="\<Up>" CTRL-R ="\<Up>"
Use CTRL-R CTRL-R to insert text literally. Use CTRL-R CTRL-R to insert text literally.
When the result is a |List| the items are used
as lines. They can have line breaks inside
too.
See |registers| about registers. {not in Vi} See |registers| about registers. {not in Vi}
CTRL-R CTRL-R {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-R* CTRL-R CTRL-R {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-R*
@ -1239,6 +1242,30 @@ both major engines implemented element, even if this is not in standards it
will be suggested. All other elements are not placed in suggestion list. will be suggested. All other elements are not placed in suggestion list.
PHP *ft-php-omni*
Completion of PHP code requires tags file for completion of data from external
files. You should use Exuberant ctags version 5.5.4 or newer. You can find it
here: http://ctags.sourceforge.net/
Script completes:
- after $ variables name
- function names with additonal info:
- in case of built-in functions list of possible arguments and after | type
data returned by function
- in case of user function arguments and name of file were function was
defined (if it is not current file)
Note: when doing completion first time Vim will load all necessary data into
memory. It may take several seconds. After next use of completion delay
shouldn't be noticeable.
Script detects if cursor is inside <?php ?> tags. If it is outside it will
automatically switch to HTML/CSS/JavaScript completion. Note: contrary to
original HTML files completion of tags (and only tags) isn't context aware.
SYNTAX *ft-syntax-omni* SYNTAX *ft-syntax-omni*
This uses the current syntax highlighting for completion. It can be used for This uses the current syntax highlighting for completion. It can be used for

View File

@ -1,4 +1,4 @@
*map.txt* For Vim version 7.0aa. Last change: 2006 Feb 24 *map.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -1089,6 +1089,7 @@ completion can be enabled:
-complete=event autocommand events -complete=event autocommand events
-complete=expression Vim expression -complete=expression Vim expression
-complete=file file and directory names -complete=file file and directory names
-complete=shellcmd Shell command
-complete=function function name -complete=function function name
-complete=help help subjects -complete=help help subjects
-complete=highlight highlight groups -complete=highlight highlight groups

View File

@ -1,4 +1,4 @@
*mbyte.txt* For Vim version 7.0aa. Last change: 2005 Oct 14 *mbyte.txt* For Vim version 7.0aa. Last change: 2006 Mar 05
VIM REFERENCE MANUAL by Bram Moolenaar et al. VIM REFERENCE MANUAL by Bram Moolenaar et al.
@ -1257,11 +1257,16 @@ Double-width characters are supported. This works best with 'guifontwide' or
normal width and a space to fill the gap. Note that the 'guifontset' option normal width and a space to fill the gap. Note that the 'guifontset' option
is no longer relevant in the GTK+ 2 GUI. is no longer relevant in the GTK+ 2 GUI.
Up to two combining characters can be used. The combining character is drawn *mbyte-combining* *mbyte-composing*
on top of the preceding character. When editing text a composing character is A composing or combining character is used to change the meaning of the
mostly considered part of the preceding character. For example "x" will character before it. The combining characters are drawn on top of the
delete a character and its following composing characters by default. If the preceding character.
'delcombine' option is on, then pressing 'x' will delete the combining Up to two combining characters can be used by default. This can be changed
with the 'maxcombine' option.
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 'delcombine' option is on, then pressing 'x' will delete the combining
characters, one at a time, then the base character. But when inserting, you characters, one at a time, then the base character. But when inserting, you
type the first character and the following composing characters separately, type the first character and the following composing characters separately,
after which they will be joined. The "r" command will not allow you to type a after which they will be joined. The "r" command will not allow you to type a

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 7.0aa. Last change: 2006 Mar 04 *options.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -1050,7 +1050,10 @@ A jump table for the options with a short description can be found at |Q_op|.
To check whether line breaks in the balloon text work use this check: > To check whether line breaks in the balloon text work use this check: >
if has("balloon_multiline") if has("balloon_multiline")
< < When they are supported "\n" characters will start a new line. If the
expression evaluates to a |List| this is equal to using each List item
as a string and putting "\n" in between them.
*'binary'* *'bin'* *'nobinary'* *'nobin'* *'binary'* *'bin'* *'nobinary'* *'nobin'*
'binary' 'bin' boolean (default off) 'binary' 'bin' boolean (default off)
local to buffer local to buffer
@ -3262,6 +3265,8 @@ A jump table for the options with a short description can be found at |Q_op|.
'e' Add tab pages when indicated with 'showtabline'. 'e' Add tab pages when indicated with 'showtabline'.
'guitablabel' can be used to change the text in the labels. 'guitablabel' can be used to change the text in the labels.
When 'e' is missing a non-GUI tab pages line may be used. When 'e' is missing a non-GUI tab pages line may be used.
The GUI tabs are only supported on some systens, currently
only for GTK.
'f' Foreground: Don't use fork() to detach the GUI from the shell 'f' Foreground: Don't use fork() to detach the GUI from the shell
where it was started. Use this for programs that wait for the where it was started. Use this for programs that wait for the
@ -4289,6 +4294,20 @@ A jump table for the options with a short description can be found at |Q_op|.
set. Note that this is not in milliseconds, like other options that set. Note that this is not in milliseconds, like other options that
set a time. This is to be compatible with Nvi. set a time. This is to be compatible with Nvi.
*'maxcombine'* *'mco'*
'maxcombine' 'mco' number (default 2)
global
{not in Vi}
{only available when compiled with the |+multi_byte|
feature}
The maximum number of combining characters supported for displaying.
Only used when 'encoding' is "utf-8".
The default is OK for most languages. Hebrew may require 4.
Maximum value is 6.
Even when this option is set to 2 you can still edit text with more
combining characters, you just can't see them. Use |g8| or |ga|.
See |mbyte-combining|.
*'maxfuncdepth'* *'mfd'* *'maxfuncdepth'* *'mfd'*
'maxfuncdepth' 'mfd' number (default 100) 'maxfuncdepth' 'mfd' number (default 100)
global global
@ -7176,9 +7195,9 @@ A jump table for the options with a short description can be found at |Q_op|.
"dh". If you use this, you may also want to use the mapping "dh". If you use this, you may also want to use the mapping
":map <BS> X" to make backspace delete the character in front of the ":map <BS> X" to make backspace delete the character in front of the
cursor. cursor.
When 'l' is included, you get a side effect: "yl" on an empty line When 'l' is included and it is used after an operator at the end of a
will include the <EOL>, so that "p" will insert a new line. That's line then it will not move to the next line. This makes "dl", "cl",
why including 'h' and 'l' are not recommended. "yl" etc. work normally.
NOTE: This option is set to the Vi default value when 'compatible' is NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset. set and to the Vim default value when 'compatible' is reset.

View File

@ -1,4 +1,4 @@
*pattern.txt* For Vim version 7.0aa. Last change: 2006 Mar 01 *pattern.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -16,8 +16,9 @@ explanations are in chapter 27 |usr_27.txt|.
5. Multi items |pattern-multi-items| 5. Multi items |pattern-multi-items|
6. Ordinary atoms |pattern-atoms| 6. Ordinary atoms |pattern-atoms|
7. Ignoring case in a pattern |/ignorecase| 7. Ignoring case in a pattern |/ignorecase|
8. Compare with Perl patterns |perl-patterns| 8. Composing characters |patterns-composing|
9. Highlighting matches |match-highlight| 9. Compare with Perl patterns |perl-patterns|
10. Highlighting matches |match-highlight|
============================================================================== ==============================================================================
1. Search commands *search-commands* *E486* 1. Search commands *search-commands* *E486*
@ -1104,12 +1105,6 @@ Examples:
\cfoo - - foo Foo FOO \cfoo - - foo Foo FOO
foo\C - - foo foo\C - - foo
*/\Z*
When "\Z" appears anywhere in the pattern, composing characters are ignored.
Thus only the base characters need to match, the composing characters may be
different and the number of composing characters may differ. Only relevant
when 'encoding' is "utf-8".
Technical detail: *NL-used-for-Nul* Technical detail: *NL-used-for-Nul*
<Nul> characters in the file are stored as <NL> in memory. In the display <Nul> characters in the file are stored as <NL> in memory. In the display
they are shown as "^@". The translation is done when reading and writing they are shown as "^@". The translation is done when reading and writing
@ -1134,7 +1129,27 @@ expect. But invalid bytes may cause trouble, a pattern with an invalid byte
will probably never match. will probably never match.
============================================================================== ==============================================================================
8. Compare with Perl patterns *perl-patterns* 8. Composing characters *patterns-composing*
*/\Z*
When "\Z" appears anywhere in the pattern, composing characters are ignored.
Thus only the base characters need to match, the composing characters may be
different and the number of composing characters may differ. Only relevant
when 'encoding' is "utf-8".
When a composing character appears at the start of the pattern of after an
item that doesn't include the composing character, a match is found at any
character that includes this composing character.
When using a dot and a composing character, this works the same as the
composing character by itself, except that it doesn't matter what comes before
this.
The order of composing characters matters, even though changing the order
doen't change what a character looks like. This may change in the future.
==============================================================================
9. Compare with Perl patterns *perl-patterns*
Vim's regexes are most similar to Perl's, in terms of what you can do. The Vim's regexes are most similar to Perl's, in terms of what you can do. The
difference between them is mostly just notation; here's a summary of where difference between them is mostly just notation; here's a summary of where
@ -1144,7 +1159,7 @@ Capability in Vimspeak in Perlspeak ~
---------------------------------------------------------------- ----------------------------------------------------------------
force case insensitivity \c (?i) force case insensitivity \c (?i)
force case sensitivity \C (?-i) force case sensitivity \C (?-i)
backref-less grouping \%(atom) (?:atom) backref-less grouping \%(atom\) (?:atom)
conservative quantifiers \{-n,m} *?, +?, ??, {}? conservative quantifiers \{-n,m} *?, +?, ??, {}?
0-width match atom\@= (?=atom) 0-width match atom\@= (?=atom)
0-width non-match atom\@! (?!atom) 0-width non-match atom\@! (?!atom)
@ -1177,10 +1192,10 @@ Finally, these constructs are unique to Perl:
- \& (which is to \| what "and" is to "or"; it forces several branches - \& (which is to \| what "and" is to "or"; it forces several branches
to match at one spot) to match at one spot)
- matching lines/columns by number: \%5l \%5c \%5v - matching lines/columns by number: \%5l \%5c \%5v
- limiting the "return value" of a regex: \zs \ze - setting the start and end of the match: \zs \ze
============================================================================== ==============================================================================
9. Highlighting matches *match-highlight* 10. Highlighting matches *match-highlight*
*:mat* *:match* *:mat* *:match*
:mat[ch] {group} /{pattern}/ :mat[ch] {group} /{pattern}/

View File

@ -1,4 +1,4 @@
*quickref.txt* For Vim version 7.0aa. Last change: 2006 Feb 13 *quickref.txt* For Vim version 7.0aa. Last change: 2006 Mar 05
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -588,337 +588,341 @@ In Insert or Command-line mode:
the help. the help.
Short explanation of each option: *option-list* Short explanation of each option: *option-list*
|'aleph'| |'al'| ASCII code of the letter Aleph (Hebrew) 'aleph' 'al' ASCII code of the letter Aleph (Hebrew)
|'allowrevins'| |'ari'| allow CTRL-_ in Insert and Command-line mode 'allowrevins' 'ari' allow CTRL-_ in Insert and Command-line mode
|'altkeymap'| |'akm'| for default second language (Farsi/Hebrew) 'altkeymap' 'akm' for default second language (Farsi/Hebrew)
|'ambiwidth'| |'ambw'| what to do with Unicode chars of ambiguous width 'ambiwidth' 'ambw' what to do with Unicode chars of ambiguous width
|'antialias'| |'anti'| Mac OS X: use smooth, antialiased fonts 'antialias' 'anti' Mac OS X: use smooth, antialiased fonts
|'autochdir'| |'acd'| change directory to the file in the current window 'autochdir' 'acd' change directory to the file in the current window
|'arabic'| |'arab'| for Arabic as a default second language 'arabic' 'arab' for Arabic as a default second language
|'arabicshape'| |'arshape'| do shaping for Arabic characters 'arabicshape' 'arshape' do shaping for Arabic characters
|'autoindent'| |'ai'| take indent for new line from previous line 'autoindent' 'ai' take indent for new line from previous line
|'autoread'| |'ar'| autom. read file when changed outside of Vim 'autoread' 'ar' autom. read file when changed outside of Vim
|'autowrite'| |'aw'| automatically write file if changed 'autowrite' 'aw' automatically write file if changed
|'autowriteall'| |'awa'| as 'autowrite', but works with more commands 'autowriteall' 'awa' as 'autowrite', but works with more commands
|'background'| |'bg'| "dark" or "light", used for highlight colors 'background' 'bg' "dark" or "light", used for highlight colors
|'backspace'| |'bs'| how backspace works at start of line 'backspace' 'bs' how backspace works at start of line
|'backup'| |'bk'| keep backup file after overwriting a file 'backup' 'bk' keep backup file after overwriting a file
|'backupcopy'| |'bkc'| make backup as a copy, don't rename the file 'backupcopy' 'bkc' make backup as a copy, don't rename the file
|'backupdir'| |'bdir'| list of directories for the backup file 'backupdir' 'bdir' list of directories for the backup file
|'backupext'| |'bex'| extension used for the backup file 'backupext' 'bex' extension used for the backup file
|'backupskip'| |'bsk'| no backup for files that match these patterns 'backupskip' 'bsk' no backup for files that match these patterns
|'balloondelay'| |'bdlay'| delay in mS before a balloon may pop up 'balloondelay' 'bdlay' delay in mS before a balloon may pop up
|'ballooneval'| |'beval'| switch on balloon evaluation 'ballooneval' 'beval' switch on balloon evaluation
|'balloonexpr'| |'bexpr'| expression to show in balloon 'balloonexpr' 'bexpr' expression to show in balloon
|'binary'| |'bin'| read/write/edit file in binary mode 'binary' 'bin' read/write/edit file in binary mode
|'bioskey'| |'biosk'| MS-DOS: use bios calls for input characters 'bioskey' 'biosk' MS-DOS: use bios calls for input characters
|'bomb'| prepend a Byte Order Mark to the file 'bomb' prepend a Byte Order Mark to the file
|'breakat'| |'brk'| characters that may cause a line break 'breakat' 'brk' characters that may cause a line break
|'browsedir'| |'bsdir'| which directory to start browsing in 'browsedir' 'bsdir' which directory to start browsing in
|'bufhidden'| |'bh'| what to do when buffer is no longer in window 'bufhidden' 'bh' what to do when buffer is no longer in window
|'buflisted'| |'bl'| whether the buffer shows up in the buffer list 'buflisted' 'bl' whether the buffer shows up in the buffer list
|'buftype'| |'bt'| special type of buffer 'buftype' 'bt' special type of buffer
|'casemap'| |'cmp'| specifies how case of letters is changed 'casemap' 'cmp' specifies how case of letters is changed
|'cdpath'| |'cd'| list of directories searched with ":cd" 'cdpath' 'cd' list of directories searched with ":cd"
|'cedit'| key used to open the command-line window 'cedit' key used to open the command-line window
|'charconvert'| |'ccv'| expression for character encoding conversion 'charconvert' 'ccv' expression for character encoding conversion
|'cindent'| |'cin'| do C program indenting 'cindent' 'cin' do C program indenting
|'cinkeys'| |'cink'| keys that trigger indent when 'cindent' is set 'cinkeys' 'cink' keys that trigger indent when 'cindent' is set
|'cinoptions'| |'cino'| how to do indenting when 'cindent' is set 'cinoptions' 'cino' how to do indenting when 'cindent' is set
|'cinwords'| |'cinw'| words where 'si' and 'cin' add an indent 'cinwords' 'cinw' words where 'si' and 'cin' add an indent
|'clipboard'| |'cb'| use the clipboard as the unnamed register 'clipboard' 'cb' use the clipboard as the unnamed register
|'cmdheight'| |'ch'| number of lines to use for the command-line 'cmdheight' 'ch' number of lines to use for the command-line
|'cmdwinheight'| |'cwh'| height of the command-line window 'cmdwinheight' 'cwh' height of the command-line window
|'columns'| |'co'| number of columns in the display 'columns' 'co' number of columns in the display
|'comments'| |'com'| patterns that can start a comment line 'comments' 'com' patterns that can start a comment line
|'commentstring'| |'cms'| template for comments; used for fold marker 'commentstring' 'cms' template for comments; used for fold marker
|'compatible'| |'cp'| behave Vi-compatible as much as possible 'compatible' 'cp' behave Vi-compatible as much as possible
|'complete'| |'cpt'| specify how Insert mode completion works 'complete' 'cpt' specify how Insert mode completion works
|'completefunc'| |'cfu'| function to be used for Insert mode completion 'completefunc' 'cfu' function to be used for Insert mode completion
|'completeopt'| |'cot'| options for Insert mode completion 'completeopt' 'cot' options for Insert mode completion
|'confirm'| |'cf'| ask what to do about unsaved/read-only files 'confirm' 'cf' ask what to do about unsaved/read-only files
|'conskey'| |'consk'| get keys directly from console (MS-DOS only) 'conskey' 'consk' get keys directly from console (MS-DOS only)
|'copyindent'| |'ci'| make 'autoindent' use existing indent structure 'copyindent' 'ci' make 'autoindent' use existing indent structure
|'cpoptions'| |'cpo'| flags for Vi-compatible behavior 'cpoptions' 'cpo' flags for Vi-compatible behavior
|'cscopepathcomp'| |'cspc'| how many components of the path to show 'cscopepathcomp' 'cspc' how many components of the path to show
|'cscopeprg'| |'csprg'| command to execute cscope 'cscopeprg' 'csprg' command to execute cscope
|'cscopequickfix'| |'csqf'| use quickfix window for cscope results 'cscopequickfix' 'csqf' use quickfix window for cscope results
|'cscopetag'| |'cst'| use cscope for tag commands 'cscopetag' 'cst' use cscope for tag commands
|'cscopetagorder'| |'csto'| determines ":cstag" search order 'cscopetagorder' 'csto' determines ":cstag" search order
|'cscopeverbose'| |'csverb'| give messages when adding a cscope database 'cscopeverbose' 'csverb' give messages when adding a cscope database
|'debug'| set to "msg" to see all error messages 'debug' set to "msg" to see all error messages
|'define'| |'def'| pattern to be used to find a macro definition 'define' 'def' pattern to be used to find a macro definition
|'delcombine'| |'deco'| delete combining characters on their own 'delcombine' 'deco' delete combining characters on their own
|'dictionary'| |'dict'| list of file names used for keyword completion 'dictionary' 'dict' list of file names used for keyword completion
|'diff'| use diff mode for the current window 'diff' use diff mode for the current window
|'diffexpr'| |'dex'| expression used to obtain a diff file 'diffexpr' 'dex' expression used to obtain a diff file
|'diffopt'| |'dip'| options for using diff mode 'diffopt' 'dip' options for using diff mode
|'digraph'| |'dg'| enable the entering of digraphs in Insert mode 'digraph' 'dg' enable the entering of digraphs in Insert mode
|'directory'| |'dir'| list of directory names for the swap file 'directory' 'dir' list of directory names for the swap file
|'display'| |'dy'| list of flags for how to display text 'display' 'dy' list of flags for how to display text
|'eadirection'| |'ead'| in which direction 'equalalways' works 'eadirection' 'ead' in which direction 'equalalways' works
|'edcompatible'| |'ed'| toggle flags of ":substitute" command 'edcompatible' 'ed' toggle flags of ":substitute" command
|'encoding'| |'enc'| encoding used internally 'encoding' 'enc' encoding used internally
|'endofline'| |'eol'| write <EOL> for last line in file 'endofline' 'eol' write <EOL> for last line in file
|'equalalways'| |'ea'| windows are automatically made the same size 'equalalways' 'ea' windows are automatically made the same size
|'equalprg'| |'ep'| external program to use for "=" command 'equalprg' 'ep' external program to use for "=" command
|'errorbells'| |'eb'| ring the bell for error messages 'errorbells' 'eb' ring the bell for error messages
|'errorfile'| |'ef'| name of the errorfile for the QuickFix mode 'errorfile' 'ef' name of the errorfile for the QuickFix mode
|'errorformat'| |'efm'| description of the lines in the error file 'errorformat' 'efm' description of the lines in the error file
|'esckeys'| |'ek'| recognize function keys in Insert mode 'esckeys' 'ek' recognize function keys in Insert mode
|'eventignore'| |'ei'| autocommand events that are ignored 'eventignore' 'ei' autocommand events that are ignored
|'expandtab'| |'et'| use spaces when <Tab> is inserted 'expandtab' 'et' use spaces when <Tab> is inserted
|'exrc'| |'ex'| read .vimrc and .exrc in the current directory 'exrc' 'ex' read .vimrc and .exrc in the current directory
|'fileencoding'| |'fenc'| file encoding for multi-byte text 'fileencoding' 'fenc' file encoding for multi-byte text
|'fileencodings'| |'fencs'| automatically detected character encodings 'fileencodings' 'fencs' automatically detected character encodings
|'fileformat'| |'ff'| file format used for file I/O 'fileformat' 'ff' file format used for file I/O
|'fileformats'| |'ffs'| automatically detected values for 'fileformat' 'fileformats' 'ffs' automatically detected values for 'fileformat'
|'filetype'| |'ft'| type of file, used for autocommands 'filetype' 'ft' type of file, used for autocommands
|'fillchars'| |'fcs'| characters to use for displaying special items 'fillchars' 'fcs' characters to use for displaying special items
|'fkmap'| |'fk'| Farsi keyboard mapping 'fkmap' 'fk' Farsi keyboard mapping
|'foldclose'| |'fcl'| close a fold when the cursor leaves it 'foldclose' 'fcl' close a fold when the cursor leaves it
|'foldcolumn'| |'fdc'| width of the column used to indicate folds 'foldcolumn' 'fdc' width of the column used to indicate folds
|'foldenable'| |'fen'| set to display all folds open 'foldenable' 'fen' set to display all folds open
|'foldexpr'| |'fde'| expression used when 'foldmethod' is "expr" 'foldexpr' 'fde' expression used when 'foldmethod' is "expr"
|'foldignore'| |'fdi'| ignore lines when 'foldmethod' is "indent" 'foldignore' 'fdi' ignore lines when 'foldmethod' is "indent"
|'foldlevel'| |'fdl'| close folds with a level higher than this 'foldlevel' 'fdl' close folds with a level higher than this
|'foldlevelstart'| |'fdls'| 'foldlevel' when starting to edit a file 'foldlevelstart' 'fdls' 'foldlevel' when starting to edit a file
|'foldmarker'| |'fmr'| markers used when 'foldmethod' is "marker" 'foldmarker' 'fmr' markers used when 'foldmethod' is "marker"
|'foldmethod'| |'fdm'| folding type 'foldmethod' 'fdm' folding type
|'foldminlines'| |'fml'| minimum number of lines for a fold to be closed 'foldminlines' 'fml' minimum number of lines for a fold to be closed
|'foldnestmax'| |'fdn'| maximum fold depth 'foldnestmax' 'fdn' maximum fold depth
|'foldopen'| |'fdo'| for which commands a fold will be opened 'foldopen' 'fdo' for which commands a fold will be opened
|'foldtext'| |'fdt'| expression used to display for a closed fold 'foldtext' 'fdt' expression used to display for a closed fold
|'formatlistpat'| |'flp'| pattern used to recognize a list header 'formatlistpat' 'flp' pattern used to recognize a list header
|'formatoptions'| |'fo'| how automatic formatting is to be done 'formatoptions' 'fo' how automatic formatting is to be done
|'formatprg'| |'fp'| name of external program used with "gq" command 'formatprg' 'fp' name of external program used with "gq" command
|'formatexpr'| |'fex'| expression used with "gq" command 'formatexpr' 'fex' expression used with "gq" command
|'fsync'| |'fs'| whether to invoke fsync() after file write 'fsync' 'fs' whether to invoke fsync() after file write
|'gdefault'| |'gd'| the ":substitute" flag 'g' is default on 'gdefault' 'gd' the ":substitute" flag 'g' is default on
|'grepformat'| |'gfm'| format of 'grepprg' output 'grepformat' 'gfm' format of 'grepprg' output
|'grepprg'| |'gp'| program to use for ":grep" 'grepprg' 'gp' program to use for ":grep"
|'guicursor'| |'gcr'| GUI: settings for cursor shape and blinking 'guicursor' 'gcr' GUI: settings for cursor shape and blinking
|'guifont'| |'gfn'| GUI: Name(s) of font(s) to be used 'guifont' 'gfn' GUI: Name(s) of font(s) to be used
|'guifontset'| |'gfs'| GUI: Names of multi-byte fonts to be used 'guifontset' 'gfs' GUI: Names of multi-byte fonts to be used
|'guifontwide'| |'gfw'| list of font names for double-wide characters 'guifontwide' 'gfw' list of font names for double-wide characters
|'guiheadroom'| |'ghr'| GUI: pixels room for window decorations 'guiheadroom' 'ghr' GUI: pixels room for window decorations
|'guioptions'| |'go'| GUI: Which components and options are used 'guioptions' 'go' GUI: Which components and options are used
|'guipty'| GUI: try to use a pseudo-tty for ":!" commands 'guipty' GUI: try to use a pseudo-tty for ":!" commands
|'helpfile'| |'hf'| full path name of the main help file 'guitablabel' 'gtl' GUI: custom label for a tab page
|'helpheight'| |'hh'| minimum height of a new help window 'helpfile' 'hf' full path name of the main help file
|'helplang'| |'hlg'| preferred help languages 'helpheight' 'hh' minimum height of a new help window
|'hidden'| |'hid'| don't unload buffer when it is |abandon|ed 'helplang' 'hlg' preferred help languages
|'highlight'| |'hl'| sets highlighting mode for various occasions 'hidden' 'hid' don't unload buffer when it is |abandon|ed
|'hlsearch'| |'hls'| highlight matches with last search pattern 'highlight' 'hl' sets highlighting mode for various occasions
|'history'| |'hi'| number of command-lines that are remembered 'hlsearch' 'hls' highlight matches with last search pattern
|'hkmap'| |'hk'| Hebrew keyboard mapping 'history' 'hi' number of command-lines that are remembered
|'hkmapp'| |'hkp'| phonetic Hebrew keyboard mapping 'hkmap' 'hk' Hebrew keyboard mapping
|'icon'| let Vim set the text of the window icon 'hkmapp' 'hkp' phonetic Hebrew keyboard mapping
|'iconstring'| string to use for the Vim icon text 'icon' let Vim set the text of the window icon
|'ignorecase'| |'ic'| ignore case in search patterns 'iconstring' string to use for the Vim icon text
|'imactivatekey'| |'imak'| key that activates the X input method 'ignorecase' 'ic' ignore case in search patterns
|'imcmdline'| |'imc'| use IM when starting to edit a command line 'imactivatekey' 'imak' key that activates the X input method
|'imdisable'| |'imd'| do not use the IM in any mode 'imcmdline' 'imc' use IM when starting to edit a command line
|'iminsert'| |'imi'| use :lmap or IM in Insert mode 'imdisable' 'imd' do not use the IM in any mode
|'imsearch'| |'ims'| use :lmap or IM when typing a search pattern 'iminsert' 'imi' use :lmap or IM in Insert mode
|'include'| |'inc'| pattern to be used to find an include file 'imsearch' 'ims' use :lmap or IM when typing a search pattern
|'includeexpr'| |'inex'| expression used to process an include line 'include' 'inc' pattern to be used to find an include file
|'incsearch'| |'is'| highlight match while typing search pattern 'includeexpr' 'inex' expression used to process an include line
|'indentexpr'| |'inde'| expression used to obtain the indent of a line 'incsearch' 'is' highlight match while typing search pattern
|'indentkeys'| |'indk'| keys that trigger indenting with 'indentexpr' 'indentexpr' 'inde' expression used to obtain the indent of a line
|'infercase'| |'inf'| adjust case of match for keyword completion 'indentkeys' 'indk' keys that trigger indenting with 'indentexpr'
|'insertmode'| |'im'| start the edit of a file in Insert mode 'infercase' 'inf' adjust case of match for keyword completion
|'isfname'| |'isf'| characters included in file names and pathnames 'insertmode' 'im' start the edit of a file in Insert mode
|'isident'| |'isi'| characters included in identifiers 'isfname' 'isf' characters included in file names and pathnames
|'iskeyword'| |'isk'| characters included in keywords 'isident' 'isi' characters included in identifiers
|'isprint'| |'isp'| printable characters 'iskeyword' 'isk' characters included in keywords
|'joinspaces'| |'js'| two spaces after a period with a join command 'isprint' 'isp' printable characters
|'key'| encryption key 'joinspaces' 'js' two spaces after a period with a join command
|'keymap'| |'kmp'| name of a keyboard mapping 'key' encryption key
|'keymodel'| |'km'| enable starting/stopping selection with keys 'keymap' 'kmp' name of a keyboard mapping
|'keywordprg'| |'kp'| program to use for the "K" command 'keymodel' 'km' enable starting/stopping selection with keys
|'langmap'| |'lmap'| alphabetic characters for other language mode 'keywordprg' 'kp' program to use for the "K" command
|'langmenu'| |'lm'| language to be used for the menus 'langmap' 'lmap' alphabetic characters for other language mode
|'laststatus'| |'ls'| tells when last window has status lines 'langmenu' 'lm' language to be used for the menus
|'lazyredraw'| |'lz'| don't redraw while executing macros 'laststatus' 'ls' tells when last window has status lines
|'linebreak'| |'lbr'| wrap long lines at a blank 'lazyredraw' 'lz' don't redraw while executing macros
|'lines'| number of lines in the display 'linebreak' 'lbr' wrap long lines at a blank
|'linespace'| |'lsp'| number of pixel lines to use between characters 'lines' number of lines in the display
|'lisp'| automatic indenting for Lisp 'linespace' 'lsp' number of pixel lines to use between characters
|'lispwords'| |'lw'| words that change how lisp indenting works 'lisp' automatic indenting for Lisp
|'list'| show <Tab> and <EOL> 'lispwords' 'lw' words that change how lisp indenting works
|'listchars'| |'lcs'| characters for displaying in list mode 'list' show <Tab> and <EOL>
|'loadplugins'| |'lpl'| load plugin scripts when starting up 'listchars' 'lcs' characters for displaying in list mode
|'magic'| changes special characters in search patterns 'loadplugins' 'lpl' load plugin scripts when starting up
|'makeef'| |'mef'| name of the errorfile for ":make" 'magic' changes special characters in search patterns
|'makeprg'| |'mp'| program to use for the ":make" command 'makeef' 'mef' name of the errorfile for ":make"
|'matchpairs'| |'mps'| pairs of characters that "%" can match 'makeprg' 'mp' program to use for the ":make" command
|'matchtime'| |'mat'| tenths of a second to show matching paren 'matchpairs' 'mps' pairs of characters that "%" can match
|'maxfuncdepth'| |'mfd'| maximum recursive depth for user functions 'matchtime' 'mat' tenths of a second to show matching paren
|'maxmapdepth'| |'mmd'| maximum recursive depth for mapping 'maxfuncdepth' 'mfd' maximum recursive depth for user functions
|'maxmem'| |'mm'| maximum memory (in Kbyte) used for one buffer 'maxmapdepth' 'mmd' maximum recursive depth for mapping
|'maxmempattern'| |'mmp'| maximum memory (in Kbyte) used for pattern search 'maxmem' 'mm' maximum memory (in Kbyte) used for one buffer
|'maxmemtot'| |'mmt'| maximum memory (in Kbyte) used for all buffers 'maxmempattern' 'mmp' maximum memory (in Kbyte) used for pattern search
|'menuitems'| |'mis'| maximum number of items in a menu 'maxmemtot' 'mmt' maximum memory (in Kbyte) used for all buffers
|'mkspellmem'| |'msm'| memory used before |:mkspell| compresses the tree 'menuitems' 'mis' maximum number of items in a menu
|'modeline'| |'ml'| recognize modelines at start or end of file 'mkspellmem' 'msm' memory used before |:mkspell| compresses the tree
|'modelines'| |'mls'| number of lines checked for modelines 'modeline' 'ml' recognize modelines at start or end of file
|'modifiable'| |'ma'| changes to the text are not possible 'modelines' 'mls' number of lines checked for modelines
|'modified'| |'mod'| buffer has been modified 'modifiable' 'ma' changes to the text are not possible
|'more'| pause listings when the whole screen is filled 'modified' 'mod' buffer has been modified
|'mouse'| enable the use of mouse clicks 'more' pause listings when the whole screen is filled
|'mousefocus'| |'mousef'| keyboard focus follows the mouse 'mouse' enable the use of mouse clicks
|'mousehide'| |'mh'| hide mouse pointer while typing 'mousefocus' 'mousef' keyboard focus follows the mouse
|'mousemodel'| |'mousem'| changes meaning of mouse buttons 'mousehide' 'mh' hide mouse pointer while typing
|'mouseshape'| |'mouses'| shape of the mouse pointer in different modes 'mousemodel' 'mousem' changes meaning of mouse buttons
|'mousetime'| |'mouset'| max time between mouse double-click 'mouseshape' 'mouses' shape of the mouse pointer in different modes
|'mzquantum'| |'mzq'| the interval between polls for MzScheme threads 'mousetime' 'mouset' max time between mouse double-click
|'nrformats'| |'nf'| number formats recognized for CTRL-A command 'mzquantum' 'mzq' the interval between polls for MzScheme threads
|'number'| |'nu'| print the line number in front of each line 'nrformats' 'nf' number formats recognized for CTRL-A command
|'numberwidth'| |'nuw'| number of columns used for the line number 'number' 'nu' print the line number in front of each line
|'omnifunc'| |'ofu'| function for filetype-specific completion 'numberwidth' 'nuw' number of columns used for the line number
|'operatorfunc'| |'opfunc'| funtion to be called for |g@| operator 'omnifunc' 'ofu' function for filetype-specific completion
|'osfiletype'| |'oft'| operating system-specific filetype information 'operatorfunc' 'opfunc' funtion to be called for |g@| operator
|'paragraphs'| |'para'| nroff macros that separate paragraphs 'osfiletype' 'oft' operating system-specific filetype information
|'paste'| allow pasting text 'paragraphs' 'para' nroff macros that separate paragraphs
|'pastetoggle'| |'pt'| key code that causes 'paste' to toggle 'paste' allow pasting text
|'patchexpr'| |'pex'| expression used to patch a file 'pastetoggle' 'pt' key code that causes 'paste' to toggle
|'patchmode'| |'pm'| keep the oldest version of a file 'patchexpr' 'pex' expression used to patch a file
|'path'| |'pa'| list of directories searched with "gf" et.al. 'patchmode' 'pm' keep the oldest version of a file
|'preserveindent'| |'pi'| preserve the indent structure when reindenting 'path' 'pa' list of directories searched with "gf" et.al.
|'previewheight'| |'pvh'| height of the preview window 'preserveindent' 'pi' preserve the indent structure when reindenting
|'previewwindow'| |'pvw'| identifies the preview window 'previewheight' 'pvh' height of the preview window
|'printdevice'| |'pdev'| name of the printer to be used for :hardcopy 'previewwindow' 'pvw' identifies the preview window
|'printencoding'| |'penc'| encoding to be used for printing 'printdevice' 'pdev' name of the printer to be used for :hardcopy
|'printexpr'| |'pexpr'| expression used to print PostScript for :hardcopy 'printencoding' 'penc' encoding to be used for printing
|'printfont'| |'pfn'| name of the font to be used for :hardcopy 'printexpr' 'pexpr' expression used to print PostScript for :hardcopy
|'printheader'| |'pheader'| format of the header used for :hardcopy 'printfont' 'pfn' name of the font to be used for :hardcopy
|'printmbcharset'| |'pmbcs'| CJK character set to be used for :hardcopy 'printheader' 'pheader' format of the header used for :hardcopy
|'printmbfont'| |'pmbfn'| font names to be used for CJK output of :hardcopy 'printmbcharset' 'pmbcs' CJK character set to be used for :hardcopy
|'printoptions'| |'popt'| controls the format of :hardcopy output 'printmbfont' 'pmbfn' font names to be used for CJK output of :hardcopy
|'quoteescape'| |'qe'| escape characters used in a string 'printoptions' 'popt' controls the format of :hardcopy output
|'readonly'| |'ro'| disallow writing the buffer 'quoteescape' 'qe' escape characters used in a string
|'remap'| allow mappings to work recursively 'readonly' 'ro' disallow writing the buffer
|'report'| threshold for reporting nr. of lines changed 'remap' allow mappings to work recursively
|'restorescreen'| |'rs'| Win32: restore screen when exiting 'report' threshold for reporting nr. of lines changed
|'revins'| |'ri'| inserting characters will work backwards 'restorescreen' 'rs' Win32: restore screen when exiting
|'rightleft'| |'rl'| window is right-to-left oriented 'revins' 'ri' inserting characters will work backwards
|'rightleftcmd'| |'rlc'| commands for which editing works right-to-left 'rightleft' 'rl' window is right-to-left oriented
|'ruler'| |'ru'| show cursor line and column in the status line 'rightleftcmd' 'rlc' commands for which editing works right-to-left
|'rulerformat'| |'ruf'| custom format for the ruler 'ruler' 'ru' show cursor line and column in the status line
|'runtimepath'| |'rtp'| list of directories used for runtime files 'rulerformat' 'ruf' custom format for the ruler
|'scroll'| |'scr'| lines to scroll with CTRL-U and CTRL-D 'runtimepath' 'rtp' list of directories used for runtime files
|'scrollbind'| |'scb'| scroll in window as other windows scroll 'scroll' 'scr' lines to scroll with CTRL-U and CTRL-D
|'scrolljump'| |'sj'| minimum number of lines to scroll 'scrollbind' 'scb' scroll in window as other windows scroll
|'scrolloff'| |'so'| minimum nr. of lines above and below cursor 'scrolljump' 'sj' minimum number of lines to scroll
|'scrollopt'| |'sbo'| how 'scrollbind' should behave 'scrolloff' 'so' minimum nr. of lines above and below cursor
|'sections'| |'sect'| nroff macros that separate sections 'scrollopt' 'sbo' how 'scrollbind' should behave
|'secure'| secure mode for reading .vimrc in current dir 'sections' 'sect' nroff macros that separate sections
|'selection'| |'sel'| what type of selection to use 'secure' secure mode for reading .vimrc in current dir
|'selectmode'| |'slm'| when to use Select mode instead of Visual mode 'selection' 'sel' what type of selection to use
|'sessionoptions'| |'ssop'| options for |:mksession| 'selectmode' 'slm' when to use Select mode instead of Visual mode
|'shell'| |'sh'| name of shell to use for external commands 'sessionoptions' 'ssop' options for |:mksession|
|'shellcmdflag'| |'shcf'| flag to shell to execute one command 'shell' 'sh' name of shell to use for external commands
|'shellpipe'| |'sp'| string to put output of ":make" in error file 'shellcmdflag' 'shcf' flag to shell to execute one command
|'shellquote'| |'shq'| quote character(s) for around shell command 'shellpipe' 'sp' string to put output of ":make" in error file
|'shellredir'| |'srr'| string to put output of filter in a temp file 'shellquote' 'shq' quote character(s) for around shell command
|'shellslash'| |'ssl'| use forward slash for shell file names 'shellredir' 'srr' string to put output of filter in a temp file
|'shelltemp'| |'stmp'| whether to use a temp file for shell commands 'shellslash' 'ssl' use forward slash for shell file names
|'shelltype'| |'st'| Amiga: influences how to use a shell 'shelltemp' 'stmp' whether to use a temp file for shell commands
|'shellxquote'| |'sxq'| like 'shellquote', but include redirection 'shelltype' 'st' Amiga: influences how to use a shell
|'shiftround'| |'sr'| round indent to multiple of shiftwidth 'shellxquote' 'sxq' like 'shellquote', but include redirection
|'shiftwidth'| |'sw'| number of spaces to use for (auto)indent step 'shiftround' 'sr' round indent to multiple of shiftwidth
|'shortmess'| |'shm'| list of flags, reduce length of messages 'shiftwidth' 'sw' number of spaces to use for (auto)indent step
|'shortname'| |'sn'| non-MS-DOS: Filenames assumed to be 8.3 chars 'shortmess' 'shm' list of flags, reduce length of messages
|'showbreak'| |'sbr'| string to use at the start of wrapped lines 'shortname' 'sn' non-MS-DOS: Filenames assumed to be 8.3 chars
|'showcmd'| |'sc'| show (partial) command in status line 'showbreak' 'sbr' string to use at the start of wrapped lines
|'showfulltag'| |'sft'| show full tag pattern when completing tag 'showcmd' 'sc' show (partial) command in status line
|'showmatch'| |'sm'| briefly jump to matching bracket if insert one 'showfulltag' 'sft' show full tag pattern when completing tag
|'showmode'| |'smd'| message on status line to show current mode 'showmatch' 'sm' briefly jump to matching bracket if insert one
|'sidescroll'| |'ss'| minimum number of columns to scroll horizontal 'showmode' 'smd' message on status line to show current mode
|'sidescrolloff'| |'siso'| min. nr. of columns to left and right of cursor 'showtabline' 'stal' tells when the tab pages line is displayed
|'smartcase'| |'scs'| no ignore case when pattern has uppercase 'sidescroll' 'ss' minimum number of columns to scroll horizontal
|'smartindent'| |'si'| smart autoindenting for C programs 'sidescrolloff' 'siso' min. nr. of columns to left and right of cursor
|'smarttab'| |'sta'| use 'shiftwidth' when inserting <Tab> 'smartcase' 'scs' no ignore case when pattern has uppercase
|'softtabstop'| |'sts'| number of spaces that <Tab> uses while editing 'smartindent' 'si' smart autoindenting for C programs
|'spell'| enable spell checking 'smarttab' 'sta' use 'shiftwidth' when inserting <Tab>
|'spellcapcheck'| |'spc'| pattern to locate end of a sentence 'softtabstop' 'sts' number of spaces that <Tab> uses while editing
|'spellfile'| |'spf'| files where |zg| and |zw| store words 'spell' enable spell checking
|'spelllang'| |'spl'| language(s) to do spell checking for 'spellcapcheck' 'spc' pattern to locate end of a sentence
|'spellsuggest'| |'sps'| method(s) used to suggest spelling corrections 'spellfile' 'spf' files where |zg| and |zw| store words
|'splitbelow'| |'sb'| new window from split is below the current one 'spelllang' 'spl' language(s) to do spell checking for
|'splitright'| |'spr'| new window is put right of the current one 'spellsuggest' 'sps' method(s) used to suggest spelling corrections
|'startofline'| |'sol'| commands move cursor to first blank in line 'splitbelow' 'sb' new window from split is below the current one
|'statusline'| |'stl'| custom format for the status line 'splitright' 'spr' new window is put right of the current one
|'suffixes'| |'su'| suffixes that are ignored with multiple match 'startofline' 'sol' commands move cursor to first blank in line
|'suffixesadd'| |'sua'| suffixes added when searching for a file 'statusline' 'stl' custom format for the status line
|'swapfile'| |'swf'| whether to use a swapfile for a buffer 'suffixes' 'su' suffixes that are ignored with multiple match
|'swapsync'| |'sws'| how to sync the swap file 'suffixesadd' 'sua' suffixes added when searching for a file
|'switchbuf'| |'swb'| sets behavior when switching to another buffer 'swapfile' 'swf' whether to use a swapfile for a buffer
|'synmaxcol'| |'smc'| maximum column to find syntax items 'swapsync' 'sws' how to sync the swap file
|'syntax'| |'syn'| syntax to be loaded for current buffer 'switchbuf' 'swb' sets behavior when switching to another buffer
|'tabstop'| |'ts'| number of spaces that <Tab> in file uses 'synmaxcol' 'smc' maximum column to find syntax items
|'tagbsearch'| |'tbs'| use binary searching in tags files 'syntax' 'syn' syntax to be loaded for current buffer
|'taglength'| |'tl'| number of significant characters for a tag 'tabstop' 'ts' number of spaces that <Tab> in file uses
|'tagrelative'| |'tr'| file names in tag file are relative 'tabline' 'tal' custom format for the console tab pages line
|'tags'| |'tag'| list of file names used by the tag command 'tabpagemax' 'tpm' maximum number of tab pages for |-p| and "tab all"
|'tagstack'| |'tgst'| push tags onto the tag stack 'tagbsearch' 'tbs' use binary searching in tags files
|'term'| name of the terminal 'taglength' 'tl' number of significant characters for a tag
|'termbidi'| |'tbidi'| terminal takes care of bi-directionality 'tagrelative' 'tr' file names in tag file are relative
|'termencoding'| |'tenc'| character encoding used by the terminal 'tags' 'tag' list of file names used by the tag command
|'terse'| shorten some messages 'tagstack' 'tgst' push tags onto the tag stack
|'textauto'| |'ta'| obsolete, use 'fileformats' 'term' name of the terminal
|'textmode'| |'tx'| obsolete, use 'fileformat' 'termbidi' 'tbidi' terminal takes care of bi-directionality
|'textwidth'| |'tw'| maximum width of text that is being inserted 'termencoding' 'tenc' character encoding used by the terminal
|'thesaurus'| |'tsr'| list of thesaurus files for keyword completion 'terse' shorten some messages
|'tildeop'| |'top'| tilde command "~" behaves like an operator 'textauto' 'ta' obsolete, use 'fileformats'
|'timeout'| |'to'| time out on mappings and key codes 'textmode' 'tx' obsolete, use 'fileformat'
|'timeoutlen'| |'tm'| time out time in milliseconds 'textwidth' 'tw' maximum width of text that is being inserted
|'title'| let Vim set the title of the window 'thesaurus' 'tsr' list of thesaurus files for keyword completion
|'titlelen'| percentage of 'columns' used for window title 'tildeop' 'top' tilde command "~" behaves like an operator
|'titleold'| old title, restored when exiting 'timeout' 'to' time out on mappings and key codes
|'titlestring'| string to use for the Vim window title 'timeoutlen' 'tm' time out time in milliseconds
|'toolbar'| |'tb'| GUI: which items to show in the toolbar 'title' let Vim set the title of the window
|'toolbariconsize'| |'tbis'| size of the toolbar icons (for GTK 2 only) 'titlelen' percentage of 'columns' used for window title
|'ttimeout'| time out on mappings 'titleold' old title, restored when exiting
|'ttimeoutlen'| |'ttm'| time out time for key codes in milliseconds 'titlestring' string to use for the Vim window title
|'ttybuiltin'| |'tbi'| use built-in termcap before external termcap 'toolbar' 'tb' GUI: which items to show in the toolbar
|'ttyfast'| |'tf'| indicates a fast terminal connection 'toolbariconsize' 'tbis' size of the toolbar icons (for GTK 2 only)
|'ttymouse'| |'ttym'| type of mouse codes generated 'ttimeout' time out on mappings
|'ttyscroll'| |'tsl'| maximum number of lines for a scroll 'ttimeoutlen' 'ttm' time out time for key codes in milliseconds
|'ttytype'| |'tty'| alias for 'term' 'ttybuiltin' 'tbi' use built-in termcap before external termcap
|'undolevels'| |'ul'| maximum number of changes that can be undone 'ttyfast' 'tf' indicates a fast terminal connection
|'updatecount'| |'uc'| after this many characters flush swap file 'ttymouse' 'ttym' type of mouse codes generated
|'updatetime'| |'ut'| after this many milliseconds flush swap file 'ttyscroll' 'tsl' maximum number of lines for a scroll
|'verbose'| |'vbs'| give informative messages 'ttytype' 'tty' alias for 'term'
|'verbosefile'| |'vfile'| file to write messages in 'undolevels' 'ul' maximum number of changes that can be undone
|'viewdir'| |'vdir'| directory where to store files with :mkview 'updatecount' 'uc' after this many characters flush swap file
|'viewoptions'| |'vop'| specifies what to save for :mkview 'updatetime' 'ut' after this many milliseconds flush swap file
|'viminfo'| |'vi'| use .viminfo file upon startup and exiting 'verbose' 'vbs' give informative messages
|'virtualedit'| |'ve'| when to use virtual editing 'verbosefile' 'vfile' file to write messages in
|'visualbell'| |'vb'| use visual bell instead of beeping 'viewdir' 'vdir' directory where to store files with :mkview
|'warn'| warn for shell command when buffer was changed 'viewoptions' 'vop' specifies what to save for :mkview
|'weirdinvert'| |'wi'| for terminals that have weird inversion method 'viminfo' 'vi' use .viminfo file upon startup and exiting
|'whichwrap'| |'ww'| allow specified keys to cross line boundaries 'virtualedit' 've' when to use virtual editing
|'wildchar'| |'wc'| command-line character for wildcard expansion 'visualbell' 'vb' use visual bell instead of beeping
|'wildcharm'| |'wcm'| like 'wildchar' but also works when mapped 'warn' warn for shell command when buffer was changed
|'wildignore'| |'wig'| files matching these patterns are not completed 'weirdinvert' 'wi' for terminals that have weird inversion method
|'wildmenu'| |'wmnu'| use menu for command line completion 'whichwrap' 'ww' allow specified keys to cross line boundaries
|'wildmode'| |'wim'| mode for 'wildchar' command-line expansion 'wildchar' 'wc' command-line character for wildcard expansion
|'wildoptions'| |'wop'| specifies how command line completion is done. 'wildcharm' 'wcm' like 'wildchar' but also works when mapped
|'winaltkeys'| |'wak'| when the windows system handles ALT keys 'wildignore' 'wig' files matching these patterns are not completed
|'winheight'| |'wh'| minimum number of lines for the current window 'wildmenu' 'wmnu' use menu for command line completion
|'winfixheight'| |'wfh'| keep window height when opening/closing windows 'wildmode' 'wim' mode for 'wildchar' command-line expansion
|'winminheight'| |'wmh'| minimum number of lines for any window 'wildoptions' 'wop' specifies how command line completion is done.
|'winminwidth'| |'wmw'| minimal number of columns for any window 'winaltkeys' 'wak' when the windows system handles ALT keys
|'winwidth'| |'wiw'| minimal number of columns for current window 'winheight' 'wh' minimum number of lines for the current window
|'wrap'| long lines wrap and continue on the next line 'winfixheight' 'wfh' keep window height when opening/closing windows
|'wrapmargin'| |'wm'| chars from the right where wrapping starts 'winminheight' 'wmh' minimum number of lines for any window
|'wrapscan'| |'ws'| searches wrap around the end of the file 'winminwidth' 'wmw' minimal number of columns for any window
|'write'| writing to a file is allowed 'winwidth' 'wiw' minimal number of columns for current window
|'writeany'| |'wa'| write to file with no need for "!" override 'wrap' long lines wrap and continue on the next line
|'writebackup'| |'wb'| make a backup before overwriting a file 'wrapmargin' 'wm' chars from the right where wrapping starts
|'writedelay'| |'wd'| delay this many msec for each char (for debug) 'wrapscan' 'ws' searches wrap around the end of the file
'write' writing to a file is allowed
'writeany' 'wa' write to file with no need for "!" override
'writebackup' 'wb' make a backup before overwriting a file
'writedelay' 'wd' delay this many msec for each char (for debug)
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*Q_ur* Undo/Redo commands *Q_ur* Undo/Redo commands

View File

@ -1,4 +1,4 @@
*remote.txt* For Vim version 7.0aa. Last change: 2005 Apr 01 *remote.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -53,8 +53,8 @@ The following command line arguments are available:
*--remote-send* *--remote-send*
--remote-send {keys} Send {keys} to server and exit. --remote-send {keys} Send {keys} to server and exit.
*--remote-expr* *--remote-expr*
--remote-expr {expr} Evaluate {expr} in server and --remote-expr {expr} Evaluate {expr} in server and print the result
print the result on stdout. on stdout.
*--serverlist* *--serverlist*
--serverlist Output a list of server names. --serverlist Output a list of server names.

View File

@ -1,4 +1,4 @@
*spell.txt* For Vim version 7.0aa. Last change: 2006 Mar 04 *spell.txt* For Vim version 7.0aa. Last change: 2006 Mar 05
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -841,6 +841,29 @@ flags. But Myspell doesn't support that, thus you may not want to use it
anyway. For compatibility use an 8-bit encoding. anyway. For compatibility use an 8-bit encoding.
INFORMATION
These entries in the affix file can be used to add information to the spell
file. There are no restrictions on the format, but they should be in the
right encoding.
*spell-NAME* *spell-VERSION* *spell-HOME*
*spell-AUTHOR* *spell-EMAIL* *spell-COPYRIGHT*
NAME Name of the language
VERSION 1.0.1 with fixes
HOME http://www.myhome.eu
AUTHOR John Doe
EMAIL john AT Doe DOT net
COPYRIGHT LGPL
These fields are put in the .spl file as-is. The |:spellinfo| command can be
used to view the info.
*:spellinfo* *:spelli*
:spelli[nfo] Display the information for the spell file(s) used for
the current buffer.
CHARACTER TABLES CHARACTER TABLES
*spell-affix-chars* *spell-affix-chars*
When using an 8-bit encoding the affix file should define what characters are When using an 8-bit encoding the affix file should define what characters are
@ -1157,12 +1180,12 @@ words with this flag combine in any order. This means there is no control
over which word comes first. Example: over which word comes first. Example:
COMPOUNDFLAG c ~ COMPOUNDFLAG c ~
*spell-COMPOUNDFLAGS* *spell-COMPOUNDRULE*
A more advanced method to specify how compound words can be formed uses A more advanced method to specify how compound words can be formed uses
multiple items with multiple flags. This is not compatible with Myspell 3.0. multiple items with multiple flags. This is not compatible with Myspell 3.0.
Let's start with an example: Let's start with an example:
COMPOUNDFLAGS c+ ~ COMPOUNDRULE c+ ~
COMPOUNDFLAGS se ~ COMPOUNDRULE se ~
The first line defines that words with the "c" flag can be concatenated in any The first line defines that words with the "c" flag can be concatenated in any
order. The second line defines compound words that are made of one word with order. The second line defines compound words that are made of one word with
@ -1180,7 +1203,7 @@ You can make these words:
soup soup
onionsoup onionsoup
The COMPOUNDFLAGS item may appear multiple times. The argument is made out of The COMPOUNDRULE item may appear multiple times. The argument is made out of
one or more groups, where each group can be: one or more groups, where each group can be:
one flag e.g., c one flag e.g., c
alternate flags inside [] e.g., [abc] alternate flags inside [] e.g., [abc]
@ -1190,20 +1213,20 @@ Optionally this may be followed by:
This is similar to the regexp pattern syntax (but not the same!). A few This is similar to the regexp pattern syntax (but not the same!). A few
examples with the sequence of word flags they require: examples with the sequence of word flags they require:
COMPOUNDFLAGS x+ x xx xxx etc. COMPOUNDRULE x+ x xx xxx etc.
COMPOUNDFLAGS yz yz COMPOUNDRULE yz yz
COMPOUNDFLAGS x+z xz xxz xxxz etc. COMPOUNDRULE x+z xz xxz xxxz etc.
COMPOUNDFLAGS yx+ yx yxx yxxx etc. COMPOUNDRULE yx+ yx yxx yxxx etc.
COMPOUNDFLAGS [abc]z az bz cz COMPOUNDRULE [abc]z az bz cz
COMPOUNDFLAGS [abc]+z az aaz abaz bz baz bcbz cz caz cbaz etc. COMPOUNDRULE [abc]+z az aaz abaz bz baz bcbz cz caz cbaz etc.
COMPOUNDFLAGS a[xyz]+ ax axx axyz ay ayx ayzz az azy azxy etc. COMPOUNDRULE a[xyz]+ ax axx axyz ay ayx ayzz az azy azxy etc.
COMPOUNDFLAGS sm*e se sme smme smmme etc. COMPOUNDRULE sm*e se sme smme smmme etc.
COMPOUNDFLAGS s[xyz]*e se sxe sxye sxyxe sye syze sze szye szyxe etc. COMPOUNDRULE s[xyz]*e se sxe sxye sxyxe sye syze sze szye szyxe etc.
A specific example: Allow a compound to be made of two words and a dash: A specific example: Allow a compound to be made of two words and a dash:
In the .aff file: In the .aff file:
COMPOUNDFLAGS sde ~ COMPOUNDRULE sde ~
NEEDAFFIX x ~ NEEDAFFIX x ~
COMPOUNDMAX 3 ~ COMPOUNDMAX 3 ~
COMPOUNDMIN 1 ~ COMPOUNDMIN 1 ~
@ -1237,7 +1260,7 @@ specified with COMPOUNDMAX. Example:
When omitted there is no maximum. It applies to all compound words. When omitted there is no maximum. It applies to all compound words.
To set a limit for words with specific flags make sure the items in To set a limit for words with specific flags make sure the items in
COMPOUNDFLAGS where they appear don't allow too many words. COMPOUNDRULE where they appear don't allow too many words.
*spell-COMPOUNDSYLMAX* *spell-COMPOUNDSYLMAX*
The maximum number of syllables that a compound word may contain is specified The maximum number of syllables that a compound word may contain is specified
@ -1458,14 +1481,20 @@ CIRCUMFIX (Hunspell) *spell-CIRCUMFIX*
COMPLEXPREFIXES (Hunspell) *spell-COMPLEXPREFIXES* COMPLEXPREFIXES (Hunspell) *spell-COMPLEXPREFIXES*
Enables using two prefixes. Not supported. Enables using two prefixes. Not supported.
COMPOUND (Hunspell) *spell-COMPOUND*
This is one line with the count of COMPOUND items, followd by
that many COMPOUND lines with a pattern.
Remove the first line with the count and rename the other
items to COMPOUNDRULE |spell-COMPOUNDRULE|
COMPOUNDBEGIN (Hunspell) *spell-COMPOUNDBEGIN* COMPOUNDBEGIN (Hunspell) *spell-COMPOUNDBEGIN*
Use COMPOUNDFLAGS instead. |spell-COMPOUNDFLAGS| Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
COMPOUNDEND (Hunspell) *spell-COMPOUNDEND* COMPOUNDEND (Hunspell) *spell-COMPOUNDEND*
Use COMPOUNDFLAGS instead. |spell-COMPOUNDFLAGS| Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
COMPOUNDMIDDLE (Hunspell) *spell-COMPOUNDMIDDLE* COMPOUNDMIDDLE (Hunspell) *spell-COMPOUNDMIDDLE*
Use COMPOUNDFLAGS instead. |spell-COMPOUNDFLAGS| Use COMPOUNDRULE instead. |spell-COMPOUNDRULE|
COMPOUNDROOT (Hunspell) *spell-COMPOUNDROOT* COMPOUNDROOT (Hunspell) *spell-COMPOUNDROOT*
Flag for words in the dictionary that are already a compound. Flag for words in the dictionary that are already a compound.
@ -1481,9 +1510,6 @@ COMPOUNDWORDMAX (Hunspell) *spell-COMPOUNDWORDMAX*
FORBIDDENWORD (Hunspell) *spell-FORBIDDENWORD* FORBIDDENWORD (Hunspell) *spell-FORBIDDENWORD*
Use BAD instead. |spell-BAD| Use BAD instead. |spell-BAD|
HOME (Hunspell) *spell-HOME*
Specifies the website for the language. Not supported.
LANG (Hunspell) *spell-LANG* LANG (Hunspell) *spell-LANG*
This specifies language-specific behavior. This actually This specifies language-specific behavior. This actually
moves part of the language knowledge into the program, moves part of the language knowledge into the program,
@ -1496,9 +1522,6 @@ LEMMA_PRESENT (Hunspell) *spell-LEMMA_PRESENT*
MAXNGRAMSUGS (Hunspell) *spell-MAXNGRAMSUGS* MAXNGRAMSUGS (Hunspell) *spell-MAXNGRAMSUGS*
Not supported. Not supported.
NAME (Hunspell) *spell-NAME*
Specifies the name of the language. Not supported.
ONLYINCOMPOUND (Hunspell) *spell-ONLYINCOMPOUND* ONLYINCOMPOUND (Hunspell) *spell-ONLYINCOMPOUND*
Use NEEDCOMPOUND instead. |spell-NEEDCOMPOUND| Use NEEDCOMPOUND instead. |spell-NEEDCOMPOUND|
@ -1515,9 +1538,6 @@ TRY (Myspell, Hunspell, others) *spell-TRY*
Vim does not use the TRY item, it is ignored. For making Vim does not use the TRY item, it is ignored. For making
suggestions the actual characters in the words are used. suggestions the actual characters in the words are used.
VERSION (Hunspell) *spell-VERSION*
Specifies the version for the language. Not supported.
WORDCHARS (Hunspell) *spell-WORDCHARS* WORDCHARS (Hunspell) *spell-WORDCHARS*
Used to recognize words. Vim doesn't need it, because there Used to recognize words. Vim doesn't need it, because there
is no need to separate words before checking them (using a is no need to separate words before checking them (using a

View File

@ -1,4 +1,4 @@
*starting.txt* For Vim version 7.0aa. Last change: 2006 Mar 01 *starting.txt* For Vim version 7.0aa. Last change: 2006 Mar 05
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -1129,6 +1129,7 @@ you want to make this file your default .vimrc, move it to your home directory
(on Unix), s: (Amiga) or $VIM directory (MS-DOS). You could also use (on Unix), s: (Amiga) or $VIM directory (MS-DOS). You could also use
autocommands |autocommand| and/or modelines |modeline|. autocommands |autocommand| and/or modelines |modeline|.
*vimrc-option-example*
If you only want to add a single option setting to your vimrc, you can use If you only want to add a single option setting to your vimrc, you can use
these steps: these steps:
1. Edit your vimrc file with Vim. 1. Edit your vimrc file with Vim.
@ -1138,6 +1139,7 @@ these steps:
'=' to enter the value. E.g., for the 'guifont' option: > '=' to enter the value. E.g., for the 'guifont' option: >
o:set guifont=<C-R>=&guifont<CR><Esc> o:set guifont=<C-R>=&guifont<CR><Esc>
< [<C-R> is a CTRL-R, <CR> is a return, <Esc> is the escape key] < [<C-R> is a CTRL-R, <CR> is a return, <Esc> is the escape key]
You need to escape special characters, esp. spaces.
Note that when you create a .vimrc file, this can influence the 'compatible' Note that when you create a .vimrc file, this can influence the 'compatible'
option, which has several side effects. See |'compatible'|. option, which has several side effects. See |'compatible'|.

View File

@ -356,11 +356,13 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'mat' options.txt /*'mat'* 'mat' options.txt /*'mat'*
'matchpairs' options.txt /*'matchpairs'* 'matchpairs' options.txt /*'matchpairs'*
'matchtime' options.txt /*'matchtime'* 'matchtime' options.txt /*'matchtime'*
'maxcombine' options.txt /*'maxcombine'*
'maxfuncdepth' options.txt /*'maxfuncdepth'* 'maxfuncdepth' options.txt /*'maxfuncdepth'*
'maxmapdepth' options.txt /*'maxmapdepth'* 'maxmapdepth' options.txt /*'maxmapdepth'*
'maxmem' options.txt /*'maxmem'* 'maxmem' options.txt /*'maxmem'*
'maxmempattern' options.txt /*'maxmempattern'* 'maxmempattern' options.txt /*'maxmempattern'*
'maxmemtot' options.txt /*'maxmemtot'* 'maxmemtot' options.txt /*'maxmemtot'*
'mco' options.txt /*'mco'*
'mef' options.txt /*'mef'* 'mef' options.txt /*'mef'*
'menuitems' options.txt /*'menuitems'* 'menuitems' options.txt /*'menuitems'*
'mesg' vi_diff.txt /*'mesg'* 'mesg' vi_diff.txt /*'mesg'*
@ -2547,8 +2549,12 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:spelld spell.txt /*:spelld* :spelld spell.txt /*:spelld*
:spelldump spell.txt /*:spelldump* :spelldump spell.txt /*:spelldump*
:spellgood spell.txt /*:spellgood* :spellgood spell.txt /*:spellgood*
:spelli spell.txt /*:spelli*
:spellinfo spell.txt /*:spellinfo*
:spellr spell.txt /*:spellr* :spellr spell.txt /*:spellr*
:spellrepall spell.txt /*:spellrepall* :spellrepall spell.txt /*:spellrepall*
:spellu spell.txt /*:spellu*
:spellundo spell.txt /*:spellundo*
:spellw spell.txt /*:spellw* :spellw spell.txt /*:spellw*
:spellwrong spell.txt /*:spellwrong* :spellwrong spell.txt /*:spellwrong*
:split windows.txt /*:split* :split windows.txt /*:split*
@ -5188,6 +5194,7 @@ ft-ocaml-syntax syntax.txt /*ft-ocaml-syntax*
ft-papp-syntax syntax.txt /*ft-papp-syntax* ft-papp-syntax syntax.txt /*ft-papp-syntax*
ft-pascal-syntax syntax.txt /*ft-pascal-syntax* ft-pascal-syntax syntax.txt /*ft-pascal-syntax*
ft-perl-syntax syntax.txt /*ft-perl-syntax* ft-perl-syntax syntax.txt /*ft-perl-syntax*
ft-php-omni insert.txt /*ft-php-omni*
ft-php-syntax syntax.txt /*ft-php-syntax* ft-php-syntax syntax.txt /*ft-php-syntax*
ft-php3-syntax syntax.txt /*ft-php3-syntax* ft-php3-syntax syntax.txt /*ft-php3-syntax*
ft-phtml-syntax syntax.txt /*ft-phtml-syntax* ft-phtml-syntax syntax.txt /*ft-phtml-syntax*
@ -5932,6 +5939,8 @@ matchstr() eval.txt /*matchstr()*
max() eval.txt /*max()* max() eval.txt /*max()*
mbyte-IME mbyte.txt /*mbyte-IME* mbyte-IME mbyte.txt /*mbyte-IME*
mbyte-XIM mbyte.txt /*mbyte-XIM* mbyte-XIM mbyte.txt /*mbyte-XIM*
mbyte-combining mbyte.txt /*mbyte-combining*
mbyte-composing mbyte.txt /*mbyte-composing*
mbyte-conversion mbyte.txt /*mbyte-conversion* mbyte-conversion mbyte.txt /*mbyte-conversion*
mbyte-encoding mbyte.txt /*mbyte-encoding* mbyte-encoding mbyte.txt /*mbyte-encoding*
mbyte-first mbyte.txt /*mbyte-first* mbyte-first mbyte.txt /*mbyte-first*
@ -6189,6 +6198,7 @@ new-line-continuation version5.txt /*new-line-continuation*
new-location-list version7.txt /*new-location-list* new-location-list version7.txt /*new-location-list*
new-manpage-trans version7.txt /*new-manpage-trans* new-manpage-trans version7.txt /*new-manpage-trans*
new-matchparen version7.txt /*new-matchparen* new-matchparen version7.txt /*new-matchparen*
new-more-unicode version7.txt /*new-more-unicode*
new-multi-byte version5.txt /*new-multi-byte* new-multi-byte version5.txt /*new-multi-byte*
new-multi-lang version6.txt /*new-multi-lang* new-multi-lang version6.txt /*new-multi-lang*
new-netrw-explore version7.txt /*new-netrw-explore* new-netrw-explore version7.txt /*new-netrw-explore*
@ -6291,6 +6301,7 @@ pattern-multi-items pattern.txt /*pattern-multi-items*
pattern-overview pattern.txt /*pattern-overview* pattern-overview pattern.txt /*pattern-overview*
pattern-searches pattern.txt /*pattern-searches* pattern-searches pattern.txt /*pattern-searches*
pattern.txt pattern.txt /*pattern.txt* pattern.txt pattern.txt /*pattern.txt*
patterns-composing pattern.txt /*patterns-composing*
pdev-option print.txt /*pdev-option* pdev-option print.txt /*pdev-option*
penc-option print.txt /*penc-option* penc-option print.txt /*penc-option*
perl if_perl.txt /*perl* perl if_perl.txt /*perl*
@ -6583,6 +6594,7 @@ scrolling scroll.txt /*scrolling*
scrollstart-variable eval.txt /*scrollstart-variable* scrollstart-variable eval.txt /*scrollstart-variable*
sdl.vim syntax.txt /*sdl.vim* sdl.vim syntax.txt /*sdl.vim*
search() eval.txt /*search()* search() eval.txt /*search()*
search()-sub-match eval.txt /*search()-sub-match*
search-commands pattern.txt /*search-commands* search-commands pattern.txt /*search-commands*
search-offset pattern.txt /*search-offset* search-offset pattern.txt /*search-offset*
search-pattern pattern.txt /*search-pattern* search-pattern pattern.txt /*search-pattern*
@ -6656,6 +6668,7 @@ special-buffers windows.txt /*special-buffers*
speed-up tips.txt /*speed-up* speed-up tips.txt /*speed-up*
spell spell.txt /*spell* spell spell.txt /*spell*
spell-ACCENT spell.txt /*spell-ACCENT* spell-ACCENT spell.txt /*spell-ACCENT*
spell-AUTHOR spell.txt /*spell-AUTHOR*
spell-BAD spell.txt /*spell-BAD* spell-BAD spell.txt /*spell-BAD*
spell-CHECKCOMPOUNDCASE spell.txt /*spell-CHECKCOMPOUNDCASE* spell-CHECKCOMPOUNDCASE spell.txt /*spell-CHECKCOMPOUNDCASE*
spell-CHECKCOMPOUNDDUP spell.txt /*spell-CHECKCOMPOUNDDUP* spell-CHECKCOMPOUNDDUP spell.txt /*spell-CHECKCOMPOUNDDUP*
@ -6665,19 +6678,22 @@ spell-CHECKCOMPOUNDTRIPLE spell.txt /*spell-CHECKCOMPOUNDTRIPLE*
spell-CIRCUMFIX spell.txt /*spell-CIRCUMFIX* spell-CIRCUMFIX spell.txt /*spell-CIRCUMFIX*
spell-COMMON spell.txt /*spell-COMMON* spell-COMMON spell.txt /*spell-COMMON*
spell-COMPLEXPREFIXES spell.txt /*spell-COMPLEXPREFIXES* spell-COMPLEXPREFIXES spell.txt /*spell-COMPLEXPREFIXES*
spell-COMPOUND spell.txt /*spell-COMPOUND*
spell-COMPOUNDBEGIN spell.txt /*spell-COMPOUNDBEGIN* spell-COMPOUNDBEGIN spell.txt /*spell-COMPOUNDBEGIN*
spell-COMPOUNDEND spell.txt /*spell-COMPOUNDEND* spell-COMPOUNDEND spell.txt /*spell-COMPOUNDEND*
spell-COMPOUNDFLAG spell.txt /*spell-COMPOUNDFLAG* spell-COMPOUNDFLAG spell.txt /*spell-COMPOUNDFLAG*
spell-COMPOUNDFLAGS spell.txt /*spell-COMPOUNDFLAGS*
spell-COMPOUNDFORBIDFLAG spell.txt /*spell-COMPOUNDFORBIDFLAG* spell-COMPOUNDFORBIDFLAG spell.txt /*spell-COMPOUNDFORBIDFLAG*
spell-COMPOUNDMAX spell.txt /*spell-COMPOUNDMAX* spell-COMPOUNDMAX spell.txt /*spell-COMPOUNDMAX*
spell-COMPOUNDMIDDLE spell.txt /*spell-COMPOUNDMIDDLE* spell-COMPOUNDMIDDLE spell.txt /*spell-COMPOUNDMIDDLE*
spell-COMPOUNDMIN spell.txt /*spell-COMPOUNDMIN* spell-COMPOUNDMIN spell.txt /*spell-COMPOUNDMIN*
spell-COMPOUNDPERMITFLAG spell.txt /*spell-COMPOUNDPERMITFLAG* spell-COMPOUNDPERMITFLAG spell.txt /*spell-COMPOUNDPERMITFLAG*
spell-COMPOUNDROOT spell.txt /*spell-COMPOUNDROOT* spell-COMPOUNDROOT spell.txt /*spell-COMPOUNDROOT*
spell-COMPOUNDRULE spell.txt /*spell-COMPOUNDRULE*
spell-COMPOUNDSYLLABLE spell.txt /*spell-COMPOUNDSYLLABLE* spell-COMPOUNDSYLLABLE spell.txt /*spell-COMPOUNDSYLLABLE*
spell-COMPOUNDSYLMAX spell.txt /*spell-COMPOUNDSYLMAX* spell-COMPOUNDSYLMAX spell.txt /*spell-COMPOUNDSYLMAX*
spell-COMPOUNDWORDMAX spell.txt /*spell-COMPOUNDWORDMAX* spell-COMPOUNDWORDMAX spell.txt /*spell-COMPOUNDWORDMAX*
spell-COPYRIGHT spell.txt /*spell-COPYRIGHT*
spell-EMAIL spell.txt /*spell-EMAIL*
spell-FLAG spell.txt /*spell-FLAG* spell-FLAG spell.txt /*spell-FLAG*
spell-FOL spell.txt /*spell-FOL* spell-FOL spell.txt /*spell-FOL*
spell-FORBIDDENWORD spell.txt /*spell-FORBIDDENWORD* spell-FORBIDDENWORD spell.txt /*spell-FORBIDDENWORD*
@ -6741,6 +6757,7 @@ spell-wordlist-format spell.txt /*spell-wordlist-format*
spell-yiddish spell.txt /*spell-yiddish* spell-yiddish spell.txt /*spell-yiddish*
spell.txt spell.txt /*spell.txt* spell.txt spell.txt /*spell.txt*
spellbadword() eval.txt /*spellbadword()* spellbadword() eval.txt /*spellbadword()*
spellfile-cleanup spell.txt /*spellfile-cleanup*
spellfile.vim spell.txt /*spellfile.vim* spellfile.vim spell.txt /*spellfile.vim*
spellsuggest() eval.txt /*spellsuggest()* spellsuggest() eval.txt /*spellsuggest()*
split() eval.txt /*split()* split() eval.txt /*split()*
@ -7415,6 +7432,7 @@ viminfo-write starting.txt /*viminfo-write*
vimrc starting.txt /*vimrc* vimrc starting.txt /*vimrc*
vimrc-filetype usr_05.txt /*vimrc-filetype* vimrc-filetype usr_05.txt /*vimrc-filetype*
vimrc-intro usr_05.txt /*vimrc-intro* vimrc-intro usr_05.txt /*vimrc-intro*
vimrc-option-example starting.txt /*vimrc-option-example*
vimrc_example.vim usr_05.txt /*vimrc_example.vim* vimrc_example.vim usr_05.txt /*vimrc_example.vim*
vimtutor usr_01.txt /*vimtutor* vimtutor usr_01.txt /*vimtutor*
virtcol() eval.txt /*virtcol()* virtcol() eval.txt /*virtcol()*
@ -7636,6 +7654,10 @@ zo fold.txt /*zo*
zr fold.txt /*zr* zr fold.txt /*zr*
zs scroll.txt /*zs* zs scroll.txt /*zs*
zt scroll.txt /*zt* zt scroll.txt /*zt*
zuG spell.txt /*zuG*
zuW spell.txt /*zuW*
zug spell.txt /*zug*
zuw spell.txt /*zuw*
zv fold.txt /*zv* zv fold.txt /*zv*
zw spell.txt /*zw* zw spell.txt /*zw*
zx fold.txt /*zx* zx fold.txt /*zx*

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.0aa. Last change: 2006 Mar 04 *todo.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -30,69 +30,10 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs* *known-bugs*
-------------------- Known bugs and current work ----------------------- -------------------- Known bugs and current work -----------------------
Add options to optwin.vim: When expanding on the command line, recognize shell commands, such as ":!cmd".
tabpagemax Move from ExpandFromContext() to separate function.
tabline Check for file being executable. EW_EXEC
showtabline Escape special characters ";&<>(){}". Also in file names. (Adri Verhoef)
guitablabel
formatexpr
Add options to quickref.txt:
guitablabel
showtabline
tabline
tabpagemax
spelling:
- Rename COMPOUNDFLAGS to COMPOUNDPATTERN or COMPOUNDRULE?
Hunspell now uses COMPOUND with a count.
- Check out Hunspell 1.1.3.
Try to make the newly added features compatible.
what does MAXNGRAMSUGS do?
See announcement (Nemeth, 5 jan)
is COMPLEXPREFIXES necessary now that we have flags for affixes?
- Look into Hungarian dictionary:
http://magyarispell.sourceforge.net/hu_HU-1.0.tar.gz
- When compounding Hunspell doesn't allow affixes inside the compound word,
only before and after it. COMPOUNDPERMITFLAG can be used to allow it.
Check Myspell and Aspell if they also work this way.
Thus a word + suffix needs a flag that it can't be used with a following
compound, and word + prefix can't be after another word in a compound.
- Implement COMPOUNDFORBIDFLAG .
Mac unicode patch (Da Woon Jung):
- Mac: Unicode input and display (Eckehard Berns, 2004 June 27)
Other patch from Da Woon Jung, 2005 Jan 16.
8 Add patch from Muraoka Taro (Mar 16) to support input method on Mac?
New patch 2004 Jun 16
- configuration option for platform: i386, ppc or both.
Use __LITTLE_ENDIAN__ to test for current platform.
- selecting proportional font breaks display
- UTF-8 text causes display problems. Font replacement causes this.
- Command-key mappings do not work. (Alan Schmitt)
- Add default key mappings for the command key (Alan Schmitt)
use http://macvim.org/OSX/files/gvimrc
- With 'nopaste' pasting is wrong, with 'paste' Command-V doesn't work.
(Alan Schmitt)
8 Support four composing/combining characters, needed for Hebrew. (Ron Aaron)
Add the 'maxcombining' option to set the nr. of composing characters.
At the same time support 32 bit Unicode characters?
8 "ga" should show all composing characters, also if there are more than 2.
8 Searching for a composing character by itself should work. Perhaps "."
with a composing char should work too.
Win32: Use the free downloadable compiler 7.1 (2003). Figure out how to do
debugging (with Agide?) and describe it. (George Reilly)
Try out using the free MS compiler and debugger, using Make_mvc.mak.
Also generate the .pdb file that can be used to generate a useful crash report
on MS-Windows. (George Reilly)
Win32: Check that installer puts menu items in "all users" dir when possible,
not administrator dir.
When "= evaluation results in a List, use it as a sequence of lines.
As if join(list, "\n") was used.
Autoload: Autoload:
- Add a Vim script in $VIMRUNTIME/tools that takes a file with a list of - Add a Vim script in $VIMRUNTIME/tools that takes a file with a list of
@ -105,12 +46,23 @@ Autoload:
helpfile doc/myscript.txt helpfile doc/myscript.txt
For the "helpfile" item ":helptags" is run. For the "helpfile" item ":helptags" is run.
When expanding on the command line, recognize shell commands, such as ":!cmd". Win32: Describe how to do debugging and describe it. (George Reilly)
Complete command names by searching in $PATH. When completing file names
escape special characters ";&<>(){}". (Adri Verhoef)
Are there more commands where v:swapcommand can be set to something useful? Are there more commands where v:swapcommand can be set to something useful?
Mac unicode patch (Da Woon Jung):
- Mac: Unicode input and display (Eckehard Berns, 2004 June 27)
Other patch from Da Woon Jung, 2005 Jan 16.
8 Add patch from Muraoka Taro (Mar 16) to support input method on Mac?
New patch 2004 Jun 16
- selecting proportional font breaks display
- UTF-8 text causes display problems. Font replacement causes this.
- Command-key mappings do not work. (Alan Schmitt)
- Add default key mappings for the command key (Alan Schmitt)
use http://macvim.org/OSX/files/gvimrc
- With 'nopaste' pasting is wrong, with 'paste' Command-V doesn't work.
(Alan Schmitt)
CONSIDERED FOR VERSION 7.0: CONSIDERED FOR VERSION 7.0:
@ -1301,6 +1253,21 @@ Tab pages:
Spell checking: Spell checking:
- Implement COMPOUNDFORBIDFLAG .
- Check out Hunspell 1.1.4.
The manpage doesn't match the source code...
Try to make the newly added features compatible.
what does MAXNGRAMSUGS do?
is COMPLEXPREFIXES necessary when we have flags for affixes?
- Look into Hungarian dictionary: hu_HU-1.0.tar.gz
This one doesn't match with Hunspell 1.1.4.
- Add CHECKCOMPOUNDCASE: when compounding make leading capital lower case.
How is it supposed to work?
- When compounding Hunspell doesn't allow affixes inside the compound word,
only before and after it. COMPOUNDPERMITFLAG can be used to allow it.
Check Myspell and Aspell if they also work this way.
Thus a word + suffix needs a flag that it can't be used with a following
compound, and word + prefix can't be after another word in a compound.
- suggestion for "KG" to "kg" when it's keepcase. - suggestion for "KG" to "kg" when it's keepcase.
- Support flags on a suffix. Used for second level affixes, rare and - Support flags on a suffix. Used for second level affixes, rare and
nocomp. The flags may also be used for compounding. Default is an OR nocomp. The flags may also be used for compounding. Default is an OR

View File

@ -1,4 +1,4 @@
*various.txt* For Vim version 7.0aa. Last change: 2006 Feb 20 *various.txt* For Vim version 7.0aa. Last change: 2006 Mar 05
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -55,14 +55,16 @@ ga Print the ascii value of the character under the
The <Nul> character in a file is stored internally as The <Nul> character in a file is stored internally as
<NL>, but it will be shown as: <NL>, but it will be shown as:
<^@> 0, Hex 00, Octal 000 ~ <^@> 0, Hex 00, Octal 000 ~
If the character has composing characters these are
also shown. The value of 'maxcombine' doesn't matter.
Mnemonic: Get Ascii value. {not in Vi} Mnemonic: Get Ascii value. {not in Vi}
*g8* *g8*
g8 Print the hex values of the bytes used in the g8 Print the hex values of the bytes used in the
character under the cursor, assuming it is in |UTF-8| character under the cursor, assuming it is in |UTF-8|
encoding. This also shows composing characters. encoding. This also shows composing characters. The
Example of a character with three composing value of 'maxcombine' doesn't matter.
characters: Example of a character with two composing characters:
e0 b8 81 + e0 b8 b9 + e0 b9 89 ~ e0 b8 81 + e0 b8 b9 + e0 b9 89 ~
{not in Vi} {not in Vi}

View File

@ -1,4 +1,4 @@
*version7.txt* For Vim version 7.0aa. Last change: 2006 Mar 04 *version7.txt* For Vim version 7.0aa. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -23,6 +23,7 @@ Spell checking |new-spell|
Omni completion |new-omni-completion| Omni completion |new-omni-completion|
MzScheme interface |new-MzScheme| MzScheme interface |new-MzScheme|
Printing multi-byte text |new-print-multi-byte| Printing multi-byte text |new-print-multi-byte|
Extended Unicode support |new-more-unicode|
Highlighting matching parens |new-matchparen| Highlighting matching parens |new-matchparen|
Translated manual pages |new-manpage-trans| Translated manual pages |new-manpage-trans|
Internal grep |new-vimgrep| Internal grep |new-vimgrep|
@ -234,6 +235,23 @@ The 'printmbcharset' and 'printmbfont' options are used for this.
Also see |postscript-cjk-printing|. (Mike Williams) Also see |postscript-cjk-printing|. (Mike Williams)
Extended Unicode support *new-more-unicode*
------------------------
Previously only two combining characters were displayed. The limit is now
raised to 6. This can be set with the 'maxcombine' option. The default is
still 2.
|ga| now shows all combining characters, not just the first two.
Previously only 16 bit Unicode characters were supported for displaying. Now
the full 32 bit character set can be used. Unless manually disabled at
compile time.
For pattern matching it is now possible to search for individual composing
characters. |patterns-composing|
Highlighting matching parens *new-matchparen* Highlighting matching parens *new-matchparen*
---------------------------- ----------------------------
@ -1090,13 +1108,6 @@ Dropped the support for the BeOS and Amiga GUI. They were not maintained and
probably didn't work. If you want to work on this: get the Vim 6.x version probably didn't work. If you want to work on this: get the Vim 6.x version
and merge it back in. and merge it back in.
Mac: "make" now creates the Vim.app directory and "make install" copies it to
its final destination. (Raf)
Mac: Made it possible to compile with Motif, Athena or GTK without tricks and
still being able to use the MacRoman conversion. Added the os_mac_conv.c
file.
When running the tests and one of them fails to produce "test.out" the When running the tests and one of them fails to produce "test.out" the
following tests are still executed. This helps when running out of memory. following tests are still executed. This helps when running out of memory.
@ -1114,13 +1125,34 @@ functions.
Moved unix_expandpath() to misc1.c, so that it can also be used by os_mac.c Moved unix_expandpath() to misc1.c, so that it can also be used by os_mac.c
without copying the code. without copying the code.
Mac: When running "make install" the runtime files are installed as for Unix. --- Mac ---
"make" now creates the Vim.app directory and "make install" copies it to its
final destination. (Raf)
Made it possible to compile with Motif, Athena or GTK without tricks and still
being able to use the MacRoman conversion. Added the os_mac_conv.c file.
When running "make install" the runtime files are installed as for Unix.
Avoids that too many files are copied. When running "make" a link to the Avoids that too many files are copied. When running "make" a link to the
runtime files is created to avoid a recursive copy that takes much time. runtime files is created to avoid a recursive copy that takes much time.
Mac: Configure will attempt to build Vim for both Intel and PowerPC. The Configure will attempt to build Vim for both Intel and PowerPC. The
--with-mac-arch configure argument can change it. --with-mac-arch configure argument can change it.
--- Win32 ---
The Make_mvc.mak file was adjusted to work with the latest MS compilers,
including the free version of Visual Studio 2005. (George Reilly)
INSTALLpc.txt was updated for the recent changes. (George Reilly)
The distributed executable is now produced with the free Visual C++ Toolkit
2003 and other free SDK chunks. msvcsetup.bat was added to support this.
Also generate the .pdb file that can be used to generate a useful crash report
on MS-Windows. (George Reilly)
============================================================================== ==============================================================================
BUG FIXES *bug-fixes-7* BUG FIXES *bug-fixes-7*
@ -1818,4 +1850,16 @@ When using Select mode from Insert mode and typing a key, causing lines to be
deleted and a message displayed, delayed the effect of inserting the key. deleted and a message displayed, delayed the effect of inserting the key.
Now overwrite the message without delay. Now overwrite the message without delay.
When 'whichwrap' includes "l" then "dl" and "yl" on a single letter line
worked differently. Now recognize all operators when using "l" at the end of
a line.
GTK GUI: when the font selector returned a font name with a comma in it then
it would be handled like two font names. Now put a backslash before the
comma.
MS-DOS, Win32: When 'encoding' defaults to "latin1" then the value for
'iskeyword' was still for CPxxx. And when 'nocompatible' was set 'isprint'
would also be the wrong value.
vim:tw=78:ts=8:ft=help:norl: vim:tw=78:ts=8:ft=help:norl:

View File

@ -1,7 +1,7 @@
" Vim support file to detect file types " Vim support file to detect file types
" "
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Mar 01 " Last Change: 2006 Mar 05
" Listen very carefully, I will say this only once " Listen very carefully, I will say this only once
if exists("did_load_filetypes") if exists("did_load_filetypes")
@ -1298,7 +1298,7 @@ au BufNewFile,BufRead *.rexx,*.rex setf rexx
au BufNewFile,BufRead *.s,*.S setf r au BufNewFile,BufRead *.s,*.S setf r
" R Help file " R Help file
au BufNewFile,BufRead *.rd,*.Rd setf rd au BufNewFile,BufRead *.rd,*.Rd setf rhelp
" Rexx, Rebol or R " Rexx, Rebol or R
au BufNewFile,BufRead *.r,*.R call s:FTr() au BufNewFile,BufRead *.r,*.R call s:FTr()

View File

@ -51,6 +51,11 @@ if exists("loaded_matchit")
endif endif
" ### " ###
if exists('&ofu')
setlocal ofu=phpcomplete#CompletePHP
endif
setlocal commentstring=/*%s*/ setlocal commentstring=/*%s*/
" Undo the stuff we changed. " Undo the stuff we changed.

View File

@ -2,7 +2,7 @@
" Maintainer: Georg Dahn <gorgyd@yahoo.co.uk> " Maintainer: Georg Dahn <gorgyd@yahoo.co.uk>
" Originally By: Marcin Dalecki <dalecki@cs.net.pl> " Originally By: Marcin Dalecki <dalecki@cs.net.pl>
" Johannes Zellner <johannes@zellner.org> " Johannes Zellner <johannes@zellner.org>
" Last Change: Sun, 17 Apr 2005 18:28:58 CEST " Last Change: Sun, 5 Mar 2006 07:20:00 CEST
" vim:set foldmethod=marker tabstop=8: " vim:set foldmethod=marker tabstop=8:
" Quit when menu translations have already been done. " Quit when menu translations have already been done.
@ -21,6 +21,7 @@ endif
menutrans &File &Datei menutrans &File &Datei
menutrans &Open\.\.\.<Tab>:e &Öffnen\.\.\.<Tab>:e menutrans &Open\.\.\.<Tab>:e &Öffnen\.\.\.<Tab>:e
menutrans Sp&lit-Open\.\.\.<Tab>:sp In\ geteiltem\ &Fenster\ Öffnen\.\.\.<Tab>:sp menutrans Sp&lit-Open\.\.\.<Tab>:sp In\ geteiltem\ &Fenster\ Öffnen\.\.\.<Tab>:sp
menutrans Open\ Tab\.\.\.<Tab>:tabnew In\ neuem\ &Tab\ Öffnen\.\.\.<Tab>:tabnew
menutrans &New<Tab>:enew &Neue\ Datei<Tab>:enew menutrans &New<Tab>:enew &Neue\ Datei<Tab>:enew
menutrans &Close<Tab>:close S&chließen<Tab>:close menutrans &Close<Tab>:close S&chließen<Tab>:close
menutrans &Save<Tab>:w &Speichern<Tab>:w menutrans &Save<Tab>:w &Speichern<Tab>:w
@ -100,6 +101,22 @@ menutrans &Keymap &Tastatur-Belegung
" }}} EDIT / EDITIEREN " }}} EDIT / EDITIEREN
" {{{ TOOLS / WERKZEUGE " {{{ TOOLS / WERKZEUGE
if has("syntax")
menutrans &Spelling &Rechtschreibung
menutrans &Spell\ Check\ On &Rechtschreibung\ an
menutrans Spell\ Check\ &Off Rechtschreibung\ &aus
menutrans To\ &Next\ error<Tab>]s Zum\ &nächsten\ Fehler<Tab>]s
menutrans To\ &Previous\ error<Tab>[s Zum\ &letzten\ Fehler<Tab>[s
menutrans Suggest\ &Corrections<Tab>z? &Korrekturvorschläge<Tab>z?
menutrans &Repeat\ correction<Tab>:spellrepall &Wiederhole\ Korrektur<Tab>:spellrepall
menutrans Set\ language\ to\ "en" Verwende\ Wörterbuch\ "en"
menutrans Set\ language\ to\ "en_au" Verwende\ Wörterbuch\ "en_au"
menutrans Set\ language\ to\ "en_ca" Verwende\ Wörterbuch\ "en_ca"
menutrans Set\ language\ to\ "en_gb" Verwende\ Wörterbuch\ "en_gb"
menutrans Set\ language\ to\ "en_nz" Verwende\ Wörterbuch\ "en_nz"
menutrans Set\ language\ to\ "en_us" Verwende\ Wörterbuch\ "en_us"
menutrans &Find\ More\ Languages &Suche\ nach\ Wörterbüchern
endif
if has("folding") if has("folding")
menutrans &Folding Fa&ltung menutrans &Folding Fa&ltung
" open close folds " open close folds
@ -147,7 +164,7 @@ menutrans &Older\ List<Tab>:cold &
menutrans N&ewer\ List<Tab>:cnew &Neuere\ Liste<Tab>:cnew menutrans N&ewer\ List<Tab>:cnew &Neuere\ Liste<Tab>:cnew
menutrans Error\ &Window Feh&ler-Fenster menutrans Error\ &Window Feh&ler-Fenster
menutrans &Set\ Compiler &Compiler menutrans Se&T\ Compiler &Compiler
menutrans &Update<Tab>:cwin &Aktualisieren<Tab>:cwin menutrans &Update<Tab>:cwin &Aktualisieren<Tab>:cwin
menutrans &Open<Tab>:copen &Öffnen<Tab>:copen menutrans &Open<Tab>:copen &Öffnen<Tab>:copen
menutrans &Close<Tab>:cclose &Schließen<Tab>:cclose menutrans &Close<Tab>:cclose &Schließen<Tab>:cclose
@ -184,7 +201,7 @@ menutrans [No\ File] [Keine\ Datei]
menutrans &Window &Ansicht menutrans &Window &Ansicht
menutrans &New<Tab>^Wn &Neu<Tab>^Wn menutrans &New<Tab>^Wn &Neu<Tab>^Wn
menutrans S&plit<Tab>^Ws Aufs&palten<Tab>^Ws menutrans S&plit<Tab>^Ws Aufs&palten<Tab>^Ws
menutrans Split\ &Vertically<Tab>^Wv &Vertikal\ Aufspalten<Tab>^Ws menutrans Split\ &Vertically<Tab>^Wv &Vertikal\ Aufspalten<Tab>^Wv
menutrans Split\ File\ E&xplorer Ver&zeichnis menutrans Split\ File\ E&xplorer Ver&zeichnis
menutrans Sp&lit\ To\ #<Tab>^W^^ Aufspa&lten\ in\ #<Tab>^W^^ menutrans Sp&lit\ To\ #<Tab>^W^^ Aufspa&lten\ in\ #<Tab>^W^^
menutrans &Close<Tab>^Wc &Schließen<Tab>^Wc menutrans &Close<Tab>^Wc &Schließen<Tab>^Wc
@ -228,6 +245,8 @@ menutrans &Paste &Einf
menutrans &Delete &Löschen menutrans &Delete &Löschen
menutrans Select\ Blockwise Auswahl\ Blockartig menutrans Select\ Blockwise Auswahl\ Blockartig
menutrans Select\ &Word Auswahl\ des\ &Wortes menutrans Select\ &Word Auswahl\ des\ &Wortes
menutrans Select\ &Sentence Auswahl\ des\ Sa&tzes
menutrans Select\ Pa&ragraph Auswahl\ des\ Absatzes
menutrans Select\ &Line Auswahl\ der\ &Zeile menutrans Select\ &Line Auswahl\ der\ &Zeile
menutrans Select\ &Block Auswahl\ des\ &Blocks menutrans Select\ &Block Auswahl\ des\ &Blocks
menutrans Select\ &All &Alles\ Auswählen menutrans Select\ &All &Alles\ Auswählen

View File

@ -2,7 +2,7 @@
" You can also use this as a start for your own set of menus. " You can also use this as a start for your own set of menus.
" "
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Feb 25 " Last Change: 2006 Mar 05
" Note that ":an" (short for ":anoremenu") is often used to make a menu work " Note that ":an" (short for ":anoremenu") is often used to make a menu work
" in all modes and avoid side effects from mappings defined by the user. " in all modes and avoid side effects from mappings defined by the user.
@ -419,7 +419,7 @@ if has("spell")
an 40.335.120 &Tools.&Spelling.Spell\ Check\ &Off :set nospell<CR> an 40.335.120 &Tools.&Spelling.Spell\ Check\ &Off :set nospell<CR>
an 40.335.130 &Tools.&Spelling.To\ &Next\ error<Tab>]s ]s an 40.335.130 &Tools.&Spelling.To\ &Next\ error<Tab>]s ]s
an 40.335.130 &Tools.&Spelling.To\ &Previous\ error<Tab>[s [s an 40.335.130 &Tools.&Spelling.To\ &Previous\ error<Tab>[s [s
an 40.335.140 &Tools.&Spelling.Suggest\ &Corrections<Tab>z? z? an 40.335.140 &Tools.&Spelling.Suggest\ &Corrections<Tab>z= z=
an 40.335.150 &Tools.&Spelling.&Repeat\ correction<Tab>:spellrepall :spellrepall<CR> an 40.335.150 &Tools.&Spelling.&Repeat\ correction<Tab>:spellrepall :spellrepall<CR>
an 40.335.200 &Tools.&Spelling.-SEP1- <Nop> an 40.335.200 &Tools.&Spelling.-SEP1- <Nop>
an 40.335.210 &Tools.&Spelling.Set\ language\ to\ "en" :set spl=en spell<CR> an 40.335.210 &Tools.&Spelling.Set\ language\ to\ "en" :set spl=en spell<CR>

View File

@ -1,7 +1,7 @@
" These commands create the option window. " These commands create the option window.
" "
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Jan 13 " Last Change: 2006 Mar 05
" If there already is an option window, jump to that one. " If there already is an option window, jump to that one.
if bufwinnr("option-window") > 0 if bufwinnr("option-window") > 0
@ -463,6 +463,17 @@ if has("scrollbind")
endif endif
call <SID>Header("multiple tab pages")
call append("$", "showtabline\t0, 1 or 2; when to use a tab pages line")
call append("$", " \tset stal=" . &stal)
call append("$", "tabpagemax\tmaximum number of tab pages to open for -p and \"tab all\"")
call append("$", " \tset tpm=" . &tpm)
call append("$", "tabline\tcustom tab pages line")
call <SID>OptionG("tal", &tal)
call append("$", "guitablabel\tcustom tab page label for the GUI")
call <SID>OptionG("gtl", &gtl)
call <SID>Header("terminal") call <SID>Header("terminal")
call append("$", "term\tname of the used terminal") call append("$", "term\tname of the used terminal")
call <SID>OptionG("term", &term) call <SID>OptionG("term", &term)
@ -697,6 +708,11 @@ call <SID>OptionL("fo")
call append("$", "formatlistpat\tpattern to recognize a numbered list") call append("$", "formatlistpat\tpattern to recognize a numbered list")
call append("$", "\t(local to buffer)") call append("$", "\t(local to buffer)")
call <SID>OptionL("flp") call <SID>OptionL("flp")
if has("eval")
call append("$", "formatexpr\texpression used for \"gq\" to format lines")
call append("$", "\t(local to buffer)")
call <SID>OptionL("fex")
endif
if has("insert_expand") if has("insert_expand")
call append("$", "complete\tspecifies how Insert mode completion works for CTRL-N and CTRL-P") call append("$", "complete\tspecifies how Insert mode completion works for CTRL-N and CTRL-P")
call append("$", "\t(local to buffer)") call append("$", "\t(local to buffer)")

View File

@ -2,7 +2,7 @@
" "
" Language: Logtalk " Language: Logtalk
" Maintainer: Paulo Moura <pmoura@logtalk.org> " Maintainer: Paulo Moura <pmoura@logtalk.org>
" Last Change: June 6, 2005 " Last Change: February 24, 2006
" Quit when a syntax file was already loaded: " Quit when a syntax file was already loaded:
@ -89,6 +89,14 @@ syn region logtalkDir matchgroup=logtalkDirTag start=":- calls(" matchgroup=lo
syn region logtalkDir matchgroup=logtalkDirTag start=":- uses(" matchgroup=logtalkDirTag end=")\." contains=ALL syn region logtalkDir matchgroup=logtalkDirTag start=":- uses(" matchgroup=logtalkDirTag end=")\." contains=ALL
" Module directives
syn region logtalkDir matchgroup=logtalkDirTag start=":- module(" matchgroup=logtalkDirTag end=")\." contains=ALL
syn region logtalkDir matchgroup=logtalkDirTag start=":- export(" matchgroup=logtalkDirTag end=")\." contains=ALL
syn region logtalkDir matchgroup=logtalkDirTag start=":- meta_predicate(" matchgroup=logtalkDirTag end=")\." contains=ALL
syn region logtalkDir matchgroup=logtalkDirTag start=":- use_module(" matchgroup=logtalkDirTag end=")\." contains=ALL
" Logtalk built-in predicates " Logtalk built-in predicates
syn match logtalkBuiltIn "\<\(abolish\|c\(reate\|urrent\)\)_\(object\|protocol\|category\)\ze(" syn match logtalkBuiltIn "\<\(abolish\|c\(reate\|urrent\)\)_\(object\|protocol\|category\)\ze("
@ -129,6 +137,7 @@ syn match logtalkBuiltInMethod "\<before\ze("
syn match logtalkBuiltInMethod "\<after\ze(" syn match logtalkBuiltInMethod "\<after\ze("
syn match logtalkBuiltInMethod "\<expand_term\ze(" syn match logtalkBuiltInMethod "\<expand_term\ze("
syn match logtalkBuiltInMethod "\<term_expansion\ze("
syn match logtalkBuiltInMethod "\<phrase\ze(" syn match logtalkBuiltInMethod "\<phrase\ze("

View File

@ -1,162 +0,0 @@
" Vim syntax file
" Language: R Help File
" Maintainer: Johannes Ranke <jranke@uni-bremen.de>
" Last Change: 2006 Mär 01
" Version: 0.5
" Remarks: - Now includes R syntax highlighting in the appropriate
" sections if an r.vim file is in the same directory or in the
" default debian location.
" - I didn't yet include any special markup for S4 methods.
" - The two versions of \item{}{} markup are not
" distinguished (in the \arguments{} environment, the items to
" be described are R identifiers, but not in the \describe{}
" environment).
" - There is no Latex markup in equations
" Version Clears: {{{1
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syn case match
" Rd identifiers {{{
syn region rdIdentifier matchgroup=rdSection start="\\name{" end="}"
syn region rdIdentifier matchgroup=rdSection start="\\alias{" end="}"
syn region rdIdentifier matchgroup=rdSection start="\\pkg{" end="}"
syn region rdIdentifier matchgroup=rdSection start="\\item{" end="}" contained
syn region rdIdentifier matchgroup=rdSection start="\\method{" end=/}/ contained
" Highlighting of R code using an existing r.vim syntax file if available {{{1
let s:syntaxdir = expand("<sfile>:p:h") "look in the directory of this file
let s:rsyntax = s:syntaxdir . "/r.vim"
if filereadable(s:rsyntax)
syn include @R <sfile>:p:h/r.vim
elseif filereadable('/usr/share/vim/vim64/syntax/r.vim') "and debian location
syn include @R /usr/share/vim/vimcurrent/syntax/r.vim
else
syn match rdRComment /\#.*/ "if no r.vim is found, do comments
syn cluster R contains=rdRComment
endif
syn region rdRcode matchgroup=Delimiter start="\\examples{" matchgroup=Delimiter transparent end=/}/ contains=@R,rdSection
syn region rdRcode matchgroup=Delimiter start="\\usage{" matchgroup=Delimiter transparent end=/}/ contains=@R,rdIdentifier
syn region rdRcode matchgroup=Delimiter start="\\synopsis{" matchgroup=Delimiter transparent end=/}/ contains=@R
syn region rdRcode matchgroup=Delimiter start="\\special{" matchgroup=Delimiter transparent end=/}/ contains=@R contained
syn region rdRcode matchgroup=Delimiter start="\\code{" matchgroup=Delimiter transparent end=/}/ contains=@R contained
" Strings {{{1
syn region rdString start=/"/ end=/"/
" Special TeX characters ( \$ \& \% \# \{ \} \_) {{{1
syn match rdSpecialChar "\\[$&%#{}_]"
" Special Delimiters {{{1
syn match rdDelimiter "\\cr"
syn match rdDelimiter "\\tab "
" Keywords {{{1
syn match rdKeyword "\\R"
syn match rdKeyword "\\dots"
syn match rdKeyword "\\ldots"
" Links {{{1
syn region rdLink matchgroup=rdSection start="\\link{" end="}" contained keepend
syn region rdLink matchgroup=rdSection start="\\link\[.*\]{" end="}" contained keepend
" Type Styles {{{1
syn match rdType "\\emph\>"
syn match rdType "\\strong\>"
syn match rdType "\\bold\>"
syn match rdType "\\sQuote\>"
syn match rdType "\\dQuote\>"
syn match rdType "\\code\>"
syn match rdType "\\preformatted\>"
syn match rdType "\\kbd\>"
syn match rdType "\\samp\>"
syn match rdType "\\eqn\>"
syn match rdType "\\deqn\>"
syn match rdType "\\file\>"
syn match rdType "\\email\>"
syn match rdType "\\url\>"
syn match rdType "\\var\>"
syn match rdType "\\env\>"
syn match rdType "\\option\>"
syn match rdType "\\command\>"
syn match rdType "\\dfn\>"
syn match rdType "\\cite\>"
syn match rdType "\\acronym\>"
" Rd sections {{{1
syn match rdSection "\\encoding\>"
syn match rdSection "\\title\>"
syn match rdSection "\\description\>"
syn match rdSection "\\concept\>"
syn match rdSection "\\arguments\>"
syn match rdSection "\\details\>"
syn match rdSection "\\value\>"
syn match rdSection "\\references\>"
syn match rdSection "\\note\>"
syn match rdSection "\\author\>"
syn match rdSection "\\seealso\>"
syn match rdSection "\\keyword\>"
syn match rdSection "\\docType\>"
syn match rdSection "\\format\>"
syn match rdSection "\\source\>"
syn match rdSection "\\itemize\>"
syn match rdSection "\\describe\>"
syn match rdSection "\\enumerate\>"
syn match rdSection "\\item "
syn match rdSection "\\item$"
syn match rdSection "\\tabular{[lcr]*}"
syn match rdSection "\\dontrun\>"
syn match rdSection "\\dontshow\>"
syn match rdSection "\\testonly\>"
" Freely named Sections {{{1
syn region rdFreesec matchgroup=Delimiter start="\\section{" matchgroup=Delimiter transparent end=/}/
" Rd comments {{{1
syn match rdComment /%.*$/ contained
" Error {{{1
syn region rdRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rdError,rdBraceError,rdCurlyError
syn region rdRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rdError,rdBraceError,rdParenError
syn region rdRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rdError,rdCurlyError,rdParenError
syn match rdError /[)\]}]/
syn match rdBraceError /[)}]/ contained
syn match rdCurlyError /[)\]]/ contained
syn match rdParenError /[\]}]/ contained
" Define the default highlighting {{{1
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_rd_syntax_inits")
if version < 508
let did_rd_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink rdIdentifier Identifier
HiLink rdString String
HiLink rdKeyword Keyword
HiLink rdLink Underlined
HiLink rdType Type
HiLink rdSection PreCondit
HiLink rdError Error
HiLink rdBraceError Error
HiLink rdCurlyError Error
HiLink rdParenError Error
HiLink rdDelimiter Delimiter
HiLink rdComment Comment
HiLink rdRComment Comment
HiLink rdSpecialChar SpecialChar
delcommand HiLink
endif
let b:current_syntax = "rd"
" vim: foldmethod=marker:

161
runtime/syntax/rhelp.vim Normal file
View File

@ -0,0 +1,161 @@
" Vim syntax file
" Language: R Help File
" Maintainer: Johannes Ranke <jranke@uni-bremen.de>
" Last Change: 2006 Mär 06
" Version: 0.5
" Remarks: - Now includes R syntax highlighting in the appropriate
" sections if an r.vim file is in the same directory or in the
" default debian location.
" - I didn't yet include any special markup for S4 methods.
" - The two versions of \item{}{} markup are not
" distinguished (in the \arguments{} environment, the items to
" be described are R identifiers, but not in the \describe{}
" environment).
" - There is no Latex markup in equations
" Version Clears: {{{1
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syn case match
" Rd identifiers {{{
syn region rhelpIdentifier matchgroup=rhelpSection start="\\name{" end="}"
syn region rhelpIdentifier matchgroup=rhelpSection start="\\alias{" end="}"
syn region rhelpIdentifier matchgroup=rhelpSection start="\\pkg{" end="}"
syn region rhelpIdentifier matchgroup=rhelpSection start="\\item{" end="}" contained
syn region rhelpIdentifier matchgroup=rhelpSection start="\\method{" end=/}/ contained
" Highlighting of R code using an existing r.vim syntax file if available {{{1
let s:syntaxdir = expand("<sfile>:p:h") "look in the directory of this file
let s:rsyntax = s:syntaxdir . "/r.vim"
if filereadable(s:rsyntax)
syn include @R <sfile>:p:h/r.vim
elseif filereadable('/usr/share/vim/vim64/syntax/r.vim') "and debian location
syn include @R /usr/share/vim/vimcurrent/syntax/r.vim
else
syn match rhelpRComment /\#.*/ "if no r.vim is found, do comments
syn cluster R contains=rhelpRComment
endif
syn region rhelpRcode matchgroup=Delimiter start="\\examples{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpSection
syn region rhelpRcode matchgroup=Delimiter start="\\usage{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpIdentifier
syn region rhelpRcode matchgroup=Delimiter start="\\synopsis{" matchgroup=Delimiter transparent end=/}/ contains=@R
syn region rhelpRcode matchgroup=Delimiter start="\\special{" matchgroup=Delimiter transparent end=/}/ contains=@R contained
syn region rhelpRcode matchgroup=Delimiter start="\\code{" matchgroup=Delimiter transparent end=/}/ contains=@R contained
" Strings {{{1
syn region rhelpString start=/"/ end=/"/
" Special TeX characters ( \$ \& \% \# \{ \} \_) {{{1
syn match rhelpSpecialChar "\\[$&%#{}_]"
" Special Delimiters {{{1
syn match rhelpDelimiter "\\cr"
syn match rhelpDelimiter "\\tab "
" Keywords {{{1
syn match rhelpKeyword "\\R"
syn match rhelpKeyword "\\dots"
syn match rhelpKeyword "\\ldots"
" Links {{{1
syn region rhelpLink matchgroup=rhelpSection start="\\link{" end="}" contained keepend
syn region rhelpLink matchgroup=rhelpSection start="\\link\[.*\]{" end="}" contained keepend
" Type Styles {{{1
syn match rhelpType "\\emph\>"
syn match rhelpType "\\strong\>"
syn match rhelpType "\\bold\>"
syn match rhelpType "\\sQuote\>"
syn match rhelpType "\\dQuote\>"
syn match rhelpType "\\preformatted\>"
syn match rhelpType "\\kbd\>"
syn match rhelpType "\\samp\>"
syn match rhelpType "\\eqn\>"
syn match rhelpType "\\deqn\>"
syn match rhelpType "\\file\>"
syn match rhelpType "\\email\>"
syn match rhelpType "\\url\>"
syn match rhelpType "\\var\>"
syn match rhelpType "\\env\>"
syn match rhelpType "\\option\>"
syn match rhelpType "\\command\>"
syn match rhelpType "\\dfn\>"
syn match rhelpType "\\cite\>"
syn match rhelpType "\\acronym\>"
" rhelp sections {{{1
syn match rhelpSection "\\encoding\>"
syn match rhelpSection "\\title\>"
syn match rhelpSection "\\description\>"
syn match rhelpSection "\\concept\>"
syn match rhelpSection "\\arguments\>"
syn match rhelpSection "\\details\>"
syn match rhelpSection "\\value\>"
syn match rhelpSection "\\references\>"
syn match rhelpSection "\\note\>"
syn match rhelpSection "\\author\>"
syn match rhelpSection "\\seealso\>"
syn match rhelpSection "\\keyword\>"
syn match rhelpSection "\\docType\>"
syn match rhelpSection "\\format\>"
syn match rhelpSection "\\source\>"
syn match rhelpSection "\\itemize\>"
syn match rhelpSection "\\describe\>"
syn match rhelpSection "\\enumerate\>"
syn match rhelpSection "\\item "
syn match rhelpSection "\\item$"
syn match rhelpSection "\\tabular{[lcr]*}"
syn match rhelpSection "\\dontrun\>"
syn match rhelpSection "\\dontshow\>"
syn match rhelpSection "\\testonly\>"
" Freely named Sections {{{1
syn region rhelpFreesec matchgroup=Delimiter start="\\section{" matchgroup=Delimiter transparent end=/}/
" Rd comments {{{1
syn match rhelpComment /%.*$/ contained
" Error {{{1
syn region rhelpRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rhelpError,rhelpBraceError,rhelpCurlyError
syn region rhelpRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rhelpError,rhelpBraceError,rhelpParenError
syn region rhelpRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rhelpError,rhelpCurlyError,rhelpParenError
syn match rhelpError /[)\]}]/
syn match rhelpBraceError /[)}]/ contained
syn match rhelpCurlyError /[)\]]/ contained
syn match rhelpParenError /[\]}]/ contained
" Define the default highlighting {{{1
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_rhelp_syntax_inits")
if version < 508
let did_rhelp_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink rhelpIdentifier Identifier
HiLink rhelpString String
HiLink rhelpKeyword Keyword
HiLink rhelpLink Underlined
HiLink rhelpType Type
HiLink rhelpSection PreCondit
HiLink rhelpError Error
HiLink rhelpBraceError Error
HiLink rhelpCurlyError Error
HiLink rhelpParenError Error
HiLink rhelpDelimiter Delimiter
HiLink rhelpComment Comment
HiLink rhelpRComment Comment
HiLink rhelpSpecialChar SpecialChar
delcommand HiLink
endif
let b:current_syntax = "rhelp"
" vim: foldmethod=marker:

View File

@ -2,7 +2,7 @@
" This is a GENERATED FILE. Please always refer to source file at the URI below. " This is a GENERATED FILE. Please always refer to source file at the URI below.
" Language: OpenSSH server configuration file (ssh_config) " Language: OpenSSH server configuration file (ssh_config)
" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> " Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
" Last Change: 2003-05-06 " Last Change: 2006-03-05
" URL: http://trific.ath.cx/Ftp/vim/syntax/sshconfig.vim " URL: http://trific.ath.cx/Ftp/vim/syntax/sshconfig.vim
" Setup " Setup
@ -30,7 +30,8 @@ syn keyword sshconfigTodo TODO FIXME NOT contained
syn keyword sshconfigYesNo yes no ask syn keyword sshconfigYesNo yes no ask
syn keyword sshconfigCipher blowfish des 3des syn keyword sshconfigCipher blowfish des 3des
syn keyword sshconfigCipher aes128-cbc 3des-cbc blowfish-cbc cast128-cbc syn keyword sshconfigCipher aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
syn keyword sshconfigCipher arcfour aes192-cbc aes256-cbc syn keyword sshconfigCipher aes192-cbc aes256-cbc aes128-ctr aes256-ctr
syn keyword sshconfigCipher arcfour arcfour128 arcfour256 cast128-cbc
syn keyword sshconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96 syn keyword sshconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96
syn keyword sshconfigMAC hmac-md5-96 syn keyword sshconfigMAC hmac-md5-96
syn keyword sshconfigHostKeyAlg ssh-rsa ssh-dss syn keyword sshconfigHostKeyAlg ssh-rsa ssh-dss
@ -48,24 +49,29 @@ syn match sshconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}[:/]\d\+\>"
" Keywords " Keywords
syn keyword sshconfigHostSect Host syn keyword sshconfigHostSect Host
syn keyword sshconfigKeyword AFSTokenPassing BatchMode BindAddress syn keyword sshconfigKeyword AddressFamily BatchMode BindAddress
syn keyword sshconfigKeyword ChallengeResponseAuthentication CheckHostIP syn keyword sshconfigKeyword ChallengeResponseAuthentication CheckHostIP
syn keyword sshconfigKeyword Cipher Ciphers ClearAllForwardings Compression syn keyword sshconfigKeyword Cipher Ciphers ClearAllForwardings
syn keyword sshconfigKeyword CompressionLevel ConnectionAttempts syn keyword sshconfigKeyword Compression CompressionLevel ConnectTimeout
syn keyword sshconfigKeyword DynamicForward EscapeChar ForwardAgent ForwardX11 syn keyword sshconfigKeyword ConnectionAttempts ControlMaster
syn keyword sshconfigKeyword GatewayPorts GlobalKnownHostsFile syn keyword sshconfigKeyword ControlPath DynamicForward EnableSSHKeysign
syn keyword sshconfigKeyword HostbasedAuthentication HostKeyAlgorithms syn keyword sshconfigKeyword EscapeChar ForwardAgent ForwardX11
syn keyword sshconfigKeyword HostKeyAlias HostName IdentityFile KeepAlive syn keyword sshconfigKeyword ForwardX11Trusted GSSAPIAuthentication
syn keyword sshconfigKeyword KerberosAuthentication KerberosTgtPassing syn keyword sshconfigKeyword GSSAPIDelegateCredentials GatewayPorts
syn keyword sshconfigKeyword LocalForward LogLevel MACs syn keyword sshconfigKeyword GlobalKnownHostsFile HostKeyAlgorithms
syn keyword sshconfigKeyword NoHostAuthenticationForLocalhost syn keyword sshconfigKeyword HashKnownHosts KbdInteractiveDevices
syn keyword sshconfigKeyword HostKeyAlias HostName HostbasedAuthentication
syn keyword sshconfigKeyword IdentitiesOnly IdentityFile LocalForward
syn keyword sshconfigKeyword LogLevel MACs NoHostAuthenticationForLocalhost
syn keyword sshconfigKeyword NumberOfPasswordPrompts PasswordAuthentication syn keyword sshconfigKeyword NumberOfPasswordPrompts PasswordAuthentication
syn keyword sshconfigKeyword Port PreferredAuthentications Protocol syn keyword sshconfigKeyword Port PreferredAuthentications Protocol
syn keyword sshconfigKeyword ProxyCommand PubkeyAuthentication RemoteForward syn keyword sshconfigKeyword ProxyCommand PubkeyAuthentication
syn keyword sshconfigKeyword RSAAuthentication RemoteForward
syn keyword sshconfigKeyword RhostsAuthentication RhostsRSAAuthentication syn keyword sshconfigKeyword RhostsAuthentication RhostsRSAAuthentication
syn keyword sshconfigKeyword RSAAuthentication SmartcardDevice syn keyword sshconfigKeyword SendEnv ServerAliveCountMax ServerAliveInterval
syn keyword sshconfigKeyword StrictHostKeyChecking UsePrivilegedPort User syn keyword sshconfigKeyword SmartcardDevice StrictHostKeyChecking
syn keyword sshconfigKeyword UserKnownHostsFile XAuthLocation syn keyword sshconfigKeyword TCPKeepAlive UsePrivilegedPort User
syn keyword sshconfigKeyword UserKnownHostsFile VerifyHostKeyDNS XAuthLocation
" Define the default highlighting " Define the default highlighting
if version >= 508 || !exists("did_sshconfig_syntax_inits") if version >= 508 || !exists("did_sshconfig_syntax_inits")

View File

@ -2,7 +2,7 @@
" This is a GENERATED FILE. Please always refer to source file at the URI below. " This is a GENERATED FILE. Please always refer to source file at the URI below.
" Language: OpenSSH server configuration file (sshd_config) " Language: OpenSSH server configuration file (sshd_config)
" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> " Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
" Last Change: 2003-05-06 " Last Change: 2006-03-05
" URL: http://trific.ath.cx/Ftp/vim/syntax/sshdconfig.vim " URL: http://trific.ath.cx/Ftp/vim/syntax/sshdconfig.vim
" Setup " Setup
@ -29,8 +29,8 @@ syn keyword sshdconfigTodo TODO FIXME NOT contained
" Constants " Constants
syn keyword sshdconfigYesNo yes no syn keyword sshdconfigYesNo yes no
syn keyword sshdconfigCipher aes128-cbc 3des-cbc blowfish-cbc cast128-cbc syn keyword sshdconfigCipher aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
syn keyword sshdconfigCipher aes192-cbc aes256-cbc syn keyword sshdconfigCipher aes192-cbc aes256-cbc aes128-ctr aes256-ctr
syn keyword sshdconfigCipher arcfour syn keyword sshdconfigCipher arcfour arcfour128 arcfour256 cast128-cbc
syn keyword sshdconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96 syn keyword sshdconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96
syn keyword sshdconfigMAC hmac-md5-96 syn keyword sshdconfigMAC hmac-md5-96
syn keyword sshdconfigRootLogin without-password forced-commands-only syn keyword sshdconfigRootLogin without-password forced-commands-only
@ -46,27 +46,33 @@ syn match sshdconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}:\d\+\>"
syn match sshdconfigTime "\<\(\d\+[sSmMhHdDwW]\)\+\>" syn match sshdconfigTime "\<\(\d\+[sSmMhHdDwW]\)\+\>"
" Keywords " Keywords
syn keyword sshdconfigKeyword AFSTokenPassing AllowGroups AllowTcpForwarding syn keyword sshdconfigKeyword AcceptEnv AddressFamily
syn keyword sshdconfigKeyword AllowGroups AllowTcpForwarding
syn keyword sshdconfigKeyword AllowUsers AuthorizedKeysFile Banner syn keyword sshdconfigKeyword AllowUsers AuthorizedKeysFile Banner
syn keyword sshdconfigKeyword ChallengeResponseAuthentication Ciphers syn keyword sshdconfigKeyword ChallengeResponseAuthentication
syn keyword sshdconfigKeyword ClientAliveInterval ClientAliveCountMax syn keyword sshdconfigKeyword Ciphers ClientAliveCountMax
syn keyword sshdconfigKeyword Compression DenyGroups DenyUsers GatewayPorts syn keyword sshdconfigKeyword ClientAliveInterval Compression
syn keyword sshdconfigKeyword HostbasedAuthentication HostKey IgnoreRhosts syn keyword sshdconfigKeyword DenyGroups DenyUsers GSSAPIAuthentication
syn keyword sshdconfigKeyword IgnoreUserKnownHosts KeepAlive syn keyword sshdconfigKeyword GSSAPICleanupCredentials GatewayPorts
syn keyword sshdconfigKeyword HostKey HostbasedAuthentication
syn keyword sshdconfigKeyword IgnoreRhosts IgnoreUserKnownHosts
syn keyword sshdconfigKeyword KerberosAuthentication KerberosOrLocalPasswd syn keyword sshdconfigKeyword KerberosAuthentication KerberosOrLocalPasswd
syn keyword sshdconfigKeyword KerberosTgtPassing KerberosTicketCleanup syn keyword sshdconfigKeyword KerberosTgtPassing KerberosTicketCleanup
syn keyword sshdconfigKeyword KerberosGetAFSToken
syn keyword sshdconfigKeyword KeyRegenerationInterval ListenAddress syn keyword sshdconfigKeyword KeyRegenerationInterval ListenAddress
syn keyword sshdconfigKeyword LoginGraceTime LogLevel MACs MaxStartups syn keyword sshdconfigKeyword LogLevel LoginGraceTime MACs MaxAuthTries
syn keyword sshdconfigKeyword PAMAuthenticationViaKbdInt syn keyword sshdconfigKeyword MaxStartups PasswordAuthentication
syn keyword sshdconfigKeyword PasswordAuthentication PermitEmptyPasswords syn keyword sshdconfigKeyword PermitEmptyPasswords PermitRootLogin
syn keyword sshdconfigKeyword PermitRootLogin PermitUserEnvironment PidFile syn keyword sshdconfigKeyword PermitUserEnvironment PidFile Port
syn keyword sshdconfigKeyword Port PrintLastLog PrintMotd Protocol syn keyword sshdconfigKeyword PrintLastLog PrintMotd Protocol
syn keyword sshdconfigKeyword PubkeyAuthentication RhostsAuthentication syn keyword sshdconfigKeyword PubkeyAuthentication RSAAuthentication
syn keyword sshdconfigKeyword RhostsRSAAuthentication RSAAuthentication syn keyword sshdconfigKeyword RhostsAuthentication RhostsRSAAuthentication
syn keyword sshdconfigKeyword ServerKeyBits StrictModes Subsystem syn keyword sshdconfigKeyword ServerKeyBits StrictModes Subsystem
syn keyword sshdconfigKeyword SyslogFacility UseLogin UsePrivilegeSeparation syn keyword sshdconfigKeyword ShowPatchLevel
syn keyword sshdconfigKeyword VerifyReverseMapping X11DisplayOffset syn keyword sshdconfigKeyword SyslogFacility TCPKeepAlive UseDNS
syn keyword sshdconfigKeyword X11Forwarding X11UseLocalhost XAuthLocation syn keyword sshdconfigKeyword UseLogin UsePAM UsePrivilegeSeparation
syn keyword sshdconfigKeyword X11DisplayOffset X11Forwarding
syn keyword sshdconfigKeyword X11UseLocalhost XAuthLocation
" Define the default highlighting " Define the default highlighting
if version >= 508 || !exists("did_sshdconfig_syntax_inits") if version >= 508 || !exists("did_sshdconfig_syntax_inits")

View File

@ -16,8 +16,9 @@ all: gvimext.dll
gvimext.dll: gvimext.obj \ gvimext.dll: gvimext.obj \
gvimext.res gvimext.res
$(implib) /NOLOGO -machine:$(CPU) -def:gvimext.def $** -out:gvimext.lib # $(implib) /NOLOGO -machine:$(CPU) -def:gvimext.def $** -out:gvimext.lib
$(link) $(dlllflags) -base:0x1C000000 -out:$*.dll $** $(olelibsdll) shell32.lib gvimext.lib comctl32.lib gvimext.exp # $(link) $(dlllflags) -base:0x1C000000 -out:$*.dll $** $(olelibsdll) shell32.lib gvimext.lib comctl32.lib gvimext.exp
$(link) $(lflags) -dll -def:gvimext.def -base:0x1C000000 -out:$*.dll $** $(olelibsdll) shell32.lib comctl32.lib
gvimext.obj: gvimext.h gvimext.obj: gvimext.h

View File

@ -33,6 +33,12 @@
#define INC_OLE2 // WIN32, get ole2 from windows.h #define INC_OLE2 // WIN32, get ole2 from windows.h
/* Visual Studio 2005 has 'deprecated' many of the standard CRT functions */
#if _MSC_VER >= 1400
# define _CRT_SECURE_NO_DEPRECATE
# define _CRT_NONSTDC_NO_DEPRECATE
#endif
#include <windows.h> #include <windows.h>
#include <windowsx.h> #include <windowsx.h>
#include <shlobj.h> #include <shlobj.h>

View File

@ -8,7 +8,7 @@
// Generated from the TEXTINCLUDE 2 resource. // Generated from the TEXTINCLUDE 2 resource.
// //
#ifndef __BORLANDC__ #ifndef __BORLANDC__
# include "afxres.h" # include "winresrc.h"
#endif #endif
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////

View File

@ -3,7 +3,7 @@ INSTALLpc.txt - Installation of Vim on PC
This file contains instructions for compiling Vim. If you already have an This file contains instructions for compiling Vim. If you already have an
executable version of Vim, you don't need this. executable version of Vim, you don't need this.
More information can be found here: More information can be found here: (Very stale now.)
http://mywebpage.netscape.com/sharppeople/vim/howto/ http://mywebpage.netscape.com/sharppeople/vim/howto/
@ -11,19 +11,331 @@ The file "feature.h" can be edited to match your preferences. You can skip
this, then you will get the default behavior as is documented, which should this, then you will get the default behavior as is documented, which should
be fine for most people. be fine for most people.
With the exception of the last two sections (Windows 3.1 and MS-DOS),
this document assumes that you are building Vim for Win32
(Windows NT/2000/XP/2003/Vista and Windows 95/98/Me)
Contents: Contents:
1. MS-DOS 1. Microsoft Visual C++
2. Win32 (Windows XP/NT and Windows 95/98) 2. Using MinGW
3. Windows NT with OpenNT 3. Cygwin
4. Windows 3.1 4. Borland
5. Using Mingw 5. Cross compiling for Win32 from a Linux machine
6. Cross compiling for Win32 from a Linux machine 6. Building with Python support
7. Building with Python support 7. Building with MzScheme support
8. Building with MzScheme support 8. Windows 3.1
9. MS-DOS
The currently preferred method is using the free Visual C++ Toolkit 2003.
1. MS-DOS 1. Microsoft Visual C++
=======================
Visual Studio
-------------
Building with Visual Studio (VS 98, VS .NET, VS .NET 2003, and VS .NET 2005)
is straightforward. (These instructions should also work for VS 4 and VS 5.)
To build Vim from the command line with MSVC, use Make_mvc.mak.
Visual Studio installed a batch file called vcvars32.bat, which you must
run to set up paths for nmake and MSVC.
nmake -f Make_mvc.mak console Win32 SDK or Microsoft Visual C++
nmake -f Make_mvc.mak GUI=yes GUI Microsoft Visual C++
nmake -f Make_mvc.mak OLE=yes OLE Microsoft Visual C++
nmake -f Make_mvc.mak PERL=C:\Perl PYTHON=C:\Python etc.
Perl, Python, etc.
Make_mvc.mak allows a Vim to be built with various different features and
debug support. Debugging with MS Devstudio is provided by Make_dvc.mak.
For a description of the use of Make_dvc.mak, look in Make_mvc.mak.
For compiling Gvim with IME support on far-east Windows, add IME=yes
to the parameters you pass to Make_mvc.mak.
To build Vim from within the Visual Studio IDE, open the Make_ivc.mak project.
(Note: Make_ivc.mak is not as rich as Make_mvc.mak, which allows for
far more configuration.) Make_ivc.mak can also be built with nmake.
nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim"
GUI Microsoft Visual C++ 4.x or later
nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim OLE"
OLE Microsoft Visual C++ 4.x or later
See the specific files for comments and options.
These files have been supplied by George V. Reilly, Ben Singer, Ken Scott and
Ron Aaron; they have been tested.
Visual C++ Toolkit 2003
-----------------------
You can download the Microsoft Visual C++ Toolkit 2003 from
http://msdn.microsoft.com/visualc/vctoolkit2003/
This contains the command-line tools (compiler, linker, CRT headers,
and libraries) for Visual Studio .NET 2003, but not the Visual Studio IDE.
To compile and debug Vim with the VC2003 Toolkit, you will also need
|ms-platform-sdk|, |dotnet-1.1-redist|, |dotnet-1.1-sdk|,
and |windbg-download|.
It's easier to download Visual C++ 2005 Express Edition, |msvc-2005-express|.
The advantage of the VC 2003 Toolkit is that it will be freely available
long after VC 2005 Express Edition stops being free in November 2006.
The free Code::Blocks IDE works with the VC2003 Toolkit, as described at
http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_Toolkit_2003_with_Code::Blocks_IDE
(This site also takes you through configuring a number of other
free C compilers for Win32.)
To compile Vim using the VC2003 Toolkit and Make_mvc.mak, you must first
execute the following commands in a cmd.exe window (the msvcsetup.bat batch
file can be used):
set PATH=%SystemRoot%\Microsoft.NET\Framework\v1.1.4322;%PATH%
call "%VCToolkitInstallDir%vcvars32.bat"
set MSVCVer=7.1
call "%ProgramFiles%\Microsoft Platform SDK\SetEnv.Cmd"
set LIB=%ProgramFiles%\Microsoft Visual Studio .NET 2003\Vc7\lib;%LIB%
Now you can build Vim with Make_mvc.mak.
Getting the Windows Platform SDK *ms-platform-sdk*
You will also need a copy of the Windows Platform SDK from
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
Specifically, you need the Windows Core SDK subset of the Platform SDK,
which contains the Windows headers and libraries.
Getting the .NET Framework 1.1 Runtime *dotnet-1.1-redist*
You need the .NET Framework 1.1 Redistributable Package from
http://www.microsoft.com/downloads/details.aspx?familyid=262d25e3-f589-4842-8157-034d1e7cf3a3
or from Windows Update:
http://windowsupdate.microsoft.com/
This is needed to install |dotnet-1.1-sdk|. It also contains cvtres.exe,
which is needed to link Vim.
Getting the .NET Framework 1.1 SDK *dotnet-1.1-sdk*
You need the .NET Framework 1.1 SDK from
http://www.microsoft.com/downloads/details.aspx?familyid=9b3a2ca6-3647-4070-9f41-a333c6b9181d
This contains some additional libraries needed to compile Vim,
such as msvcrt.lib. You must install |dotnet-1.1-redist| before
installing the .NET 1.1 SDK.
Getting the WinDbg debugger *windbg-download*
The Debugging Tools for Windows can be downloaded from
http://www.microsoft.com/whdc/devtools/debugging/default.mspx
This includes the WinDbg debugger, which you will want if you ever need
to debug Vim itself. An earlier version of the Debugging Tools
is also available through the Platform SDK, |ms-platform-sdk|.
Visual C++ 2005 Express Edition
-------------------------------
Visual C++ 2005 Express Edition can be downloaded for free
before November 2006 from
http://msdn.microsoft.com/vstudio/express/visualC/default.aspx
This includes the IDE and the debugger. You will also need
|ms-platform-sdk|. You can build Vim with Make_mvc.mak.
Instructions for integrating the Platform SDK into VC Express:
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx
2. MinGW
========
(written by Ron Aaron: <ronaharon@yahoo.com>)
This is about how to produce a Win32 binary of gvim with MinGW.
First, you need to get the 'mingw32' compiler, which is free for the download
at:
http://www.mingw.org/
Once you have downloaded the compiler binaries, unpack them on your hard disk
somewhere, and put them on your PATH. If you are on Win95/98 you can edit
your AUTOEXEC.BAT file with a line like:
set PATH=C:\GCC-2.95.2\BIN;%PATH%
or on NT/2000/XP, go to the Control Panel, (Performance and Maintenance),
System, Advanced, and edit the environment from there.
Test if gcc is on your path. From a CMD (or COMMAND on '95/98) window:
C:\> gcc --version
2.95.2
C:\> make --version
GNU Make version 3.77 (...etc...)
Now you are ready to rock 'n' roll. Unpack the vim sources (look on
www.vim.org for exactly which version of the vim files you need).
Change directory to 'vim\src':
C:\> cd vim\src
C:\VIM\SRC>
and you type:
make -f Make_ming.mak gvim.exe
After churning for a while, you will end up with 'gvim.exe' in the 'vim\src'
directory.
You should not need to do *any* editing of any files to get vim compiled this
way. If, for some reason, you want the console-mode-only version of vim (this
is NOT recommended on Win32, especially on '95/'98!!!), you need only change
the 'gvim.exe' to 'vim.exe' in the 'make' commands given above.
If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX'
(also free!) and compress the file (typical compression is 50%). UPX can be
found at
http://www.upx.org/
ADDITION: NLS support with MinGW
(by Eduardo F. Amatria <eferna1@platea.pntic.mec.es>)
If you want National Language Support, read the file src/po/README_mingw.txt.
You need to uncomment lines in Make_ming.mak to have NLS defined.
3. Cygwin
=========
Use Make_cyg.mak with Cygwin's GCC. See
http://users.skynet.be/antoine.mechelynck/vim/compile.htm
The Cygnus one many not fully work yet.
With Cygnus gcc you can use the Unix Makefile instead (you need to get the
Unix archive then). Then you get a Cygwin application (feels like Vim is
runnin on Unix), while with Make_cyg.mak you get a Windows application (like
with the other makefiles).
4. Borland
===========
Use Make_bc5.mak with Borland C++ 5.x. See
http://users.skynet.be/antoine.mechelynck/vim/compile.htm
5. Cross compiling for Win32 from a Linux machine
=================================================
[Update of 1) needs to be verified]
If you like, you can compile the 'mingw' Win32 version from the comfort of
your Linux (or other unix) box. To do this, you need to follow a few steps:
1) Install the mingw32 cross-compiler. See
http://www.libsdl.org/extras/win32/cross/README.txt
2) get the *unix* version of the vim sources
3) in 'Make_ming.mak', set 'CROSS' to '1' instead of '0'.
4) make -f Make_ming.mak gvim.exe
Now you have created the Windows binary from your Linux box! Have fun...
6. Building with Python support
===============================
(written by Ron Aaron: <ronaharon@yahoo.com>)
This has been tested with the mingw32 compiler, and the ActiveState
ActivePython:
http://www.ActiveState.com/Products/ActivePython/
After installing the ActivePython, you will have to create a 'mingw32'
'libpython20.a' to link with:
cd $PYTHON/libs
pexports python20.dll > python20.def
dlltool -d python20.def -l libpython20.a
Once that is done, edit the 'Make_ming.mak' so the PYTHON variable points to
the root of the Python installation (C:\Python20, for example). If you are
cross-compiling on Linux with the mingw32 setup, you need to also convert all
the 'Include' files to *unix* line-endings. This bash command will do it
easily:
for fil in *.h ; do vim -e -c 'set ff=unix|w|q' $fil
Now just do:
make -f Make_ming.mak gvim.exe
and you will end up with a Python-enabled, Win32 version. Enjoy!
7. Building with MzScheme support
=================================
(written by Sergey Khorev <sergey.khorev@gmail.com>)
Vim with MzScheme (http://www.plt-scheme.org/software/mzscheme) support can
be built with either MSVC, or MinGW, or Cygwin. Supported versions are 205 and
above (including 299 and 30x series).
The MSVC build is quite straightforward. Simply invoke (in one line)
nmake -fMake_mvc.mak MZSCHEME=<Path-to-MzScheme>
[MZSCHEME_VER=<MzScheme-version>] [DYNAMIC_MZSCHEME=<yes or no>]
where <MzScheme-version> is the last seven characters from MzScheme dll name
(libmzschXXXXXXX.dll).
If DYNAMIC_MZSCHEME=yes, resulting executable will not depend on MzScheme
DLL's, but will load them in runtime on demand.
Building dynamic MzScheme support on MinGW and Cygwin is similar. Take into
account that <Path-to-MzScheme> should contain slashes rather than backslashes
(e.g. d:/Develop/MzScheme)
"Static" MzScheme support (Vim executable will depend on MzScheme DLLs
explicitly) on MinGW and Cygwin requires additional step.
libmzschXXXXXXX.dll and libmzgcXXXXXXX.dll should be copied from
%WINDOWS%\System32 to other location (either build directory, some temporary
dir or even MzScheme home).
Pass that path as MZSCHEME_DLLS parameter for Make. E.g.,
make -f Make_cyg.mak MZSCHEME=d:/Develop/MzScheme MZSCHEME_VER=209_000
MZSCHEME_DLLS=c:/Temp DYNAMIC_MZSCHEME=no
After a successful build, these dlls can be freely removed, leaving them in
%WINDOWS%\System32 only.
8. Windows 3.1x
===============
make -f Make_w16.mak 16 bit, Borland C++ 5.0
Warning: Be sure to use the right make.exe. It should be Borland make.
You will almost certainly have to change the paths for libs and include files
in the Makefile. Look for "D:\BC5" and "ctl3dv2". You will get a number of
warnings which can be ignored ( _chmod, precompiled header files, and
"possibly incorrect assignment").
The makefile should also work for BC++ 4.0 and 4.5, but may need tweaking to
remove unsupported compiler & liker options.
For making the Win32s version, you need Microsoft Visual C++ 4.1 OR EARLIER.
In MSVC 4.2 support for Win32s was dropped! Use this command:
nmake -f Make_mvc.mak GUI=yes
9. MS-DOS
========= =========
Summary: Summary:
@ -64,285 +376,3 @@ will work properly! Esp. handling multi-byte file names.
If you get all kinds of strange error messages when compiling, try adding If you get all kinds of strange error messages when compiling, try adding
changing the file format from "unix" to "dos". changing the file format from "unix" to "dos".
2. Win32 (Windows NT/XP and Windows 95/98)
====================================
Summary:
vcvars32 Setup paths for nmake and MSVC
nmake -f Make_mvc.mak console Win32 SDK or Microsoft Visual C++
nmake -f Make_mvc.mak GUI=yes GUI Microsoft Visual C++
nmake -f Make_mvc.mak OLE=yes OLE Microsoft Visual C++
nmake -f Make_mvc.mak PERL=C:\Perl PYTHON=C:\Python etc.
Perl, Python, etc.
Microsoft Visual C++
make -f Make_bc5.mak GUI Borland C++ 5.x
make -f Make_bc5.mak console Borland C++ 5.x (change the file)
nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim"
GUI Microsoft Visual C++ 4.x or later
nmake -f Make_ivc.mak CFG="Vim - Win32 Release gvim OLE"
OLE Microsoft Visual C++ 4.x or later
make -f Make_cyg.mak various Cygnus gcc
make -f Make_ming.mak various MingW with gcc
See the specific files for comments and options.
These files have been supplied by George V. Reilly, Ben Singer, Ken Scott and
Ron Aaron; they have been tested. The Cygnus one many not fully work yet.
With Cygnus gcc you can use the Unix Makefile instead (you need to get the
Unix archive then). Then you get a Cygwin application (feels like Vim is
runnin on Unix), while with Make_cyg.mak you get a Windows application (like
with the other makefiles).
You can also use the Visual C++ IDE: use File/Open workspace, select the
Make_ivc.mak file, then select Build/Build all. This builds the GUI version
by default.
Vim for Win32 compiles with the Microsoft Visual C++ 2.0 compiler and later,
and with the Borland C++ 4.5 32-bit compiler and later. It compiles on
Windows 95 and all four NT platforms: i386, Alpha, MIPS, and PowerPC. The
NT/i386 and the Windows 95 binaries are identical. Use Make_mvc.mak to
compile with Visual C++ and Make_bc5.mak to compile with Borland C++.
Make_mvc.mak allows a Vim to be built with various different features and
debug support. Debugging with MS Devstudio is provided by Make_dvc.mak.
For a description of the use of Make_dvc.mak, look in Make_mvc.mak.
For compiling Gvim with IME support on far-east Windows, uncomment the
MULTI_BYTE_IME define in the src/feature.h file before compiling.
The Win32 console binary was compiled with Visual C++ version 5.0, using
Make_mvc.mak and Make_bc5.mak (Borland C). Other compilers should also work.
If you get all kinds of strange error messages when compiling (you shouldn't
with the Microsoft or Borland 32-bit compilers), try adding <CR> characters
at the end of each line.
You probably need to run "vcvars32" before using "nmake".
For making the Win32s version, you need Microsoft Visual C++ 4.1 OR EARLIER.
In version 4.2 support for Win32s was dropped! Use this command:
nmake -f Make_mvc.mak GUI=yes
See the respective Makefiles for more comments.
3. Windows NT with OpenNT
=========================
(contributed by Michael A. Benzinger)
Building Vim on OpenNT 2.0 on Windows NT 4.0, with Softway's prerelease gcc:
1. export CONFIG_SHELL=//D/OpenNT/bin/sh
2. Make the following exports for modifying config.mk:
export CFLAGS=-O -Wshadow
export X_PRE_LIBS=-lXmu
2. Run configure as follows:
configure --prefix=/vim --bindir=/bin/opennt --enable-gui=Motif
If you don't have OpenNTif (Motif support), use this:
configure --prefix=/vim --bindir=/bin/opennt --enable-gui=Athena
3. Edit Makefile to perform the following since the Makefile include syntax
differs from that of gmake:
#include config.mk
.include "config.mk"
4. Change all install links to be "ln -f" and not "ln -s".
5. Change to the 'ctags' directory and configure.
6. Edit the Makefile and remove spurious spaces from lines 99 and 114.
7. Change slink to "ln -f" from "ln -s".
8. Return to the src directory.
9. make
4. Windows 3.1x
===============
make -f Make_w16.mak 16 bit, Borland C++ 5.0
Warning: Be sure to use the right make.exe. It should be Borland make.
You will almost certainly have to change the paths for libs and include files
in the Makefile. Look for "D:\BC5" and "ctl3dv2". You will get a number of
warnings which can be ignored ( _chmod, precompiled header files, and
"possibly incorrect assignment").
The makefile should also work for BC++ 4.0 and 4.5, but may need tweaking to
remove unsupported compiler & liker options.
5. Mingw
========
(written by Ron Aaron: <ronaharon@yahoo.com>)
This is about how to produce a Win32 binary of gvim with Mingw.
First, you need to get the 'mingw32' compiler, which is free for the download
at:
http://www.mingw.org/
Once you have downloaded the compiler binaries, unpack them on your hard disk
somewhere, and put them on your PATH. If you are on Win95/98 you can edit
your AUTOEXEC.BAT file with a line like:
set PATH=C:\GCC-2.95.2\BIN;%PATH%
or on NT/2000, go to the Control Panel, System, and edit the environment from
there.
Test if gcc is on your path. From a CMD (or COMMAND on '95/98):
C:\> gcc --version
2.95.2
C:\> make --version
GNU Make version 3.77 (...etc...)
Now you are ready to rock 'n' roll. Unpack the vim sources (look on
www.vim.org for exactly which version of the vim files you need).
Change directory to 'vim\src':
C:\> cd vim\src
C:\VIM\SRC>
and you type:
make -f Make_ming.mak gvim.exe
After churning for a while, you will end up with 'gvim.exe' in the 'vim\src'
directory.
You should not need to do *any* editing of any files to get vim compiled this
way. If, for some reason, you want the console-mode-only version of vim (this
is NOT recommended on Win32, especially on '95/'98!!!), you need only change
the 'gvim.exe' to 'vim.exe' in the 'make' commands given above.
If you are dismayed by how big the EXE is, I strongly recommend you get 'UPX'
(also free!) and compress the file (typical compression is 50%). UPX can be
found at
http://upx.tsx.org/
ADDITION: NLS support with Mingw
(by Eduardo F. Amatria <eferna1@platea.pntic.mec.es>)
If you want National Language Support, read the file src/po/README_mingw.txt.
You need to uncomment lines in Make_ming.mak to have NLS defined.
6. Cross compiling for Win32 from a Linux machine
=================================================
(written by Ron Aaron: <ronaharon@yahoo.com> with help from
Martin Kahlert <martin.kahlert@infineon.com>)
If you like, you can compile the 'mingw' Win32 version from the comfort of
your Linux (or other unix) box. To do this, you need to follow a few steps:
1) Install the mingw32 cross-compiler (if you have it, go to step 2)
1a) from 'ftp://ftp.nanotech.wisc.edu/pub/khan/gnu-win32/mingw32/snapshots/gcc-2.95.2-1',
get:
binutils-19990818-1-src.tar.gz
mingw-msvcrt-20000203.zip
gcc-2.95.2-1-x86-win32.diff.gz
1b) from 'http://gcc.gnu.org/' get:
gcc-2.95.2.tar.gz
1c) create a place to put the compiler source and binaries:
(assuming you are in the home directory)
mkdir gcc-bin
mkdir gcc-src
1d) unpack the sources:
cd gcc-src
tar xzf ../binutils-19990818-1-src.tar.gz
tar xzf ../gcc-2.95.2.tar.gz
unzip ../mingw-msvcrt-20000203
1e) build the different tools:
export PREFIX=~/gcc-bin/
cd gcc-2.95.2
zcat ../gcc-2.95.2-1-x86-win32.diff.gz | patch -p1 -E
cd ../binutils-19990818
./configure --target=i586-pc-mingw32msvc --prefix=$PREFIX
make
make install
cd ../gcc-2.95.2
./configure --target=i586-pc-mingw32msvc \
--with-libs=~/gcc-bin/i386-mingw32msvc/lib \
--with-headers=~/gcc-bin/i386-mingw32msvc/include \
--enable-languages=c++ \
--prefix=$PREFIX
make
make install
1f) Add $PREFIX/bin to your $PATH.
2) get the *unix* version of the vim sources
3) in 'Make_ming.mak', set 'CROSS' to '1' instead of '0'.
4) make -f Make_ming.mak gvim.exe
Now you have created the Windows binary from your Linux box! Have fun...
7. Building with Python support
=================================================
(written by Ron Aaron: <ronaharon@yahoo.com>)
This has been tested with the mingw32 compiler, and the ActiveState
ActivePython:
http://www.ActiveState.com/Products/ActivePython/
After installing the ActivePython, you will have to create a 'mingw32'
'libpython20.a' to link with:
cd $PYTHON/libs
pexports python20.dll > python20.def
dlltool -d python20.def -l libpython20.a
Once that is done, edit the 'Make_ming.mak' so the PYTHON variable points to
the root of the Python installation (C:\Python20, for example). If you are
cross-compiling on Linux with the mingw32 setup, you need to also convert all
the 'Include' files to *unix* line-endings. This bash command will do it
easily:
for fil in *.h ; do vim -e -c 'set ff=unix|w|q' $fil
Now just do:
make -f Make_ming.mak gvim.exe
and you will end up with a Python-enabled, Win32 version. Enjoy!
8. Building with MzScheme support
=================================================
(written by Sergey Khorev <sergey.khorev@gmail.com>)
Vim with MzScheme (http://www.plt-scheme.org/software/mzscheme) support can
be built with either MSVC, or MinGW, or Cygwin. Supported versions are 205 and
above (including 299 and 30x series).
The MSVC build is quite straightforward. Simply invoke (in one line)
nmake -fMake_mvc.mak MZSCHEME=<Path-to-MzScheme>
[MZSCHEME_VER=<MzScheme-version>] [DYNAMIC_MZSCHEME=<yes or no>]
where <MzScheme-version> is the last seven characters from MzScheme dll name
(libmzschXXXXXXX.dll).
If DYNAMIC_MZSCHEME=yes, resulting executable will not depend on MzScheme
DLL's, but will load them in runtime on demand.
Building dynamic MzScheme support on MinGW and Cygwin is similar. Take into
account that <Path-to-MzScheme> should contain slashes rather than backslashes
(e.g. d:/Develop/MzScheme)
"Static" MzScheme support (Vim executable will depend on MzScheme DLLs
explicitly) on MinGW and Cygwin requires additional step.
libmzschXXXXXXX.dll and libmzgcXXXXXXX.dll should be copied from
%WINDOWS%\System32 to other location (either build directory, some temporary
dir or even MzScheme home).
Pass that path as MZSCHEME_DLLS parameter for Make. E.g.,
make -fMake_cyg.mak MZSCHEME=d:/Develop/MzScheme MZSCHEME_VER=209_000
MZSCHEME_DLLS=c:/Temp DYNAMIC_MZSCHEME=no
After successful build these dlls can be freely removed, leaving them in
%WINDOWS%\System32 only.

View File

@ -131,9 +131,9 @@
### See feature.h for a list of optionals. ### See feature.h for a list of optionals.
# If you want to build some optional features without modifying the source, # If you want to build some optional features without modifying the source,
# you can set DEFINES on the command line, e.g., # you can set DEFINES on the command line, e.g.,
# nmake -f makefile.mvc "DEFINES=-DEMACS_TAGS" # nmake -f Make_mvc.mvc "DEFINES=-DEMACS_TAGS"
# Build on both Windows NT and Windows 95 # Build on both Windows NT/XP and Windows 9x
TARGETOS = BOTH TARGETOS = BOTH
@ -167,12 +167,12 @@ OBJDIR = $(OBJDIR)Z
OBJDIR = $(OBJDIR)d OBJDIR = $(OBJDIR)d
!endif !endif
# ntwin32.mak requires that CPU be set appropriately # Win32.mak requires that CPU be set appropriately
!ifdef PROCESSOR_ARCHITECTURE !ifdef PROCESSOR_ARCHITECTURE
# We're on Windows NT or using VC 6 # We're on Windows NT or using VC 6+
CPU = $(PROCESSOR_ARCHITECTURE) CPU = $(PROCESSOR_ARCHITECTURE)
! if "$(CPU)" == "x86" ! if ("$(CPU)" == "x86") || ("$(CPU)" == "X86")
CPU = i386 CPU = i386
! endif ! endif
!else # !PROCESSOR_ARCHITECTURE !else # !PROCESSOR_ARCHITECTURE
@ -190,17 +190,12 @@ MAKEFLAGS_GVIMEXT = DEBUG=yes
!endif !endif
# Build a multithreaded version for the Windows 95 dead keys hack
# Commented out because it doesn't work.
# MULTITHREADED = 1
# Get all sorts of useful, standard macros from the SDK. (Note that # Get all sorts of useful, standard macros from the SDK. (Note that
# MSVC 2.2 does not install <ntwin32.mak> in the \msvc20\include # MSVC 2.2 does not install <ntwin32.mak> in the \msvc20\include
# directory, but you can find it in \msvc20\include on the CD-ROM. # directory, but you can find it in \msvc20\include on the CD-ROM.
# You may also need <win32.mak> from the same place.) # You may also need <win32.mak> from the same place.)
!include <ntwin32.mak> !include <Win32.mak>
#>>>>> path of the compiler and linker; name of include and lib directories #>>>>> path of the compiler and linker; name of include and lib directories
@ -263,12 +258,14 @@ XPM_INC = -I $(XPM)\include
!endif !endif
!endif !endif
# Set which version of the CRT to use
!if defined(USE_MSVCRT) !if defined(USE_MSVCRT)
CVARS = $(cvarsdll) CVARS = $(cvarsdll)
!elseif defined(MULTITHREADED) # !elseif defined(MULTITHREADED)
CVARS = $(cvarsmt) # CVARS = $(cvarsmt)
!else !else
CVARS = $(cvars) # CVARS = $(cvars)
CVARS = $(cvarsmt)
!endif !endif
# need advapi32.lib for GetUserName() # need advapi32.lib for GetUserName()
@ -276,7 +273,7 @@ CVARS = $(cvars)
# gdi32.lib and comdlg32.lib for printing support # gdi32.lib and comdlg32.lib for printing support
# ole32.lib and uuid.lib are needed for FEAT_SHORTCUT # ole32.lib and uuid.lib are needed for FEAT_SHORTCUT
CON_LIB = advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib CON_LIB = advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib uuid.lib
!if "$(VC6)" == "yes" !if "$(DELAYLOAD)" == "yes"
CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib
!endif !endif
@ -340,10 +337,14 @@ RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG
! ifdef USE_MSVCRT ! ifdef USE_MSVCRT
CFLAGS = $(CFLAGS) -MD CFLAGS = $(CFLAGS) -MD
LIBC = msvcrt.lib LIBC = msvcrt.lib
! elseif defined(MULTITHREADED) # CFLAGS = $(CFLAGS) $(cvarsdll)
LIBC = libcmt.lib # ! elseif defined(MULTITHREADED)
# LIBC = libcmt.lib
# CFLAGS = $(CFLAGS) $(cvarsmt)
! else ! else
LIBC = libc.lib # LIBC = libc.lib
LIBC = libcmt.lib
# CFLAGS = $(CFLAGS) $(cvars)
! endif ! endif
!else # DEBUG !else # DEBUG
VIM = vimd VIM = vimd
@ -358,10 +359,14 @@ LIBC = /fixed:no
! ifdef USE_MSVCRT ! ifdef USE_MSVCRT
CFLAGS = $(CFLAGS) -MDd CFLAGS = $(CFLAGS) -MDd
LIBC = $(LIBC) msvcrtd.lib LIBC = $(LIBC) msvcrtd.lib
! elseif defined(MULTITHREADED) # CFLAGS = $(CFLAGS) $(cvarsdll)
LIBC = $(LIBC) libcmtd.lib # ! elseif defined(MULTITHREADED)
# LIBC = $(LIBC) libcmtd.lib
# CFLAGS = $(CFLAGS) $(cvarsmt)
! else ! else
LIBC = $(LIBC) libcd.lib # LIBC = $(LIBC) libcd.lib
LIBC = $(LIBC) libcmtd.lib
# CFLAGS = $(CFLAGS) $(cvars)
! endif ! endif
!endif # DEBUG !endif # DEBUG
@ -666,7 +671,7 @@ CFLAGS = $(CFLAGS) -DFEAT_$(FEATURES)
# on a crash (doesn't add overhead to the executable). # on a crash (doesn't add overhead to the executable).
# #
CFLAGS = $(CFLAGS) /Zi /Fd$(OUTDIR)/ CFLAGS = $(CFLAGS) /Zi /Fd$(OUTDIR)/
LINK_PDB = /PDB:$(OUTDIR)/$(VIM).pdb -debug:full -debugtype:cv,fixup LINK_PDB = /PDB:$(OUTDIR)/$(VIM).pdb -debug # -debug:full -debugtype:cv,fixup
# #
# End extra feature include # End extra feature include
@ -1004,4 +1009,8 @@ proto.h: \
proto/window.pro \ proto/window.pro \
$(NETBEANS_PRO) $(NETBEANS_PRO)
.cod.c:
$(CC) $(CFLAGS) /FAc $<
# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0: # vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0:

View File

@ -9,6 +9,13 @@
/* /*
* dosinst.h: Common code for dosinst.c and uninstal.c * dosinst.h: Common code for dosinst.c and uninstal.c
*/ */
/* Visual Studio 2005 has 'deprecated' many of the standard CRT functions */
#if _MSC_VER >= 1400
# define _CRT_SECURE_NO_DEPRECATE
# define _CRT_NONSTDC_NO_DEPRECATE
#endif
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -16,7 +23,7 @@
#include <fcntl.h> #include <fcntl.h>
#ifndef UNIX_LINT #ifndef UNIX_LINT
# include <io.h> # include "vimio.h"
# include <ctype.h> # include <ctype.h>
# ifndef __CYGWIN__ # ifndef __CYGWIN__

View File

@ -7604,7 +7604,7 @@ ins_bs(c, mode, inserted_space_p)
int in_indent; int in_indent;
int oldState; int oldState;
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
int p1, p2; int cpc[MAX_MCO]; /* composing characters */
#endif #endif
/* /*
@ -7920,16 +7920,16 @@ ins_bs(c, mode, inserted_space_p)
{ {
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
if (enc_utf8 && p_deco) if (enc_utf8 && p_deco)
(void)utfc_ptr2char(ml_get_cursor(), &p1, &p2); (void)utfc_ptr2char(ml_get_cursor(), cpc);
#endif #endif
(void)del_char(FALSE); (void)del_char(FALSE);
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
/* /*
* If p1 or p2 is non-zero, there are combining characters we * If there are combining characters and 'delcombine' is set
* need to take account of. Don't back up before the base * move the cursor back. Don't back up before the base
* character. * character.
*/ */
if (enc_utf8 && p_deco && (p1 != NUL || p2 != NUL)) if (enc_utf8 && p_deco && cpc[0] != NUL)
inc_cursor(); inc_cursor();
#endif #endif
#ifdef FEAT_RIGHTLEFT #ifdef FEAT_RIGHTLEFT

View File

@ -11,7 +11,7 @@
* eval.c: Expression evaluation. * eval.c: Expression evaluation.
*/ */
#if defined(MSDOS) || defined(MSWIN) #if defined(MSDOS) || defined(MSWIN)
# include <io.h> /* for mch_open(), must be before vim.h */ # include "vimio.h" /* for mch_open(), must be before vim.h */
#endif #endif
#include "vim.h" #include "vim.h"
@ -718,7 +718,7 @@ static void call_user_func __ARGS((ufunc_T *fp, int argcount, typval_T *argvars,
static void add_nr_var __ARGS((dict_T *dp, dictitem_T *v, char *name, varnumber_T nr)); static void add_nr_var __ARGS((dict_T *dp, dictitem_T *v, char *name, varnumber_T nr));
static win_T *find_win_by_nr __ARGS((typval_T *vp)); static win_T *find_win_by_nr __ARGS((typval_T *vp));
static int searchpair_cmn __ARGS((typval_T *argvars, pos_T *match_pos)); static int searchpair_cmn __ARGS((typval_T *argvars, pos_T *match_pos));
static int search_cmn __ARGS((typval_T *argvars, pos_T *match_pos)); static int search_cmn __ARGS((typval_T *argvars, pos_T *match_pos, int *flagsp));
/* Character used as separated in autoload function/variable names. */ /* Character used as separated in autoload function/variable names. */
#define AUTOLOAD_CHAR '#' #define AUTOLOAD_CHAR '#'
@ -1171,17 +1171,27 @@ skip_expr(pp)
* Return pointer to allocated memory, or NULL for failure. * Return pointer to allocated memory, or NULL for failure.
*/ */
char_u * char_u *
eval_to_string(arg, nextcmd) eval_to_string(arg, nextcmd, dolist)
char_u *arg; char_u *arg;
char_u **nextcmd; char_u **nextcmd;
int dolist; /* turn List into sequence of lines */
{ {
typval_T tv; typval_T tv;
char_u *retval; char_u *retval;
garray_T ga;
if (eval0(arg, &tv, nextcmd, TRUE) == FAIL) if (eval0(arg, &tv, nextcmd, TRUE) == FAIL)
retval = NULL; retval = NULL;
else else
{ {
if (dolist && tv.v_type == VAR_LIST)
{
ga_init2(&ga, (int)sizeof(char), 80);
list_join(&ga, tv.vval.v_list, (char_u *)"\n", TRUE, 0);
ga_append(&ga, NUL);
retval = (char_u *)ga.ga_data;
}
else
retval = vim_strsave(get_tv_string(&tv)); retval = vim_strsave(get_tv_string(&tv));
clear_tv(&tv); clear_tv(&tv);
} }
@ -1206,7 +1216,7 @@ eval_to_string_safe(arg, nextcmd, use_sandbox)
if (use_sandbox) if (use_sandbox)
++sandbox; ++sandbox;
++textlock; ++textlock;
retval = eval_to_string(arg, nextcmd); retval = eval_to_string(arg, nextcmd, FALSE);
if (use_sandbox) if (use_sandbox)
--sandbox; --sandbox;
--textlock; --textlock;
@ -13273,25 +13283,27 @@ get_search_arg(varp, flagsp)
* Shared by search() and searchpos() functions * Shared by search() and searchpos() functions
*/ */
static int static int
search_cmn(argvars, match_pos) search_cmn(argvars, match_pos, flagsp)
typval_T *argvars; typval_T *argvars;
pos_T *match_pos; pos_T *match_pos;
int *flagsp;
{ {
int flags;
char_u *pat; char_u *pat;
pos_T pos; pos_T pos;
pos_T save_cursor; pos_T save_cursor;
int save_p_ws = p_ws; int save_p_ws = p_ws;
int dir; int dir;
int flags = 0;
int retval = 0; /* default: FAIL */ int retval = 0; /* default: FAIL */
long lnum_stop = 0; long lnum_stop = 0;
int options = SEARCH_KEEP; int options = SEARCH_KEEP;
int subpatnum; int subpatnum;
pat = get_tv_string(&argvars[0]); pat = get_tv_string(&argvars[0]);
dir = get_search_arg(&argvars[1], &flags); /* may set p_ws */ dir = get_search_arg(&argvars[1], flagsp); /* may set p_ws */
if (dir == 0) if (dir == 0)
goto theend; goto theend;
flags = *flagsp;
if (flags & SP_START) if (flags & SP_START)
options |= SEARCH_START; options |= SEARCH_START;
if (flags & SP_END) if (flags & SP_END)
@ -13359,7 +13371,9 @@ f_search(argvars, rettv)
typval_T *argvars; typval_T *argvars;
typval_T *rettv; typval_T *rettv;
{ {
rettv->vval.v_number = search_cmn(argvars, NULL); int flags = 0;
rettv->vval.v_number = search_cmn(argvars, NULL, &flags);
} }
/* /*
@ -13649,13 +13663,16 @@ f_searchpos(argvars, rettv)
pos_T match_pos; pos_T match_pos;
int lnum = 0; int lnum = 0;
int col = 0; int col = 0;
int n;
int flags = 0;
rettv->vval.v_number = 0; rettv->vval.v_number = 0;
if (rettv_list_alloc(rettv) == FAIL) if (rettv_list_alloc(rettv) == FAIL)
return; return;
if (search_cmn(argvars, &match_pos) > 0) n = search_cmn(argvars, &match_pos, &flags);
if (n > 0)
{ {
lnum = match_pos.lnum; lnum = match_pos.lnum;
col = match_pos.col; col = match_pos.col;
@ -13663,7 +13680,8 @@ f_searchpos(argvars, rettv)
list_append_number(rettv->vval.v_list, (varnumber_T)lnum); list_append_number(rettv->vval.v_list, (varnumber_T)lnum);
list_append_number(rettv->vval.v_list, (varnumber_T)col); list_append_number(rettv->vval.v_list, (varnumber_T)col);
if (flags & SP_SUBPAT)
list_append_number(rettv->vval.v_list, (varnumber_T)n);
} }
@ -15675,6 +15693,7 @@ f_winrestview(argvars, rettv)
curwin->w_cursor.coladd = get_dict_number(dict, (char_u *)"coladd"); curwin->w_cursor.coladd = get_dict_number(dict, (char_u *)"coladd");
#endif #endif
curwin->w_curswant = get_dict_number(dict, (char_u *)"curswant"); curwin->w_curswant = get_dict_number(dict, (char_u *)"curswant");
curwin->w_set_curswant = FALSE;
curwin->w_topline = get_dict_number(dict, (char_u *)"topline"); curwin->w_topline = get_dict_number(dict, (char_u *)"topline");
#ifdef FEAT_DIFF #ifdef FEAT_DIFF
@ -16208,7 +16227,7 @@ make_expanded_name(in_start, expr_start, expr_end, in_end)
c1 = *in_end; c1 = *in_end;
*in_end = NUL; *in_end = NUL;
temp_result = eval_to_string(expr_start + 1, &nextcmd); temp_result = eval_to_string(expr_start + 1, &nextcmd, FALSE);
if (temp_result != NULL && nextcmd == NULL) if (temp_result != NULL && nextcmd == NULL)
{ {
retval = alloc((unsigned)(STRLEN(temp_result) + (expr_start - in_start) retval = alloc((unsigned)(STRLEN(temp_result) + (expr_start - in_start)

View File

@ -52,12 +52,12 @@ do_ascii(eap)
char buf2[20]; char buf2[20];
char_u buf3[7]; char_u buf3[7];
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
int c1 = 0; int cc[MAX_MCO];
int c2 = 0; int ci = 0;
int len; int len;
if (enc_utf8) if (enc_utf8)
c = utfc_ptr2char(ml_get_cursor(), &c1, &c2); c = utfc_ptr2char(ml_get_cursor(), cc);
else else
#endif #endif
c = gchar_cursor(); c = gchar_cursor();
@ -95,9 +95,7 @@ do_ascii(eap)
_("<%s>%s%s %d, Hex %02x, Octal %03o"), _("<%s>%s%s %d, Hex %02x, Octal %03o"),
transchar(c), buf1, buf2, c, c, c); transchar(c), buf1, buf2, c, c, c);
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
c = c1; c = cc[ci++];
c1 = c2;
c2 = 0;
#endif #endif
} }
@ -120,9 +118,9 @@ do_ascii(eap)
vim_snprintf((char *)IObuff + len, IOSIZE - len, vim_snprintf((char *)IObuff + len, IOSIZE - len,
c < 0x10000 ? _("> %d, Hex %04x, Octal %o") c < 0x10000 ? _("> %d, Hex %04x, Octal %o")
: _("> %d, Hex %08x, Octal %o"), c, c, c); : _("> %d, Hex %08x, Octal %o"), c, c, c);
c = c1; if (ci == MAX_MCO)
c1 = c2; break;
c2 = 0; c = cc[ci++];
} }
#endif #endif

View File

@ -831,14 +831,16 @@ EX(CMD_split, "split", ex_splitview,
BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR), BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR),
EX(CMD_spellgood, "spellgood", ex_spell, EX(CMD_spellgood, "spellgood", ex_spell,
BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR), BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR),
EX(CMD_spellwrong, "spellwrong", ex_spell,
BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR),
EX(CMD_spelldump, "spelldump", ex_spelldump, EX(CMD_spelldump, "spelldump", ex_spelldump,
BANG|TRLBAR), BANG|TRLBAR),
EX(CMD_spellinfo, "spellinfo", ex_spellinfo,
TRLBAR),
EX(CMD_spellrepall, "spellrepall", ex_spellrepall, EX(CMD_spellrepall, "spellrepall", ex_spellrepall,
TRLBAR), TRLBAR),
EX(CMD_spellundo, "spellundo", ex_spell, EX(CMD_spellundo, "spellundo", ex_spell,
BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR), BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR),
EX(CMD_spellwrong, "spellwrong", ex_spell,
BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR),
EX(CMD_sprevious, "sprevious", ex_previous, EX(CMD_sprevious, "sprevious", ex_previous,
EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR), EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR),
EX(CMD_srewind, "srewind", ex_rewind, EX(CMD_srewind, "srewind", ex_rewind,

View File

@ -12,7 +12,7 @@
*/ */
#if defined(WIN32) && defined(FEAT_CSCOPE) #if defined(WIN32) && defined(FEAT_CSCOPE)
# include <io.h> # include "vimio.h"
#endif #endif
#include "vim.h" #include "vim.h"

View File

@ -240,6 +240,7 @@ static void ex_popup __ARGS((exarg_T *eap));
# define ex_spell ex_ni # define ex_spell ex_ni
# define ex_mkspell ex_ni # define ex_mkspell ex_ni
# define ex_spelldump ex_ni # define ex_spelldump ex_ni
# define ex_spellinfo ex_ni
# define ex_spellrepall ex_ni # define ex_spellrepall ex_ni
#endif #endif
#ifndef FEAT_MZSCHEME #ifndef FEAT_MZSCHEME
@ -3289,10 +3290,17 @@ set_one_cmd_context(xp, buff)
if (bow != NULL && in_quote) if (bow != NULL && in_quote)
xp->xp_pattern = bow; xp->xp_pattern = bow;
xp->xp_context = EXPAND_FILES; xp->xp_context = EXPAND_FILES;
#ifndef BACKSLASH_IN_FILENAME #ifndef BACKSLASH_IN_FILENAME
/* For a shell command more chars need to be escaped. */ /* For a shell command more chars need to be escaped. */
if (usefilter || ea.cmdidx == CMD_bang) if (usefilter || ea.cmdidx == CMD_bang)
{
xp->xp_shell = TRUE; xp->xp_shell = TRUE;
/* When still after the command name expand executables. */
if (xp->xp_pattern == skipwhite(arg))
xp->xp_context = EXPAND_SHELLCMD;
}
#endif #endif
/* Check for environment variable */ /* Check for environment variable */
@ -5089,6 +5097,7 @@ static struct
{EXPAND_MAPPINGS, "mapping"}, {EXPAND_MAPPINGS, "mapping"},
{EXPAND_MENUS, "menu"}, {EXPAND_MENUS, "menu"},
{EXPAND_SETTINGS, "option"}, {EXPAND_SETTINGS, "option"},
{EXPAND_SHELLCMD, "shellcmd"},
{EXPAND_TAGS, "tag"}, {EXPAND_TAGS, "tag"},
{EXPAND_TAGS_LISTFILES, "tag_listfiles"}, {EXPAND_TAGS_LISTFILES, "tag_listfiles"},
{EXPAND_USER_VARS, "var"}, {EXPAND_USER_VARS, "var"},

View File

@ -518,7 +518,8 @@ getcmdline(firstc, count, indent)
xpc.xp_context = EXPAND_NOTHING; xpc.xp_context = EXPAND_NOTHING;
} }
} }
if (xpc.xp_context == EXPAND_FILES && p_wmnu) if ((xpc.xp_context == EXPAND_FILES
|| xpc.xp_context == EXPAND_SHELLCMD) && p_wmnu)
{ {
char_u upseg[5]; char_u upseg[5];
@ -2466,9 +2467,9 @@ draw_cmdline(start, len)
int pc, pc1; int pc, pc1;
int prev_c = 0; int prev_c = 0;
int prev_c1 = 0; int prev_c1 = 0;
int u8c, u8c_c1, u8c_c2; int u8c;
int u8cc[MAX_MCO];
int nc = 0; int nc = 0;
int dummy;
/* /*
* Do arabic shaping into a temporary buffer. This is very * Do arabic shaping into a temporary buffer. This is very
@ -2495,7 +2496,7 @@ draw_cmdline(start, len)
for (j = start; j < start + len; j += mb_l) for (j = start; j < start + len; j += mb_l)
{ {
p = ccline.cmdbuff + j; p = ccline.cmdbuff + j;
u8c = utfc_ptr2char_len(p, &u8c_c1, &u8c_c2, start + len - j); u8c = utfc_ptr2char_len(p, u8cc, start + len - j);
mb_l = utfc_ptr2len_len(p, start + len - j); mb_l = utfc_ptr2len_len(p, start + len - j);
if (ARABIC_CHAR(u8c)) if (ARABIC_CHAR(u8c))
{ {
@ -2505,7 +2506,7 @@ draw_cmdline(start, len)
/* displaying from right to left */ /* displaying from right to left */
pc = prev_c; pc = prev_c;
pc1 = prev_c1; pc1 = prev_c1;
prev_c1 = u8c_c1; prev_c1 = u8cc[0];
if (j + mb_l >= start + len) if (j + mb_l >= start + len)
nc = NUL; nc = NUL;
else else
@ -2517,20 +2518,25 @@ draw_cmdline(start, len)
if (j + mb_l >= start + len) if (j + mb_l >= start + len)
pc = NUL; pc = NUL;
else else
pc = utfc_ptr2char_len(p + mb_l, &pc1, &dummy, {
int pcc[MAX_MCO];
pc = utfc_ptr2char_len(p + mb_l, pcc,
start + len - j - mb_l); start + len - j - mb_l);
pc1 = pcc[0];
}
nc = prev_c; nc = prev_c;
} }
prev_c = u8c; prev_c = u8c;
u8c = arabic_shape(u8c, NULL, &u8c_c1, pc, pc1, nc); u8c = arabic_shape(u8c, NULL, &u8cc[0], pc, pc1, nc);
newlen += (*mb_char2bytes)(u8c, arshape_buf + newlen); newlen += (*mb_char2bytes)(u8c, arshape_buf + newlen);
if (u8c_c1 != 0) if (u8cc[0] != 0)
{ {
newlen += (*mb_char2bytes)(u8c_c1, arshape_buf + newlen); newlen += (*mb_char2bytes)(u8cc[0], arshape_buf + newlen);
if (u8c_c2 != 0) if (u8cc[1] != 0)
newlen += (*mb_char2bytes)(u8c_c2, newlen += (*mb_char2bytes)(u8cc[1],
arshape_buf + newlen); arshape_buf + newlen);
} }
} }
@ -3353,6 +3359,7 @@ ExpandOne(xp, str, orig, options, mode)
#ifdef CASE_INSENSITIVE_FILENAME #ifdef CASE_INSENSITIVE_FILENAME
if (xp->xp_context == EXPAND_DIRECTORIES if (xp->xp_context == EXPAND_DIRECTORIES
|| xp->xp_context == EXPAND_FILES || xp->xp_context == EXPAND_FILES
|| xp->xp_context == EXPAND_SHELLCMD
|| xp->xp_context == EXPAND_BUFFERS) || xp->xp_context == EXPAND_BUFFERS)
{ {
if (TOLOWER_LOC(xp->xp_files[i][len]) != if (TOLOWER_LOC(xp->xp_files[i][len]) !=
@ -3454,6 +3461,7 @@ ExpandEscape(xp, str, numfiles, files, options)
if (options & WILD_ESCAPE) if (options & WILD_ESCAPE)
{ {
if (xp->xp_context == EXPAND_FILES if (xp->xp_context == EXPAND_FILES
|| xp->xp_context == EXPAND_SHELLCMD
|| xp->xp_context == EXPAND_BUFFERS || xp->xp_context == EXPAND_BUFFERS
|| xp->xp_context == EXPAND_DIRECTORIES) || xp->xp_context == EXPAND_DIRECTORIES)
{ {
@ -3648,6 +3656,7 @@ showmatches(xp, wildmenu)
for (i = 0; i < num_files; ++i) for (i = 0; i < num_files; ++i)
{ {
if (!showtail && (xp->xp_context == EXPAND_FILES if (!showtail && (xp->xp_context == EXPAND_FILES
|| xp->xp_context == EXPAND_SHELLCMD
|| xp->xp_context == EXPAND_BUFFERS)) || xp->xp_context == EXPAND_BUFFERS))
{ {
home_replace(NULL, files_found[i], NameBuff, MAXPATHL, TRUE); home_replace(NULL, files_found[i], NameBuff, MAXPATHL, TRUE);
@ -3700,6 +3709,7 @@ showmatches(xp, wildmenu)
for (j = maxlen - lastlen; --j >= 0; ) for (j = maxlen - lastlen; --j >= 0; )
msg_putchar(' '); msg_putchar(' ');
if (xp->xp_context == EXPAND_FILES if (xp->xp_context == EXPAND_FILES
|| xp->xp_context == EXPAND_SHELLCMD
|| xp->xp_context == EXPAND_BUFFERS) || xp->xp_context == EXPAND_BUFFERS)
{ {
/* highlight directories */ /* highlight directories */
@ -3789,7 +3799,9 @@ expand_showtail(xp)
char_u *end; char_u *end;
/* When not completing file names a "/" may mean something different. */ /* When not completing file names a "/" may mean something different. */
if (xp->xp_context != EXPAND_FILES && xp->xp_context != EXPAND_DIRECTORIES) if (xp->xp_context != EXPAND_FILES
&& xp->xp_context != EXPAND_SHELLCMD
&& xp->xp_context != EXPAND_DIRECTORIES)
return FALSE; return FALSE;
end = gettail(xp->xp_pattern); end = gettail(xp->xp_pattern);
@ -3826,7 +3838,9 @@ addstar(fname, len, context)
int new_len; int new_len;
char_u *tail; char_u *tail;
if (context != EXPAND_FILES && context != EXPAND_DIRECTORIES) if (context != EXPAND_FILES
&& context != EXPAND_SHELLCMD
&& context != EXPAND_DIRECTORIES)
{ {
/* /*
* Matching will be done internally (on something other than files). * Matching will be done internally (on something other than files).
@ -3943,6 +3957,7 @@ addstar(fname, len, context)
* EXPAND_DIRECTORIES In some cases this is used instead of the latter * EXPAND_DIRECTORIES In some cases this is used instead of the latter
* when we know only directories are of interest. eg * when we know only directories are of interest. eg
* :set dir=^I * :set dir=^I
* EXPAND_SHELLCMD After ":!cmd", ":r !cmd" or ":w !cmd".
* EXPAND_SETTINGS Complete variable names. eg :set d^I * EXPAND_SETTINGS Complete variable names. eg :set d^I
* EXPAND_BOOL_SETTINGS Complete boolean variables only, eg :set no^I * EXPAND_BOOL_SETTINGS Complete boolean variables only, eg :set no^I
* EXPAND_TAGS Complete tags from the files in p_tags. eg :ta a^I * EXPAND_TAGS Complete tags from the files in p_tags. eg :ta a^I
@ -4165,6 +4180,93 @@ ExpandFromContext(xp, pat, num_file, file, options)
return ret; return ret;
} }
if (xp->xp_context == EXPAND_SHELLCMD)
{
/*
* Expand shell command.
*/
int i;
char_u *path;
int mustfree = FALSE;
garray_T ga;
char_u *buf = alloc(MAXPATHL);
int l;
char_u *s, *e;
if (buf == NULL)
return FAIL;
/* for ":set path=" and ":set tags=" halve backslashes for escaped
* space */
pat = vim_strsave(pat);
for (i = 0; pat[i]; ++i)
if (pat[i] == '\\' && pat[i + 1] == ' ')
STRCPY(pat + i, pat + i + 1);
flags |= EW_FILE | EW_EXEC;
/* For an absolute name we don't use $PATH. */
if ((pat[0] == '.' && (vim_ispathsep(pat[1])
|| (pat[1] == '.' && vim_ispathsep(pat[2])))))
path = (char_u *)".";
else
path = vim_getenv((char_u *)"PATH", &mustfree);
ga_init2(&ga, (int)sizeof(char *), 10);
for (s = path; *s != NUL; s = e)
{
#if defined(MSDOS) || defined(MSWIN) || defined(OS2)
e = vim_strchr(s, ';');
#else
e = vim_strchr(s, ':');
#endif
if (e == NULL)
e = s + STRLEN(s);
l = e - s;
if (l > MAXPATHL - 5)
break;
vim_strncpy(buf, s, l);
add_pathsep(buf);
l = STRLEN(buf);
vim_strncpy(buf + l, pat, MAXPATHL - 1 - l);
/* Expand matches in one directory of $PATH. */
ret = expand_wildcards(1, &buf, num_file, file, flags);
if (ret == OK)
{
if (ga_grow(&ga, *num_file) == FAIL)
FreeWild(*num_file, *file);
else
{
for (i = 0; i < *num_file; ++i)
{
s = (*file)[i];
if (STRLEN(s) > l)
{
/* Remove the path again. */
mch_memmove(s, s + l, STRLEN(s + l) + 1);
((char_u **)ga.ga_data)[ga.ga_len] = s;
++ga.ga_len;
}
else
vim_free(s);
}
vim_free(*file);
}
}
if (*e != NUL)
++e;
}
*file = ga.ga_data;
*num_file = ga.ga_len;
vim_free(buf);
vim_free(pat);
if (mustfree)
vim_free(path);
return ret;
}
*file = (char_u **)""; *file = (char_u **)"";
*num_file = 0; *num_file = 0;
if (xp->xp_context == EXPAND_HELP) if (xp->xp_context == EXPAND_HELP)

View File

@ -609,6 +609,10 @@
# define FEAT_MBYTE # define FEAT_MBYTE
#endif #endif
/* Define this if you want to use 16 bit Unicode only, reduces memory used for
* the screen structures. */
/* #define UNICODE16 */
/* /*
* +multi_byte_ime Win32 IME input method. Requires +multi_byte. * +multi_byte_ime Win32 IME input method. Requires +multi_byte.
* Only for far-east Windows, so IME can be used to input * Only for far-east Windows, so IME can be used to input
@ -732,7 +736,7 @@
/* /*
* GUI tabline * GUI tabline
*/ */
#if defined(FEAT_GUI_GTK) && defined(HAVE_GTK2) && defined(FEAT_WINDOWS) #if defined(FEAT_GUI_GTK) && defined(FEAT_WINDOWS)
# define FEAT_GUI_TABLINE # define FEAT_GUI_TABLINE
#endif #endif

View File

@ -12,11 +12,11 @@
*/ */
#if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64)
# include <io.h> /* for lseek(), must be before vim.h */ # include "vimio.h" /* for lseek(), must be before vim.h */
#endif #endif
#if defined __EMX__ #if defined __EMX__
# include <io.h> /* for mktemp(), CJW 1997-12-03 */ # include "vimio.h" /* for mktemp(), CJW 1997-12-03 */
#endif #endif
#include "vim.h" #include "vim.h"

View File

@ -53,8 +53,9 @@ EXTERN char_u *LineWraps INIT(= NULL); /* line wraps to next line */
* Note: These three are only allocated when enc_utf8 is set! * Note: These three are only allocated when enc_utf8 is set!
*/ */
EXTERN u8char_T *ScreenLinesUC INIT(= NULL); /* decoded UTF-8 characters */ EXTERN u8char_T *ScreenLinesUC INIT(= NULL); /* decoded UTF-8 characters */
EXTERN u8char_T *ScreenLinesC1 INIT(= NULL); /* first composing char */ EXTERN u8char_T *ScreenLinesC[MAX_MCO]; /* composing characters */
EXTERN u8char_T *ScreenLinesC2 INIT(= NULL); /* second composing char */ EXTERN int Screen_mco INIT(= 0); /* value of p_mco used when
allocating ScreenLinesC[] */
/* Only used for euc-jp: Second byte of a character that starts with 0x8e. /* Only used for euc-jp: Second byte of a character that starts with 0x8e.
* These are single-width. */ * These are single-width. */

View File

@ -391,6 +391,8 @@ typedef struct Gui
PangoContext *text_context; /* the context used for all text */ PangoContext *text_context; /* the context used for all text */
PangoFont *ascii_font; /* cached font for ASCII strings */ PangoFont *ascii_font; /* cached font for ASCII strings */
PangoGlyphString *ascii_glyphs; /* cached code point -> glyph map */ PangoGlyphString *ascii_glyphs; /* cached code point -> glyph map */
# endif
# ifdef FEAT_GUI_TABLINE
GtkWidget *tabline; /* tab pages line handle */ GtkWidget *tabline; /* tab pages line handle */
# endif # endif

View File

@ -61,7 +61,7 @@ general_beval_cb(beval, state)
++textlock; ++textlock;
vim_free(result); vim_free(result);
result = eval_to_string(p_bexpr, NULL); result = eval_to_string(p_bexpr, NULL, TRUE);
if (use_sandbox) if (use_sandbox)
--sandbox; --sandbox;

View File

@ -3187,6 +3187,10 @@ on_select_tab(
} }
} }
#ifndef HAVE_GTK2
static int showing_tabline = 0;
#endif
/* /*
* Show or hide the tabline. * Show or hide the tabline.
*/ */
@ -3196,11 +3200,19 @@ gui_mch_show_tabline(int showit)
if (gui.tabline == NULL) if (gui.tabline == NULL)
return; return;
#ifdef HAVE_GTK2
/* gtk_notebook_get_show_tabs does not exist in gtk+-1.2.10 */
if (!showit != !gtk_notebook_get_show_tabs(GTK_NOTEBOOK(gui.tabline))) if (!showit != !gtk_notebook_get_show_tabs(GTK_NOTEBOOK(gui.tabline)))
#else
if (!showit != !showing_tabline)
#endif
{ {
/* Note: this may cause a resize event */ /* Note: this may cause a resize event */
gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gui.tabline), showit); gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gui.tabline), showit);
update_window_manager_hints(); update_window_manager_hints();
#ifndef HAVE_GTK2
showing_tabline = showit;
#endif
} }
} }
@ -3211,7 +3223,13 @@ gui_mch_show_tabline(int showit)
gui_mch_showing_tabline(void) gui_mch_showing_tabline(void)
{ {
return gui.tabline != NULL return gui.tabline != NULL
&& gtk_notebook_get_show_tabs(GTK_NOTEBOOK(gui.tabline)); #ifdef HAVE_GTK2
/* gtk_notebook_get_show_tabs does not exist in gtk+-1.2.10 */
&& gtk_notebook_get_show_tabs(GTK_NOTEBOOK(gui.tabline))
#else
&& showing_tabline
#endif
;
} }
/* /*
@ -4456,7 +4474,9 @@ gui_mch_font_dialog(char_u *oldval)
if (gui.fontname != NULL) if (gui.fontname != NULL)
{ {
fontname = vim_strsave(gui.fontname); /* Apparently some font names include a comma, need to escape that,
* because in 'guifont' it separates names. */
fontname = vim_strsave_escaped(gui.fontname, (char_u *)",");
g_free(gui.fontname); g_free(gui.fontname);
gui.fontname = NULL; gui.fontname = NULL;
} }
@ -4526,11 +4546,19 @@ gui_mch_font_dialog(char_u *oldval)
GTK_FONT_SELECTION_DIALOG(dialog)); GTK_FONT_SELECTION_DIALOG(dialog));
if (name != NULL) if (name != NULL)
{ {
if (input_conv.vc_type != CONV_NONE) char_u *p;
fontname = string_convert(&input_conv, (char_u *)name, NULL);
else /* Apparently some font names include a comma, need to escape
fontname = vim_strsave((char_u *)name); * that, because in 'guifont' it separates names. */
p = vim_strsave_escaped((char_u *)name, (char_u *)",");
g_free(name); g_free(name);
if (input_conv.vc_type != CONV_NONE)
{
fontname = string_convert(&input_conv, p, NULL);
vim_free(p);
}
else
fontname = p;
} }
} }

View File

@ -2025,12 +2025,26 @@ gui_mch_draw_string(
int clen; /* string length up to composing char */ int clen; /* string length up to composing char */
int cells; /* cell width of string up to composing char */ int cells; /* cell width of string up to composing char */
int cw; /* width of current cell */ int cw; /* width of current cell */
int c;
int xtra;
cells = 0; cells = 0;
for (clen = 0; i < len; ) for (clen = 0; i < len; )
{ {
unicodebuf[clen] = utf_ptr2char(text + i); c = utf_ptr2char(text + i);
cw = utf_char2cells(unicodebuf[clen]); if (c >= 0x10000)
{
/* Turn into UTF-16 encoding. */
unicodebuf[clen] = ((c - 0x10000) >> 10) + 0xD800;
unicodebuf[clen + 1] = ((c - 0x10000) & 0x3ff) + 0xDC00;
xtra = 1;
}
else
{
unicodebuf[clen] = c;
xtra = 0;
}
cw = utf_char2cells(c);
if (cw > 2) /* don't use 4 for unprintable char */ if (cw > 2) /* don't use 4 for unprintable char */
cw = 1; cw = 1;
if (unicodepdy != NULL) if (unicodepdy != NULL)
@ -2039,10 +2053,12 @@ gui_mch_draw_string(
* when the font uses different widths (e.g., bold character * when the font uses different widths (e.g., bold character
* is wider). */ * is wider). */
unicodepdy[clen] = cw * gui.char_width; unicodepdy[clen] = cw * gui.char_width;
if (xtra == 1)
unicodepdy[clen + 1] = cw * gui.char_width;
} }
cells += cw; cells += cw;
i += utfc_ptr2len_len(text + i, len - i); i += utfc_ptr2len_len(text + i, len - i);
++clen; clen += xtra + 1;
} }
ExtTextOutW(s_hdc, TEXT_X(col), TEXT_Y(row), ExtTextOutW(s_hdc, TEXT_X(col), TEXT_Y(row),
foptions, pcliprect, unicodebuf, clen, unicodepdy); foptions, pcliprect, unicodebuf, clen, unicodepdy);

View File

@ -22,7 +22,7 @@
# include <sys/wait.h> # include <sys/wait.h>
#else #else
/* not UNIX, must be WIN32 */ /* not UNIX, must be WIN32 */
# include <io.h> # include "vimio.h"
# include <fcntl.h> # include <fcntl.h>
# include <process.h> # include <process.h>
# define STDIN_FILENO 0 # define STDIN_FILENO 0

View File

@ -1249,7 +1249,7 @@ vim_eval(void *data, int argc, Scheme_Object **argv)
expr = SCHEME_STR_VAL(GUARANTEE_STRING(prim->name, 0)); expr = SCHEME_STR_VAL(GUARANTEE_STRING(prim->name, 0));
str = (char *)eval_to_string((char_u *)expr, NULL); str = (char *)eval_to_string((char_u *)expr, NULL, TRUE);
if (str == NULL) if (str == NULL)
raise_vim_exn(_("invalid expression")); raise_vim_exn(_("invalid expression"));

View File

@ -368,7 +368,7 @@ CVim::Eval(BSTR expr, BSTR *result)
/* Evaluate the expression */ /* Evaluate the expression */
++emsg_skip; ++emsg_skip;
str = (char *)eval_to_string((char_u *)buffer, NULL); str = (char *)eval_to_string((char_u *)buffer, NULL, TRUE);
--emsg_skip; --emsg_skip;
vim_free(buffer); vim_free(buffer);
if (str == NULL) if (str == NULL)

View File

@ -427,9 +427,10 @@ msg_split(s, attr)
* work properly. * work properly.
*/ */
char_u * char_u *
eval_to_string(arg, nextcmd) eval_to_string(arg, nextcmd, dolist)
char_u *arg; char_u *arg;
char_u **nextcmd; char_u **nextcmd;
int dolist;
{ {
return NULL; return NULL;
} }
@ -827,7 +828,7 @@ Eval(str)
PREINIT: PREINIT:
char_u *value; char_u *value;
PPCODE: PPCODE:
value = eval_to_string((char_u *)str, (char_u**)0); value = eval_to_string((char_u *)str, (char_u **)0, TRUE);
if (value == NULL) if (value == NULL)
{ {
XPUSHs(sv_2mortal(newSViv(0))); XPUSHs(sv_2mortal(newSViv(0)));

View File

@ -519,7 +519,7 @@ static VALUE vim_command(VALUE self, VALUE str)
static VALUE vim_evaluate(VALUE self, VALUE str) static VALUE vim_evaluate(VALUE self, VALUE str)
{ {
#ifdef FEAT_EVAL #ifdef FEAT_EVAL
char_u *value = eval_to_string((char_u *)STR2CSTR(str), NULL); char_u *value = eval_to_string((char_u *)STR2CSTR(str), NULL, TRUE);
if (value) if (value)
{ {

View File

@ -12,7 +12,7 @@
#ifdef WIN32 #ifdef WIN32
# include <stdio.h> # include <stdio.h>
# include <fcntl.h> # include <fcntl.h>
# include <io.h> # include "vimio.h"
# include <process.h> # include <process.h>
# include <string.h> # include <string.h>
# include <assert.h> # include <assert.h>

View File

@ -1407,7 +1407,7 @@ tclvimexpr(interp, objc, objv, objn)
#ifdef FEAT_EVAL #ifdef FEAT_EVAL
expr = Tcl_GetStringFromObj(objv[objn], NULL); expr = Tcl_GetStringFromObj(objv[objn], NULL);
str = (char *)eval_to_string((char_u *)expr, NULL); str = (char *)eval_to_string((char_u *)expr, NULL, TRUE);
if (str == NULL) if (str == NULL)
Tcl_SetResult(interp, _("invalid expression"), TCL_STATIC); Tcl_SetResult(interp, _("invalid expression"), TCL_STATIC);
else else

View File

@ -8,7 +8,7 @@
*/ */
#if defined(MSDOS) || defined(WIN32) || defined(_WIN64) #if defined(MSDOS) || defined(WIN32) || defined(_WIN64)
# include <io.h> /* for close() and dup() */ # include "vimio.h" /* for close() and dup() */
#endif #endif
#define EXTERN #define EXTERN
@ -3602,7 +3602,7 @@ eval_client_expr_to_string(expr)
redir_off = 0; redir_off = 0;
++emsg_skip; ++emsg_skip;
res = eval_to_string(expr, NULL); res = eval_to_string(expr, NULL, TRUE);
debug_break_level = save_dbl; debug_break_level = save_dbl;
redir_off = save_ro; redir_off = save_ro;

View File

@ -1486,55 +1486,59 @@ utf_composinglike(p1, p2)
#endif #endif
/* /*
* Convert a UTF-8 byte string to a wide chararacter. Also get up to two * Convert a UTF-8 byte string to a wide chararacter. Also get up to MAX_MCO
* composing characters. * composing characters.
*/ */
int int
utfc_ptr2char(p, p1, p2) utfc_ptr2char(p, pcc)
char_u *p; char_u *p;
int *p1; /* return: first composing char or 0 */ int *pcc; /* return: composing chars, last one is 0 */
int *p2; /* return: second composing char or 0 */
{ {
int len; int len;
int c; int c;
int cc; int cc;
int i = 0;
c = utf_ptr2char(p); c = utf_ptr2char(p);
len = utf_ptr2len(p); len = utf_ptr2len(p);
/* Only accept a composing char when the first char isn't illegal. */ /* Only accept a composing char when the first char isn't illegal. */
if ((len > 1 || *p < 0x80) if ((len > 1 || *p < 0x80)
&& p[len] >= 0x80 && p[len] >= 0x80
&& UTF_COMPOSINGLIKE(p, p + len)) && UTF_COMPOSINGLIKE(p, p + len))
{ {
*p1 = utf_ptr2char(p + len); cc = utf_ptr2char(p + len);
len += utf_ptr2len(p + len); for (;;)
if (p[len] >= 0x80 && utf_iscomposing(cc = utf_ptr2char(p + len)))
*p2 = cc;
else
*p2 = 0;
}
else
{ {
*p1 = 0; pcc[i++] = cc;
*p2 = 0; if (i == MAX_MCO)
break;
len += utf_ptr2len(p + len);
if (p[len] < 0x80 || !utf_iscomposing(cc = utf_ptr2char(p + len)))
break;
} }
}
if (i < MAX_MCO) /* last composing char must be 0 */
pcc[i] = 0;
return c; return c;
} }
/* /*
* Convert a UTF-8 byte string to a wide chararacter. Also get up to two * Convert a UTF-8 byte string to a wide chararacter. Also get up to MAX_MCO
* composing characters. Use no more than p[maxlen]. * composing characters. Use no more than p[maxlen].
*/ */
int int
utfc_ptr2char_len(p, p1, p2, maxlen) utfc_ptr2char_len(p, pcc, maxlen)
char_u *p; char_u *p;
int *p1; /* return: first composing char or 0 */ int *pcc; /* return: composing chars, last one is 0 */
int *p2; /* return: second composing char or 0 */
int maxlen; int maxlen;
{ {
int len; int len;
int c; int c;
int cc; int cc;
int i = 0;
c = utf_ptr2char(p); c = utf_ptr2char(p);
len = utf_ptr2len_len(p, maxlen); len = utf_ptr2len_len(p, maxlen);
@ -1544,20 +1548,23 @@ utfc_ptr2char_len(p, p1, p2, maxlen)
&& p[len] >= 0x80 && p[len] >= 0x80
&& UTF_COMPOSINGLIKE(p, p + len)) && UTF_COMPOSINGLIKE(p, p + len))
{ {
*p1 = utf_ptr2char(p + len); cc = utf_ptr2char(p + len);
len += utf_ptr2len_len(p + len, maxlen - len); for (;;)
if (len < maxlen
&& p[len] >= 0x80
&& utf_iscomposing(cc = utf_ptr2char(p + len)))
*p2 = cc;
else
*p2 = 0;
}
else
{ {
*p1 = 0; pcc[i++] = cc;
*p2 = 0; if (i == MAX_MCO)
break;
len += utf_ptr2len_len(p + len, maxlen - len);
if (len >= maxlen
|| p[len] < 0x80
|| !utf_iscomposing(cc = utf_ptr2char(p + len)))
break;
} }
}
if (i < MAX_MCO) /* last composing char must be 0 */
pcc[i] = 0;
return c; return c;
} }
@ -1573,13 +1580,14 @@ utfc_char2bytes(off, buf)
char_u *buf; char_u *buf;
{ {
int len; int len;
int i;
len = utf_char2bytes(ScreenLinesUC[off], buf); len = utf_char2bytes(ScreenLinesUC[off], buf);
if (ScreenLinesC1[off] != 0) for (i = 0; i < Screen_mco; ++i)
{ {
len += utf_char2bytes(ScreenLinesC1[off], buf + len); if (ScreenLinesC[i][off] == 0)
if (ScreenLinesC2[off] != 0) break;
len += utf_char2bytes(ScreenLinesC2[off], buf + len); len += utf_char2bytes(ScreenLinesC[i][off], buf + len);
} }
return len; return len;
} }

View File

@ -33,7 +33,7 @@
*/ */
#if defined MSDOS || defined(WIN32) || defined(_WIN64) #if defined MSDOS || defined(WIN32) || defined(_WIN64)
# include <io.h> /* for lseek(), must be before vim.h */ # include "vimio.h" /* for lseek(), must be before vim.h */
#endif #endif
#include "vim.h" #include "vim.h"

View File

@ -43,7 +43,7 @@
*/ */
#if defined(MSDOS) || defined(WIN32) || defined(_WIN64) #if defined(MSDOS) || defined(WIN32) || defined(_WIN64)
# include <io.h> # include "vimio.h"
#endif #endif
#include "vim.h" #include "vim.h"

View File

@ -293,10 +293,12 @@ trunc_string(s, buf, room)
else if (enc_utf8) else if (enc_utf8)
{ {
/* For UTF-8 we can go backwards easily. */ /* For UTF-8 we can go backwards easily. */
i = (int)STRLEN(s); half = i = (int)STRLEN(s);
for (;;) for (;;)
{ {
half = i - (*mb_head_off)(s, s + i - 1) - 1; do
half = half - (*mb_head_off)(s, s + half - 1) - 1;
while (utf_iscomposing(utf_ptr2char(s + half)) && half > 0);
n = ptr2cells(s + half); n = ptr2cells(s + half);
if (len + n > room) if (len + n > room)
break; break;
@ -1723,7 +1725,7 @@ msg_puts_long_attr(longstr, attr)
char_u *longstr; char_u *longstr;
int attr; int attr;
{ {
msg_puts_long_len_attr(longstr, (int)strlen((char *)longstr), attr); msg_puts_long_len_attr(longstr, (int)STRLEN(longstr), attr);
} }
void void

View File

@ -2177,11 +2177,11 @@ del_bytes(count, fixpos, use_delcombine)
if (p_deco && use_delcombine && enc_utf8 if (p_deco && use_delcombine && enc_utf8
&& utfc_ptr2len(oldp + col) >= count) && utfc_ptr2len(oldp + col) >= count)
{ {
int c1, c2; int cc[MAX_MCO];
int n; int n;
(void)utfc_ptr2char(oldp + col, &c1, &c2); (void)utfc_ptr2char(oldp + col, cc);
if (c1 != NUL) if (cc[0] != NUL)
{ {
/* Find the last composing char, there can be several. */ /* Find the last composing char, there can be several. */
n = col; n = col;
@ -8056,6 +8056,7 @@ fast_breakcheck()
/* /*
* Expand wildcards. Calls gen_expand_wildcards() and removes files matching * Expand wildcards. Calls gen_expand_wildcards() and removes files matching
* 'wildignore'. * 'wildignore'.
* Returns OK or FAIL.
*/ */
int int
expand_wildcards(num_pat, pat, num_file, file, flags) expand_wildcards(num_pat, pat, num_file, file, flags)
@ -8898,7 +8899,7 @@ expand_backtick(gap, pat, flags)
#ifdef FEAT_EVAL #ifdef FEAT_EVAL
if (*cmd == '=') /* `={expr}`: Expand expression */ if (*cmd == '=') /* `={expr}`: Expand expression */
buffer = eval_to_string(cmd + 1, &p); buffer = eval_to_string(cmd + 1, &p, TRUE);
else else
#endif #endif
buffer = get_cmd_output(cmd, NULL, buffer = get_cmd_output(cmd, NULL,

12
src/msvcsetup.bat Normal file
View File

@ -0,0 +1,12 @@
rem To be used on MS-Windows when using the Visual C++ Toolkit 2003
rem See INSTALLpc.txt for information.
set PATH=%SystemRoot%\Microsoft.NET\Framework\v1.1.4322;%PATH%
call "%VCToolkitInstallDir%vcvars32.bat"
set MSVCVer=7.1
rem The platform SDK can be installed elsewhere, adjust the path.
call "%ProgramFiles%\Microsoft Platform SDK\SetEnv.Cmd"
rem call "e:\Microsoft Platform SDK\SetEnv.Cmd"
set LIB=%ProgramFiles%\Microsoft Visual Studio .NET 2003\Vc7\lib;%LIB%

View File

@ -26,7 +26,7 @@
# ifdef DEBUG # ifdef DEBUG
# include <tchar.h> /* for _T definition for TRACEn macros */ # include <tchar.h> /* for _T definition for TRACEn macros */
# endif # endif
# include <io.h> # include "vimio.h"
/* WinSock API is separated from C API, thus we can't use read(), write(), /* WinSock API is separated from C API, thus we can't use read(), write(),
* errno... */ * errno... */
# define sock_errno WSAGetLastError() # define sock_errno WSAGetLastError()

View File

@ -5691,9 +5691,9 @@ nv_right(cap)
|| (PAST_LINE && *ml_get_cursor() == NUL)) || (PAST_LINE && *ml_get_cursor() == NUL))
{ {
/* /*
* <Space> wraps to next line if 'whichwrap' bit 1 set. * <Space> wraps to next line if 'whichwrap' has 's'.
* 'l' wraps to next line if 'whichwrap' bit 2 set. * 'l' wraps to next line if 'whichwrap' has 'l'.
* CURS_RIGHT wraps to next line if 'whichwrap' bit 3 set * CURS_RIGHT wraps to next line if 'whichwrap' has '>'.
*/ */
if ( ((cap->cmdchar == ' ' if ( ((cap->cmdchar == ' '
&& vim_strchr(p_ww, 's') != NULL) && vim_strchr(p_ww, 's') != NULL)
@ -5706,8 +5706,7 @@ nv_right(cap)
/* When deleting we also count the NL as a character. /* When deleting we also count the NL as a character.
* Set cap->oap->inclusive when last char in the line is * Set cap->oap->inclusive when last char in the line is
* included, move to next line after that */ * included, move to next line after that */
if ( (cap->oap->op_type == OP_DELETE if ( cap->oap->op_type != OP_NOP
|| cap->oap->op_type == OP_CHANGE)
&& !cap->oap->inclusive && !cap->oap->inclusive
&& !lineempty(curwin->w_cursor.lnum)) && !lineempty(curwin->w_cursor.lnum))
cap->oap->inclusive = TRUE; cap->oap->inclusive = TRUE;

View File

@ -780,7 +780,7 @@ get_expr_line()
if (expr_copy == NULL) if (expr_copy == NULL)
return NULL; return NULL;
rv = eval_to_string(expr_copy, NULL); rv = eval_to_string(expr_copy, NULL, TRUE);
vim_free(expr_copy); vim_free(expr_copy);
return rv; return rv;
} }

View File

@ -414,6 +414,8 @@ struct vimoption
#define P_NFNAME 0x200000L/* only normal file name chars allowed */ #define P_NFNAME 0x200000L/* only normal file name chars allowed */
#define P_INSECURE 0x400000L/* option was set from a modeline */ #define P_INSECURE 0x400000L/* option was set from a modeline */
#define ISK_LATIN1 (char_u *)"@,48-57,_,192-255"
/* /*
* options[] is initialized here. * options[] is initialized here.
* The order of the options MUST be alphabetic for ":set all" and findoption(). * The order of the options MUST be alphabetic for ":set all" and findoption().
@ -848,8 +850,7 @@ static struct vimoption
#else #else
(char_u *)NULL, PV_NONE, (char_u *)NULL, PV_NONE,
#endif #endif
{(char_u *)FALSE, (char_u *)0L} {(char_u *)FALSE, (char_u *)0L}},
},
{"dictionary", "dict", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP, {"dictionary", "dict", P_STRING|P_EXPAND|P_VI_DEF|P_COMMA|P_NODUP,
#ifdef FEAT_INS_EXPAND #ifdef FEAT_INS_EXPAND
(char_u *)&p_dict, PV_DICT, (char_u *)&p_dict, PV_DICT,
@ -1423,7 +1424,7 @@ static struct vimoption
# if defined(MSDOS) || defined(MSWIN) || defined(OS2) # if defined(MSDOS) || defined(MSWIN) || defined(OS2)
(char_u *)"@,48-57,_,128-167,224-235" (char_u *)"@,48-57,_,128-167,224-235"
# else # else
(char_u *)"@,48-57,_,192-255" ISK_LATIN1
# endif # endif
#endif #endif
}}, }},
@ -1602,6 +1603,13 @@ static struct vimoption
{"matchtime", "mat", P_NUM|P_VI_DEF, {"matchtime", "mat", P_NUM|P_VI_DEF,
(char_u *)&p_mat, PV_NONE, (char_u *)&p_mat, PV_NONE,
{(char_u *)5L, (char_u *)0L}}, {(char_u *)5L, (char_u *)0L}},
{"maxcombine", "mco", P_NUM|P_VI_DEF,
#ifdef FEAT_MBYTE
(char_u *)&p_mco, PV_NONE,
#else
(char_u *)NULL, PV_NONE,
#endif
{(char_u *)2, (char_u *)0L}},
{"maxfuncdepth", "mfd", P_NUM|P_VI_DEF, {"maxfuncdepth", "mfd", P_NUM|P_VI_DEF,
#ifdef FEAT_EVAL #ifdef FEAT_EVAL
(char_u *)&p_mfd, PV_NONE, (char_u *)&p_mfd, PV_NONE,
@ -3198,9 +3206,17 @@ set_init_1()
# endif # endif
) )
{ {
/* Adjust the default for 'isprint' to match latin1. */ /* Adjust the default for 'isprint' and 'iskeyword' to match
* latin1. Also set the defaults for when 'nocompatible' is
* set. */
set_string_option_direct((char_u *)"isp", -1, set_string_option_direct((char_u *)"isp", -1,
(char_u *)"@,161-255", OPT_FREE, SID_NONE); (char_u *)"@,161-255", OPT_FREE, SID_NONE);
set_string_option_direct((char_u *)"isk", -1,
ISK_LATIN1, OPT_FREE, SID_NONE);
opt_idx = findoption((char_u *)"isp");
options[opt_idx].def_val[VIM_DEFAULT] = (char_u *)"@,161-255";
opt_idx = findoption((char_u *)"isk");
options[opt_idx].def_val[VIM_DEFAULT] = ISK_LATIN1;
(void)init_chartab(); (void)init_chartab();
} }
#endif #endif
@ -7564,6 +7580,18 @@ set_num_option(opt_idx, varp, value, errbuf, errbuflen, opt_flags)
} }
#endif /* FEAT_FOLDING */ #endif /* FEAT_FOLDING */
#ifdef FEAT_MBYTE
/* 'maxcombine' */
else if (pp == &p_mco)
{
if (p_mco > MAX_MCO)
p_mco = MAX_MCO;
else if (p_mco < 0)
p_mco = 0;
screenclear(); /* will re-allocate the screen */
}
#endif
else if (pp == &curbuf->b_p_iminsert) else if (pp == &curbuf->b_p_iminsert)
{ {
if (curbuf->b_p_iminsert < 0 || curbuf->b_p_iminsert > B_IMODE_LAST) if (curbuf->b_p_iminsert < 0 || curbuf->b_p_iminsert > B_IMODE_LAST)

View File

@ -583,6 +583,9 @@ EXTERN char_u *p_mef; /* 'makeef' */
EXTERN char_u *p_mp; /* 'makeprg' */ EXTERN char_u *p_mp; /* 'makeprg' */
#endif #endif
EXTERN long p_mat; /* 'matchtime' */ EXTERN long p_mat; /* 'matchtime' */
#ifdef FEAT_MBYTE
EXTERN long p_mco; /* 'maxcombine' */
#endif
#ifdef FEAT_EVAL #ifdef FEAT_EVAL
EXTERN long p_mfd; /* 'maxfuncdepth' */ EXTERN long p_mfd; /* 'maxfuncdepth' */
#endif #endif

View File

@ -21,7 +21,7 @@
* Some functions are also used for Win16 (MS-Windows 3.1). * Some functions are also used for Win16 (MS-Windows 3.1).
*/ */
#include <io.h> #include "vimio.h"
#include "vim.h" #include "vim.h"
#include <conio.h> #include <conio.h>

View File

@ -22,7 +22,7 @@
# endif # endif
#endif #endif
#include <io.h> #include "vimio.h"
#include "vim.h" #include "vim.h"
#ifdef HAVE_FCNTL_H #ifdef HAVE_FCNTL_H

View File

@ -20,7 +20,7 @@
# pragma warn -obs # pragma warn -obs
#endif #endif
#include <io.h> #include "vimio.h"
#include "vim.h" #include "vim.h"
#include <fcntl.h> #include <fcntl.h>

View File

@ -20,7 +20,7 @@
* Roger Knobbe <rogerk@wonderware.com> did the initial port of Vim 3.0. * Roger Knobbe <rogerk@wonderware.com> did the initial port of Vim 3.0.
*/ */
#include <io.h> #include "vimio.h"
#include "vim.h" #include "vim.h"
#ifdef FEAT_MZSCHEME #ifdef FEAT_MZSCHEME
@ -1926,6 +1926,7 @@ RestoreConsoleBuffer(
return TRUE; return TRUE;
} }
#define FEAT_RESTORE_ORIG_SCREEN
#ifdef FEAT_RESTORE_ORIG_SCREEN #ifdef FEAT_RESTORE_ORIG_SCREEN
static ConsoleBuffer g_cbOrig = { 0 }; static ConsoleBuffer g_cbOrig = { 0 };
#endif #endif

View File

@ -17,7 +17,7 @@ void eval_patch __ARGS((char_u *origfile, char_u *difffile, char_u *outfile));
int eval_to_bool __ARGS((char_u *arg, int *error, char_u **nextcmd, int skip)); int eval_to_bool __ARGS((char_u *arg, int *error, char_u **nextcmd, int skip));
char_u *eval_to_string_skip __ARGS((char_u *arg, char_u **nextcmd, int skip)); char_u *eval_to_string_skip __ARGS((char_u *arg, char_u **nextcmd, int skip));
int skip_expr __ARGS((char_u **pp)); int skip_expr __ARGS((char_u **pp));
char_u *eval_to_string __ARGS((char_u *arg, char_u **nextcmd)); char_u *eval_to_string __ARGS((char_u *arg, char_u **nextcmd, int dolist));
char_u *eval_to_string_safe __ARGS((char_u *arg, char_u **nextcmd, int use_sandbox)); char_u *eval_to_string_safe __ARGS((char_u *arg, char_u **nextcmd, int use_sandbox));
int eval_to_number __ARGS((char_u *expr)); int eval_to_number __ARGS((char_u *expr));
list_T *eval_spell_expr __ARGS((char_u *badword, char_u *expr)); list_T *eval_spell_expr __ARGS((char_u *badword, char_u *expr));

View File

@ -22,8 +22,8 @@ int mb_cptr2char_adv __ARGS((char_u **pp));
int arabic_combine __ARGS((int one, int two)); int arabic_combine __ARGS((int one, int two));
int arabic_maycombine __ARGS((int two)); int arabic_maycombine __ARGS((int two));
int utf_composinglike __ARGS((char_u *p1, char_u *p2)); int utf_composinglike __ARGS((char_u *p1, char_u *p2));
int utfc_ptr2char __ARGS((char_u *p, int *p1, int *p2)); int utfc_ptr2char __ARGS((char_u *p, int *pcc));
int utfc_ptr2char_len __ARGS((char_u *p, int *p1, int *p2, int maxlen)); int utfc_ptr2char_len __ARGS((char_u *p, int *pcc, int maxlen));
int utfc_char2bytes __ARGS((int off, char_u *buf)); int utfc_char2bytes __ARGS((int off, char_u *buf));
int utf_ptr2len __ARGS((char_u *p)); int utf_ptr2len __ARGS((char_u *p));
int utf_byte2len __ARGS((int b)); int utf_byte2len __ARGS((int b));

View File

@ -16,6 +16,7 @@ void spell_suggest __ARGS((int count));
void ex_spellrepall __ARGS((exarg_T *eap)); void ex_spellrepall __ARGS((exarg_T *eap));
void spell_suggest_list __ARGS((garray_T *gap, char_u *word, int maxcount, int need_cap, int interactive)); void spell_suggest_list __ARGS((garray_T *gap, char_u *word, int maxcount, int need_cap, int interactive));
char_u *eval_soundfold __ARGS((char_u *word)); char_u *eval_soundfold __ARGS((char_u *word));
void ex_spellinfo __ARGS((exarg_T *eap));
void ex_spelldump __ARGS((exarg_T *eap)); void ex_spelldump __ARGS((exarg_T *eap));
void spell_dump_compl __ARGS((buf_T *buf, char_u *pat, int ic, int *dir, int dumpflags_arg)); void spell_dump_compl __ARGS((buf_T *buf, char_u *pat, int ic, int *dir, int dumpflags_arg));
char_u *spell_to_word_end __ARGS((char_u *start, buf_T *buf)); char_u *spell_to_word_end __ARGS((char_u *start, buf_T *buf));

View File

@ -665,6 +665,9 @@ static char_u *regconcat __ARGS((int *flagp));
static char_u *regpiece __ARGS((int *)); static char_u *regpiece __ARGS((int *));
static char_u *regatom __ARGS((int *)); static char_u *regatom __ARGS((int *));
static char_u *regnode __ARGS((int)); static char_u *regnode __ARGS((int));
#ifdef FEAT_MBYTE
static int use_multibytecode __ARGS((int c));
#endif
static int prog_magic_wrong __ARGS((void)); static int prog_magic_wrong __ARGS((void));
static char_u *regnext __ARGS((char_u *)); static char_u *regnext __ARGS((char_u *));
static void regc __ARGS((int b)); static void regc __ARGS((int b));
@ -1662,6 +1665,15 @@ regatom(flagp)
p = vim_strchr(classchars, no_Magic(c)); p = vim_strchr(classchars, no_Magic(c));
if (p == NULL) if (p == NULL)
EMSG_RET_NULL(_("E63: invalid use of \\_")); EMSG_RET_NULL(_("E63: invalid use of \\_"));
#ifdef FEAT_MBYTE
/* When '.' is followed by a composing char ignore the dot, so that
* the composing char is matched here. */
if (enc_utf8 && c == Magic('.') && utf_iscomposing(peekchr()))
{
c = getchr();
goto do_multibyte;
}
#endif
ret = regnode(classcodes[p - classchars] + extra); ret = regnode(classcodes[p - classchars] + extra);
*flagp |= HASWIDTH | SIMPLE; *flagp |= HASWIDTH | SIMPLE;
break; break;
@ -1921,6 +1933,11 @@ regatom(flagp)
EMSG_M_RET_NULL( EMSG_M_RET_NULL(
_("E678: Invalid character after %s%%[dxouU]"), _("E678: Invalid character after %s%%[dxouU]"),
reg_magic == MAGIC_ALL); reg_magic == MAGIC_ALL);
#ifdef FEAT_MBYTE
if (use_multibytecode(i))
ret = regnode(MULTIBYTECODE);
else
#endif
ret = regnode(EXACTLY); ret = regnode(EXACTLY);
if (i == 0) if (i == 0)
regc(0x0a); regc(0x0a);
@ -2289,10 +2306,10 @@ collection:
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
/* A multi-byte character is handled as a separate atom if it's /* A multi-byte character is handled as a separate atom if it's
* before a multi. */ * before a multi and when it's a composing char. */
if (has_mbyte && (*mb_char2len)(c) > 1 if (use_multibytecode(c))
&& re_multi_type(peekchr()) != NOT_MULTI)
{ {
do_multibyte:
ret = regnode(MULTIBYTECODE); ret = regnode(MULTIBYTECODE);
regmbc(c); regmbc(c);
*flagp |= HASWIDTH | SIMPLE; *flagp |= HASWIDTH | SIMPLE;
@ -2323,29 +2340,19 @@ collection:
regmbc(c); regmbc(c);
if (enc_utf8) if (enc_utf8)
{ {
int off;
int l; int l;
/* Need to get composing character too, directly /* Need to get composing character too. */
* access regparse for that, because skipchr() skips
* over composing chars. */
ungetchr();
if (*regparse == '\\' && regparse[1] != NUL)
off = 1;
else
off = 0;
for (;;) for (;;)
{ {
l = utf_ptr2len(regparse + off); l = utf_ptr2len(regparse);
if (!UTF_COMPOSINGLIKE(regparse + off, if (!UTF_COMPOSINGLIKE(regparse, regparse + l))
regparse + off + l))
break; break;
off += l; regmbc(utf_ptr2char(regparse));
regmbc(utf_ptr2char(regparse + off));
}
skipchr(); skipchr();
} }
} }
}
else else
#endif #endif
regc(c); regc(c);
@ -2364,6 +2371,21 @@ collection:
return ret; return ret;
} }
#ifdef FEAT_MBYTE
/*
* Return TRUE if MULTIBYTECODE should be used instead of EXACTLY for
* character "c".
*/
static int
use_multibytecode(c)
int c;
{
return has_mbyte && (*mb_char2len)(c) > 1
&& (re_multi_type(peekchr()) != NOT_MULTI
|| (enc_utf8 && utf_iscomposing(c)));
}
#endif
/* /*
* emit a node * emit a node
* Return pointer to generated code. * Return pointer to generated code.
@ -2747,7 +2769,9 @@ skipchr()
if (regparse[prevchr_len] != NUL) if (regparse[prevchr_len] != NUL)
{ {
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
if (has_mbyte) if (enc_utf8)
prevchr_len += utf_char2len(mb_ptr2char(regparse + prevchr_len));
else if (has_mbyte)
prevchr_len += (*mb_ptr2len)(regparse + prevchr_len); prevchr_len += (*mb_ptr2len)(regparse + prevchr_len);
else else
#endif #endif
@ -4229,6 +4253,7 @@ regmatch(scan)
{ {
int i, len; int i, len;
char_u *opnd; char_u *opnd;
int opndc, inpc;
opnd = OPERAND(scan); opnd = OPERAND(scan);
/* Safety check (just in case 'encoding' was changed since /* Safety check (just in case 'encoding' was changed since
@ -4238,6 +4263,31 @@ regmatch(scan)
status = RA_NOMATCH; status = RA_NOMATCH;
break; break;
} }
if (enc_utf8)
opndc = mb_ptr2char(opnd);
if (enc_utf8 && utf_iscomposing(opndc))
{
/* When only a composing char is given match at any
* position where that composing char appears. */
status = RA_NOMATCH;
for (i = 0; reginput[i] != NUL; i += utf_char2len(inpc))
{
inpc = mb_ptr2char(reginput + i);
if (!utf_iscomposing(inpc))
{
if (i > 0)
break;
}
else if (opndc == inpc)
{
/* Include all following composing chars. */
len = i + mb_ptr2len(reginput + i);
status = RA_MATCH;
break;
}
}
}
else
for (i = 0; i < len; ++i) for (i = 0; i < len; ++i)
if (opnd[i] != reginput[i]) if (opnd[i] != reginput[i])
{ {
@ -6745,7 +6795,7 @@ vim_regsub_both(source, dest, copy, magic, backslash)
save_ireg_ic = ireg_ic; save_ireg_ic = ireg_ic;
can_f_submatch = TRUE; can_f_submatch = TRUE;
eval_result = eval_to_string(source + 2, NULL); eval_result = eval_to_string(source + 2, NULL, TRUE);
if (eval_result != NULL) if (eval_result != NULL)
{ {
for (s = eval_result; *s != NUL; mb_ptr_adv(s)) for (s = eval_result; *s != NUL; mb_ptr_adv(s))

View File

@ -27,7 +27,7 @@
* ScreenLinesUC[]. ScreenLines[] contains the first byte only. For an ASCII * ScreenLinesUC[]. ScreenLines[] contains the first byte only. For an ASCII
* character without composing chars ScreenLinesUC[] will be 0. When the * character without composing chars ScreenLinesUC[] will be 0. When the
* character occupies two display cells the next byte in ScreenLines[] is 0. * character occupies two display cells the next byte in ScreenLines[] is 0.
* ScreenLinesC1[] and ScreenLinesC2[] contain up to two composing characters * ScreenLinesC[][] contain up to 'maxcombine' composing characters
* (drawn on top of the first character). They are 0 when not used. * (drawn on top of the first character). They are 0 when not used.
* ScreenLines2[] is only used for euc-jp to store the second byte if the * ScreenLines2[] is only used for euc-jp to store the second byte if the
* first byte is 0x8e (single-width character). * first byte is 0x8e (single-width character).
@ -2187,7 +2187,8 @@ fold_line(wp, fold_count, foldinfo, lnum, row)
if (has_mbyte) if (has_mbyte)
{ {
int cells; int cells;
int u8c, u8c_c1, u8c_c2; int u8c, u8cc[MAX_MCO];
int i;
int idx; int idx;
int c_len; int c_len;
char_u *p; char_u *p;
@ -2217,8 +2218,8 @@ fold_line(wp, fold_count, foldinfo, lnum, row)
ScreenLines[idx] = *p; ScreenLines[idx] = *p;
if (enc_utf8) if (enc_utf8)
{ {
u8c = utfc_ptr2char(p, &u8c_c1, &u8c_c2); u8c = utfc_ptr2char(p, u8cc);
if (*p < 0x80 && u8c_c1 == 0 && u8c_c2 == 0) if (*p < 0x80 && u8cc[0] == 0)
{ {
ScreenLinesUC[idx] = 0; ScreenLinesUC[idx] = 0;
#ifdef FEAT_ARABIC #ifdef FEAT_ARABIC
@ -2231,7 +2232,8 @@ fold_line(wp, fold_count, foldinfo, lnum, row)
if (p_arshape && !p_tbidi && ARABIC_CHAR(u8c)) if (p_arshape && !p_tbidi && ARABIC_CHAR(u8c))
{ {
/* Do Arabic shaping. */ /* Do Arabic shaping. */
int pc, pc1, nc, dummy; int pc, pc1, nc;
int pcc[MAX_MCO];
int firstbyte = *p; int firstbyte = *p;
/* The idea of what is the previous and next /* The idea of what is the previous and next
@ -2241,16 +2243,17 @@ fold_line(wp, fold_count, foldinfo, lnum, row)
pc = prev_c; pc = prev_c;
pc1 = prev_c1; pc1 = prev_c1;
nc = utf_ptr2char(p + c_len); nc = utf_ptr2char(p + c_len);
prev_c1 = u8c_c1; prev_c1 = u8cc[0];
} }
else else
{ {
pc = utfc_ptr2char(p + c_len, &pc1, &dummy); pc = utfc_ptr2char(p + c_len, pcc);
nc = prev_c; nc = prev_c;
pc1 = pcc[0];
} }
prev_c = u8c; prev_c = u8c;
u8c = arabic_shape(u8c, &firstbyte, &u8c_c1, u8c = arabic_shape(u8c, &firstbyte, &u8cc[0],
pc, pc1, nc); pc, pc1, nc);
ScreenLines[idx] = firstbyte; ScreenLines[idx] = firstbyte;
} }
@ -2262,8 +2265,12 @@ fold_line(wp, fold_count, foldinfo, lnum, row)
ScreenLinesUC[idx] = (cells == 2) ? 0xff1f : (int)'?'; ScreenLinesUC[idx] = (cells == 2) ? 0xff1f : (int)'?';
else else
ScreenLinesUC[idx] = u8c; ScreenLinesUC[idx] = u8c;
ScreenLinesC1[idx] = u8c_c1; for (i = 0; i < Screen_mco; ++i)
ScreenLinesC2[idx] = u8c_c2; {
ScreenLinesC[i][idx] = u8cc[i];
if (u8cc[i] == 0)
break;
}
} }
if (cells > 1) if (cells > 1)
ScreenLines[idx + 1] = 0; ScreenLines[idx + 1] = 0;
@ -2315,8 +2322,7 @@ fold_line(wp, fold_count, foldinfo, lnum, row)
if (fill_fold >= 0x80) if (fill_fold >= 0x80)
{ {
ScreenLinesUC[off + col] = fill_fold; ScreenLinesUC[off + col] = fill_fold;
ScreenLinesC1[off + col] = 0; ScreenLinesC[0][off + col] = 0;
ScreenLinesC2[off + col] = 0;
} }
else else
ScreenLinesUC[off + col] = 0; ScreenLinesUC[off + col] = 0;
@ -2561,8 +2567,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
int mb_l = 1; /* multi-byte byte length */ int mb_l = 1; /* multi-byte byte length */
int mb_c = 0; /* decoded multi-byte character */ int mb_c = 0; /* decoded multi-byte character */
int mb_utf8 = FALSE; /* screen char is UTF-8 char */ int mb_utf8 = FALSE; /* screen char is UTF-8 char */
int u8c_c1 = 0; /* first composing UTF-8 char */ int u8cc[MAX_MCO]; /* composing UTF-8 chars */
int u8c_c2 = 0; /* second composing UTF-8 char */
#endif #endif
#ifdef FEAT_DIFF #ifdef FEAT_DIFF
int filler_lines; /* nr of filler lines to be drawn */ int filler_lines; /* nr of filler lines to be drawn */
@ -2581,6 +2586,8 @@ win_line(wp, lnum, startrow, endrow, nochange)
#endif #endif
#ifdef FEAT_SEARCH_EXTRA #ifdef FEAT_SEARCH_EXTRA
match_T *shl; /* points to search_hl or match_hl */ match_T *shl; /* points to search_hl or match_hl */
#endif
#if defined(FEAT_SEARCH_EXTRA) || defined(FEAT_MBYTE)
int i; int i;
#endif #endif
#ifdef FEAT_ARABIC #ifdef FEAT_ARABIC
@ -3433,7 +3440,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
if (enc_utf8 && (*mb_char2len)(c) > 1) if (enc_utf8 && (*mb_char2len)(c) > 1)
{ {
mb_utf8 = TRUE; mb_utf8 = TRUE;
u8c_c1 = u8c_c2 = 0; u8cc[0] = 0;
} }
else else
mb_utf8 = FALSE; mb_utf8 = FALSE;
@ -3456,7 +3463,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
mb_l = 1; mb_l = 1;
else if (mb_l > 1) else if (mb_l > 1)
{ {
mb_c = utfc_ptr2char(p_extra, &u8c_c1, &u8c_c2); mb_c = utfc_ptr2char(p_extra, u8cc);
mb_utf8 = TRUE; mb_utf8 = TRUE;
} }
} }
@ -3520,7 +3527,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
mb_utf8 = FALSE; mb_utf8 = FALSE;
if (mb_l > 1) if (mb_l > 1)
{ {
mb_c = utfc_ptr2char(ptr, &u8c_c1, &u8c_c2); mb_c = utfc_ptr2char(ptr, u8cc);
/* Overlong encoded ASCII or ASCII with composing char /* Overlong encoded ASCII or ASCII with composing char
* is displayed normally, except a NUL. */ * is displayed normally, except a NUL. */
if (mb_c < 0x80) if (mb_c < 0x80)
@ -3531,8 +3538,9 @@ win_line(wp, lnum, startrow, endrow, nochange)
* Draw it as a space with a composing char. */ * Draw it as a space with a composing char. */
if (utf_iscomposing(mb_c)) if (utf_iscomposing(mb_c))
{ {
u8c_c2 = u8c_c1; for (i = Screen_mco - 1; i > 0; --i)
u8c_c1 = mb_c; u8cc[i] = u8cc[i - 1];
u8cc[0] = mb_c;
mb_c = ' '; mb_c = ' ';
} }
} }
@ -3579,7 +3587,8 @@ win_line(wp, lnum, startrow, endrow, nochange)
else if (p_arshape && !p_tbidi && ARABIC_CHAR(mb_c)) else if (p_arshape && !p_tbidi && ARABIC_CHAR(mb_c))
{ {
/* Do Arabic shaping. */ /* Do Arabic shaping. */
int pc, pc1, nc, dummy; int pc, pc1, nc;
int pcc[MAX_MCO];
/* The idea of what is the previous and next /* The idea of what is the previous and next
* character depends on 'rightleft'. */ * character depends on 'rightleft'. */
@ -3588,16 +3597,17 @@ win_line(wp, lnum, startrow, endrow, nochange)
pc = prev_c; pc = prev_c;
pc1 = prev_c1; pc1 = prev_c1;
nc = utf_ptr2char(ptr + mb_l); nc = utf_ptr2char(ptr + mb_l);
prev_c1 = u8c_c1; prev_c1 = u8cc[0];
} }
else else
{ {
pc = utfc_ptr2char(ptr + mb_l, &pc1, &dummy); pc = utfc_ptr2char(ptr + mb_l, pcc);
nc = prev_c; nc = prev_c;
pc1 = pcc[0];
} }
prev_c = mb_c; prev_c = mb_c;
mb_c = arabic_shape(mb_c, &c, &u8c_c1, pc, pc1, nc); mb_c = arabic_shape(mb_c, &c, &u8cc[0], pc, pc1, nc);
} }
else else
prev_c = mb_c; prev_c = mb_c;
@ -3704,7 +3714,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
if (enc_utf8 && (*mb_char2len)(c) > 1) if (enc_utf8 && (*mb_char2len)(c) > 1)
{ {
mb_utf8 = TRUE; mb_utf8 = TRUE;
u8c_c1 = u8c_c2 = 0; u8cc[0] = 0;
} }
else else
mb_utf8 = FALSE; mb_utf8 = FALSE;
@ -3866,7 +3876,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
if (enc_utf8 && (*mb_char2len)(c) > 1) if (enc_utf8 && (*mb_char2len)(c) > 1)
{ {
mb_utf8 = TRUE; mb_utf8 = TRUE;
u8c_c1 = u8c_c2 = 0; u8cc[0] = 0;
} }
else else
mb_utf8 = FALSE; mb_utf8 = FALSE;
@ -3904,7 +3914,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
if (enc_utf8 && (*mb_char2len)(c) > 1) if (enc_utf8 && (*mb_char2len)(c) > 1)
{ {
mb_utf8 = TRUE; mb_utf8 = TRUE;
u8c_c1 = u8c_c2 = 0; u8cc[0] = 0;
} }
#endif #endif
} }
@ -3978,7 +3988,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
if (enc_utf8 && (*mb_char2len)(c) > 1) if (enc_utf8 && (*mb_char2len)(c) > 1)
{ {
mb_utf8 = TRUE; mb_utf8 = TRUE;
u8c_c1 = u8c_c2 = 0; u8cc[0] = 0;
} }
else else
mb_utf8 = FALSE; /* don't draw as UTF-8 */ mb_utf8 = FALSE; /* don't draw as UTF-8 */
@ -4117,7 +4127,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
if (enc_utf8 && (*mb_char2len)(c) > 1) if (enc_utf8 && (*mb_char2len)(c) > 1)
{ {
mb_utf8 = TRUE; mb_utf8 = TRUE;
u8c_c1 = u8c_c2 = 0; u8cc[0] = 0;
} }
else else
mb_utf8 = FALSE; /* don't draw as UTF-8 */ mb_utf8 = FALSE; /* don't draw as UTF-8 */
@ -4247,7 +4257,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
if (enc_utf8 && (*mb_char2len)(c) > 1) if (enc_utf8 && (*mb_char2len)(c) > 1)
{ {
mb_utf8 = TRUE; mb_utf8 = TRUE;
u8c_c1 = u8c_c2 = 0; u8cc[0] = 0;
} }
else else
mb_utf8 = FALSE; mb_utf8 = FALSE;
@ -4281,8 +4291,12 @@ win_line(wp, lnum, startrow, endrow, nochange)
if (mb_utf8) if (mb_utf8)
{ {
ScreenLinesUC[off] = mb_c; ScreenLinesUC[off] = mb_c;
ScreenLinesC1[off] = u8c_c1; for (i = 0; i < Screen_mco; ++i)
ScreenLinesC2[off] = u8c_c2; {
ScreenLinesC[i][off] = u8cc[i];
if (u8cc[i] == 0)
break;
}
} }
else else
ScreenLinesUC[off] = 0; ScreenLinesUC[off] = 0;
@ -4512,6 +4526,30 @@ win_line(wp, lnum, startrow, endrow, nochange)
return row; return row;
} }
#ifdef FEAT_MBYTE
static int comp_char_differs __ARGS((int, int));
/*
* Return if the composing characters at "off_from" and "off_to" differ.
*/
static int
comp_char_differs(off_from, off_to)
int off_from;
int off_to;
{
int i;
for (i = 0; i < Screen_mco; ++i)
{
if (ScreenLinesC[i][off_from] != ScreenLinesC[i][off_to])
return TRUE;
if (ScreenLinesC[i][off_from] == 0)
break;
}
return FALSE;
}
#endif
/* /*
* Check whether the given character needs redrawing: * Check whether the given character needs redrawing:
* - the (first byte of the) character is different * - the (first byte of the) character is different
@ -4538,10 +4576,7 @@ char_needs_redraw(off_from, off_to, cols)
|| (enc_utf8 || (enc_utf8
&& (ScreenLinesUC[off_from] != ScreenLinesUC[off_to] && (ScreenLinesUC[off_from] != ScreenLinesUC[off_to]
|| (ScreenLinesUC[off_from] != 0 || (ScreenLinesUC[off_from] != 0
&& (ScreenLinesC1[off_from] && comp_char_differs(off_from, off_to))))
!= ScreenLinesC1[off_to]
|| ScreenLinesC2[off_from]
!= ScreenLinesC2[off_to]))))
#endif #endif
)) ))
return TRUE; return TRUE;
@ -4753,8 +4788,10 @@ screen_line(row, coloff, endcol, clear_width
ScreenLinesUC[off_to] = ScreenLinesUC[off_from]; ScreenLinesUC[off_to] = ScreenLinesUC[off_from];
if (ScreenLinesUC[off_from] != 0) if (ScreenLinesUC[off_from] != 0)
{ {
ScreenLinesC1[off_to] = ScreenLinesC1[off_from]; int i;
ScreenLinesC2[off_to] = ScreenLinesC2[off_from];
for (i = 0; i < Screen_mco; ++i)
ScreenLinesC[i][off_to] = ScreenLinesC[i][off_from];
} }
} }
if (char_cells == 2) if (char_cells == 2)
@ -4892,8 +4929,8 @@ screen_line(row, coloff, endcol, clear_width
c = fillchar_vsep(&hl); c = fillchar_vsep(&hl);
if (ScreenLines[off_to] != c if (ScreenLines[off_to] != c
# ifdef FEAT_MBYTE # ifdef FEAT_MBYTE
|| (enc_utf8 || (enc_utf8 && (int)ScreenLinesUC[off_to]
&& ScreenLinesUC[off_to] != (c >= 0x80 ? c : 0)) != (c >= 0x80 ? c : 0))
# endif # endif
|| ScreenAttrs[off_to] != hl) || ScreenAttrs[off_to] != hl)
{ {
@ -4905,8 +4942,7 @@ screen_line(row, coloff, endcol, clear_width
if (c >= 0x80) if (c >= 0x80)
{ {
ScreenLinesUC[off_to] = c; ScreenLinesUC[off_to] = c;
ScreenLinesC1[off_to] = 0; ScreenLinesC[0][off_to] = 0;
ScreenLinesC2[off_to] = 0;
} }
else else
ScreenLinesUC[off_to] = 0; ScreenLinesUC[off_to] = 0;
@ -5553,7 +5589,7 @@ get_keymap_str(wp, buf, len)
curwin = wp; curwin = wp;
STRCPY(buf, "b:keymap_name"); /* must be writable */ STRCPY(buf, "b:keymap_name"); /* must be writable */
++emsg_skip; ++emsg_skip;
s = p = eval_to_string(buf, NULL); s = p = eval_to_string(buf, NULL, FALSE);
--emsg_skip; --emsg_skip;
curbuf = old_curbuf; curbuf = old_curbuf;
curwin = old_curwin; curwin = old_curwin;
@ -5805,6 +5841,31 @@ screen_getbytes(row, col, bytes, attrp)
} }
} }
#ifdef FEAT_MBYTE
static int screen_comp_differs __ARGS((int, int*));
/*
* Return TRUE if composing characters for screen posn "off" differs from
* composing characters in "u8cc".
*/
static int
screen_comp_differs(off, u8cc)
int off;
int *u8cc;
{
int i;
for (i = 0; i < Screen_mco; ++i)
{
if (ScreenLinesC[i][off] != (u8char_T)u8cc[i])
return TRUE;
if (u8cc[i] == 0)
break;
}
return FALSE;
}
#endif
/* /*
* Put string '*text' on the screen at position 'row' and 'col', with * Put string '*text' on the screen at position 'row' and 'col', with
* attributes 'attr', and update ScreenLines[] and ScreenAttrs[]. * attributes 'attr', and update ScreenLines[] and ScreenAttrs[].
@ -5840,12 +5901,12 @@ screen_puts_len(text, len, row, col, attr)
int mbyte_blen = 1; int mbyte_blen = 1;
int mbyte_cells = 1; int mbyte_cells = 1;
int u8c = 0; int u8c = 0;
int u8c_c1 = 0; int u8cc[MAX_MCO];
int u8c_c2 = 0;
int clear_next_cell = FALSE; int clear_next_cell = FALSE;
# ifdef FEAT_ARABIC # ifdef FEAT_ARABIC
int prev_c = 0; /* previous Arabic character */ int prev_c = 0; /* previous Arabic character */
int pc, nc, nc1, dummy; int pc, nc, nc1;
int pcc[MAX_MCO];
# endif # endif
#endif #endif
@ -5872,10 +5933,10 @@ screen_puts_len(text, len, row, col, attr)
else /* enc_utf8 */ else /* enc_utf8 */
{ {
if (len >= 0) if (len >= 0)
u8c = utfc_ptr2char_len(ptr, &u8c_c1, &u8c_c2, u8c = utfc_ptr2char_len(ptr, u8cc,
(int)((text + len) - ptr)); (int)((text + len) - ptr));
else else
u8c = utfc_ptr2char(ptr, &u8c_c1, &u8c_c2); u8c = utfc_ptr2char(ptr, u8cc);
mbyte_cells = utf_char2cells(u8c); mbyte_cells = utf_char2cells(u8c);
/* Non-BMP character: display as ? or fullwidth ?. */ /* Non-BMP character: display as ? or fullwidth ?. */
if (u8c >= 0x10000) if (u8c >= 0x10000)
@ -5895,10 +5956,13 @@ screen_puts_len(text, len, row, col, attr)
nc1 = NUL; nc1 = NUL;
} }
else else
nc = utfc_ptr2char(ptr + mbyte_blen, &nc1, &dummy); {
nc = utfc_ptr2char(ptr + mbyte_blen, pcc);
nc1 = pcc[0];
}
pc = prev_c; pc = prev_c;
prev_c = u8c; prev_c = u8c;
u8c = arabic_shape(u8c, &c, &u8c_c1, nc, nc1, pc); u8c = arabic_shape(u8c, &c, &u8cc[0], nc, nc1, pc);
} }
else else
prev_c = u8c; prev_c = u8c;
@ -5915,10 +5979,8 @@ screen_puts_len(text, len, row, col, attr)
&& c == 0x8e && c == 0x8e
&& ScreenLines2[off] != ptr[1]) && ScreenLines2[off] != ptr[1])
|| (enc_utf8 || (enc_utf8
&& mbyte_blen > 1 && (ScreenLinesUC[off] != (u8char_T)u8c
&& (ScreenLinesUC[off] != u8c || screen_comp_differs(off, u8cc)))
|| ScreenLinesC1[off] != u8c_c1
|| ScreenLinesC2[off] != u8c_c2))
#endif #endif
|| ScreenAttrs[off] != attr || ScreenAttrs[off] != attr
|| exmode_active || exmode_active
@ -5994,13 +6056,19 @@ screen_puts_len(text, len, row, col, attr)
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
if (enc_utf8) if (enc_utf8)
{ {
if (c < 0x80 && u8c_c1 == 0 && u8c_c2 == 0) if (c < 0x80 && u8cc[0] == 0)
ScreenLinesUC[off] = 0; ScreenLinesUC[off] = 0;
else else
{ {
int i;
ScreenLinesUC[off] = u8c; ScreenLinesUC[off] = u8c;
ScreenLinesC1[off] = u8c_c1; for (i = 0; i < Screen_mco; ++i)
ScreenLinesC2[off] = u8c_c2; {
ScreenLinesC[i][off] = u8cc[i];
if (u8cc[i] == 0)
break;
}
} }
if (mbyte_cells == 2) if (mbyte_cells == 2)
{ {
@ -6715,7 +6783,8 @@ screen_fill(start_row, end_row, start_col, end_col, c1, c2, attr)
{ {
if (ScreenLines[off] != c if (ScreenLines[off] != c
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
|| (enc_utf8 && ScreenLinesUC[off] != (c >= 0x80 ? c : 0)) || (enc_utf8 && (int)ScreenLinesUC[off]
!= (c >= 0x80 ? c : 0))
#endif #endif
|| ScreenAttrs[off] != attr || ScreenAttrs[off] != attr
#if defined(FEAT_GUI) || defined(UNIX) #if defined(FEAT_GUI) || defined(UNIX)
@ -6755,8 +6824,7 @@ screen_fill(start_row, end_row, start_col, end_col, c1, c2, attr)
if (c >= 0x80) if (c >= 0x80)
{ {
ScreenLinesUC[off] = c; ScreenLinesUC[off] = c;
ScreenLinesC1[off] = 0; ScreenLinesC[0][off] = 0;
ScreenLinesC2[off] = 0;
} }
else else
ScreenLinesUC[off] = 0; ScreenLinesUC[off] = 0;
@ -6845,9 +6913,9 @@ screenalloc(clear)
schar_T *new_ScreenLines; schar_T *new_ScreenLines;
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
u8char_T *new_ScreenLinesUC = NULL; u8char_T *new_ScreenLinesUC = NULL;
u8char_T *new_ScreenLinesC1 = NULL; u8char_T *new_ScreenLinesC[MAX_MCO];
u8char_T *new_ScreenLinesC2 = NULL;
schar_T *new_ScreenLines2 = NULL; schar_T *new_ScreenLines2 = NULL;
int i;
#endif #endif
sattr_T *new_ScreenAttrs; sattr_T *new_ScreenAttrs;
unsigned *new_LineOffset; unsigned *new_LineOffset;
@ -6870,6 +6938,7 @@ screenalloc(clear)
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
&& enc_utf8 == (ScreenLinesUC != NULL) && enc_utf8 == (ScreenLinesUC != NULL)
&& (enc_dbcs == DBCS_JPNU) == (ScreenLines2 != NULL) && (enc_dbcs == DBCS_JPNU) == (ScreenLines2 != NULL)
&& p_mco == Screen_mco
#endif #endif
) )
|| Rows == 0 || Rows == 0
@ -6907,13 +6976,13 @@ screenalloc(clear)
new_ScreenLines = (schar_T *)lalloc((long_u)( new_ScreenLines = (schar_T *)lalloc((long_u)(
(Rows + 1) * Columns * sizeof(schar_T)), FALSE); (Rows + 1) * Columns * sizeof(schar_T)), FALSE);
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
vim_memset(new_ScreenLinesC, 0, sizeof(u8char_T) * MAX_MCO);
if (enc_utf8) if (enc_utf8)
{ {
new_ScreenLinesUC = (u8char_T *)lalloc((long_u)( new_ScreenLinesUC = (u8char_T *)lalloc((long_u)(
(Rows + 1) * Columns * sizeof(u8char_T)), FALSE); (Rows + 1) * Columns * sizeof(u8char_T)), FALSE);
new_ScreenLinesC1 = (u8char_T *)lalloc((long_u)( for (i = 0; i < p_mco; ++i)
(Rows + 1) * Columns * sizeof(u8char_T)), FALSE); new_ScreenLinesC[i] = (u8char_T *)lalloc((long_u)(
new_ScreenLinesC2 = (u8char_T *)lalloc((long_u)(
(Rows + 1) * Columns * sizeof(u8char_T)), FALSE); (Rows + 1) * Columns * sizeof(u8char_T)), FALSE);
} }
if (enc_dbcs == DBCS_JPNU) if (enc_dbcs == DBCS_JPNU)
@ -6940,10 +7009,14 @@ screenalloc(clear)
} }
} }
#ifdef FEAT_MBYTE
for (i = 0; i < p_mco; ++i)
if (new_ScreenLinesC[i] == NULL)
break;
#endif
if (new_ScreenLines == NULL if (new_ScreenLines == NULL
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
|| (enc_utf8 && (new_ScreenLinesUC == NULL || (enc_utf8 && (new_ScreenLinesUC == NULL || i != p_mco))
|| new_ScreenLinesC1 == NULL || new_ScreenLinesC2 == NULL))
|| (enc_dbcs == DBCS_JPNU && new_ScreenLines2 == NULL) || (enc_dbcs == DBCS_JPNU && new_ScreenLines2 == NULL)
#endif #endif
|| new_ScreenAttrs == NULL || new_ScreenAttrs == NULL
@ -6968,10 +7041,11 @@ screenalloc(clear)
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
vim_free(new_ScreenLinesUC); vim_free(new_ScreenLinesUC);
new_ScreenLinesUC = NULL; new_ScreenLinesUC = NULL;
vim_free(new_ScreenLinesC1); for (i = 0; i < p_mco; ++i)
new_ScreenLinesC1 = NULL; {
vim_free(new_ScreenLinesC2); vim_free(new_ScreenLinesC[i]);
new_ScreenLinesC2 = NULL; new_ScreenLinesC[i] = NULL;
}
vim_free(new_ScreenLines2); vim_free(new_ScreenLines2);
new_ScreenLines2 = NULL; new_ScreenLines2 = NULL;
#endif #endif
@ -7010,9 +7084,9 @@ screenalloc(clear)
{ {
(void)vim_memset(new_ScreenLinesUC + new_row * Columns, (void)vim_memset(new_ScreenLinesUC + new_row * Columns,
0, (size_t)Columns * sizeof(u8char_T)); 0, (size_t)Columns * sizeof(u8char_T));
(void)vim_memset(new_ScreenLinesC1 + new_row * Columns, for (i = 0; i < p_mco; ++i)
0, (size_t)Columns * sizeof(u8char_T)); (void)vim_memset(new_ScreenLinesC[i]
(void)vim_memset(new_ScreenLinesC2 + new_row * Columns, + new_row * Columns,
0, (size_t)Columns * sizeof(u8char_T)); 0, (size_t)Columns * sizeof(u8char_T));
} }
if (enc_dbcs == DBCS_JPNU) if (enc_dbcs == DBCS_JPNU)
@ -7030,23 +7104,24 @@ screenalloc(clear)
len = Columns; len = Columns;
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
/* When switching to utf-8 don't copy characters, they /* When switching to utf-8 don't copy characters, they
* may be invalid now. */ * may be invalid now. Also when p_mco changes. */
if (!(enc_utf8 && ScreenLinesUC == NULL)) if (!(enc_utf8 && ScreenLinesUC == NULL)
&& p_mco == Screen_mco)
#endif #endif
mch_memmove(new_ScreenLines + new_LineOffset[new_row], mch_memmove(new_ScreenLines + new_LineOffset[new_row],
ScreenLines + LineOffset[old_row], ScreenLines + LineOffset[old_row],
(size_t)len * sizeof(schar_T)); (size_t)len * sizeof(schar_T));
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
if (enc_utf8 && ScreenLinesUC != NULL) if (enc_utf8 && ScreenLinesUC != NULL
&& p_mco == Screen_mco)
{ {
mch_memmove(new_ScreenLinesUC + new_LineOffset[new_row], mch_memmove(new_ScreenLinesUC + new_LineOffset[new_row],
ScreenLinesUC + LineOffset[old_row], ScreenLinesUC + LineOffset[old_row],
(size_t)len * sizeof(u8char_T)); (size_t)len * sizeof(u8char_T));
mch_memmove(new_ScreenLinesC1 + new_LineOffset[new_row], for (i = 0; i < p_mco; ++i)
ScreenLinesC1 + LineOffset[old_row], mch_memmove(new_ScreenLinesC[i]
(size_t)len * sizeof(u8char_T)); + new_LineOffset[new_row],
mch_memmove(new_ScreenLinesC2 + new_LineOffset[new_row], ScreenLinesC[i] + LineOffset[old_row],
ScreenLinesC2 + LineOffset[old_row],
(size_t)len * sizeof(u8char_T)); (size_t)len * sizeof(u8char_T));
} }
if (enc_dbcs == DBCS_JPNU && ScreenLines2 != NULL) if (enc_dbcs == DBCS_JPNU && ScreenLines2 != NULL)
@ -7069,8 +7144,9 @@ screenalloc(clear)
ScreenLines = new_ScreenLines; ScreenLines = new_ScreenLines;
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
ScreenLinesUC = new_ScreenLinesUC; ScreenLinesUC = new_ScreenLinesUC;
ScreenLinesC1 = new_ScreenLinesC1; for (i = 0; i < p_mco; ++i)
ScreenLinesC2 = new_ScreenLinesC2; ScreenLinesC[i] = new_ScreenLinesC[i];
Screen_mco = p_mco;
ScreenLines2 = new_ScreenLines2; ScreenLines2 = new_ScreenLines2;
#endif #endif
ScreenAttrs = new_ScreenAttrs; ScreenAttrs = new_ScreenAttrs;
@ -7118,13 +7194,15 @@ screenalloc(clear)
void void
free_screenlines() free_screenlines()
{ {
vim_free(ScreenLines);
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
int i;
vim_free(ScreenLinesUC); vim_free(ScreenLinesUC);
vim_free(ScreenLinesC1); for (i = 0; i < Screen_mco; ++i)
vim_free(ScreenLinesC2); vim_free(ScreenLinesC[i]);
vim_free(ScreenLines2); vim_free(ScreenLines2);
#endif #endif
vim_free(ScreenLines);
vim_free(ScreenAttrs); vim_free(ScreenAttrs);
vim_free(LineOffset); vim_free(LineOffset);
vim_free(LineWraps); vim_free(LineWraps);
@ -7250,11 +7328,12 @@ linecopy(to, from, wp)
# ifdef FEAT_MBYTE # ifdef FEAT_MBYTE
if (enc_utf8) if (enc_utf8)
{ {
int i;
mch_memmove(ScreenLinesUC + off_to, ScreenLinesUC + off_from, mch_memmove(ScreenLinesUC + off_to, ScreenLinesUC + off_from,
wp->w_width * sizeof(u8char_T)); wp->w_width * sizeof(u8char_T));
mch_memmove(ScreenLinesC1 + off_to, ScreenLinesC1 + off_from, for (i = 0; i < p_mco; ++i)
wp->w_width * sizeof(u8char_T)); mch_memmove(ScreenLinesC[i] + off_to, ScreenLinesC[i] + off_from,
mch_memmove(ScreenLinesC2 + off_to, ScreenLinesC2 + off_from,
wp->w_width * sizeof(u8char_T)); wp->w_width * sizeof(u8char_T));
} }
if (enc_dbcs == DBCS_JPNU) if (enc_dbcs == DBCS_JPNU)

View File

@ -117,6 +117,10 @@
* <sectionend> 1 byte SN_END * <sectionend> 1 byte SN_END
* *
* *
* sectionID == SN_INFO: <infotext>
* <infotext> N bytes free format text with spell file info (version,
* website, etc)
*
* sectionID == SN_REGION: <regionname> ... * sectionID == SN_REGION: <regionname> ...
* <regionname> 2 bytes Up to 8 region names: ca, au, etc. Lower case. * <regionname> 2 bytes Up to 8 region names: ca, au, etc. Lower case.
* First <regionname> is region 1. * First <regionname> is region 1.
@ -185,7 +189,7 @@
* <compmax> 1 byte Maximum nr of words in compound word. * <compmax> 1 byte Maximum nr of words in compound word.
* <compminlen> 1 byte Minimal word length for compounding. * <compminlen> 1 byte Minimal word length for compounding.
* <compsylmax> 1 byte Maximum nr of syllables in compound word. * <compsylmax> 1 byte Maximum nr of syllables in compound word.
* <compflags> N bytes Flags from COMPOUNDFLAGS items, separated by * <compflags> N bytes Flags from COMPOUNDRULE items, separated by
* slashes. * slashes.
* *
* sectionID == SN_NOBREAK: (empty, its presence is enough) * sectionID == SN_NOBREAK: (empty, its presence is enough)
@ -290,7 +294,7 @@
*/ */
#if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64) #if defined(MSDOS) || defined(WIN16) || defined(WIN32) || defined(_WIN64)
# include <io.h> /* for lseek(), must be before vim.h */ # include "vimio.h" /* for lseek(), must be before vim.h */
#endif #endif
#include "vim.h" #include "vim.h"
@ -431,6 +435,8 @@ struct slang_S
char_u *sl_pbyts; /* prefix tree word bytes */ char_u *sl_pbyts; /* prefix tree word bytes */
idx_T *sl_pidxs; /* prefix tree word indexes */ idx_T *sl_pidxs; /* prefix tree word indexes */
char_u *sl_info; /* infotext string or NULL */
char_u sl_regions[17]; /* table with up to 8 region names plus NUL */ char_u sl_regions[17]; /* table with up to 8 region names plus NUL */
char_u *sl_midword; /* MIDWORD string or NULL */ char_u *sl_midword; /* MIDWORD string or NULL */
@ -440,7 +446,7 @@ struct slang_S
int sl_compmax; /* COMPOUNDMAX (default: MAXWLEN) */ int sl_compmax; /* COMPOUNDMAX (default: MAXWLEN) */
int sl_compminlen; /* COMPOUNDMIN (default: 0) */ int sl_compminlen; /* COMPOUNDMIN (default: 0) */
int sl_compsylmax; /* COMPOUNDSYLMAX (default: MAXWLEN) */ int sl_compsylmax; /* COMPOUNDSYLMAX (default: MAXWLEN) */
regprog_T *sl_compprog; /* COMPOUNDFLAGS turned into a regexp progrm regprog_T *sl_compprog; /* COMPOUNDRULE turned into a regexp progrm
* (NULL when no compounding) */ * (NULL when no compounding) */
char_u *sl_compstartflags; /* flags for first compound word */ char_u *sl_compstartflags; /* flags for first compound word */
char_u *sl_compallflags; /* all flags for compound words */ char_u *sl_compallflags; /* all flags for compound words */
@ -534,6 +540,7 @@ typedef struct langp_S
#define SN_REPSAL 12 /* REPSAL items section */ #define SN_REPSAL 12 /* REPSAL items section */
#define SN_WORDS 13 /* common words */ #define SN_WORDS 13 /* common words */
#define SN_NOSPLITSUGS 14 /* don't split word for suggestions */ #define SN_NOSPLITSUGS 14 /* don't split word for suggestions */
#define SN_INFO 15 /* info section */
#define SN_END 255 /* end of sections */ #define SN_END 255 /* end of sections */
#define SNF_REQUIRED 1 /* <sectionflags>: required section */ #define SNF_REQUIRED 1 /* <sectionflags>: required section */
@ -1520,7 +1527,7 @@ find_word(mip, mode)
} }
/* If the word ends the sequence of compound flags of the /* If the word ends the sequence of compound flags of the
* words must match with one of the COMPOUNDFLAGS items and * words must match with one of the COMPOUNDRULE items and
* the number of syllables must not be too large. */ * the number of syllables must not be too large. */
mip->mi_compflags[mip->mi_complen] = ((unsigned)flags >> 24); mip->mi_compflags[mip->mi_complen] = ((unsigned)flags >> 24);
mip->mi_compflags[mip->mi_complen + 1] = NUL; mip->mi_compflags[mip->mi_complen + 1] = NUL;
@ -2284,6 +2291,9 @@ spell_load_lang(lang)
break; break;
#endif #endif
} }
#ifdef FEAT_AUTOCMD
break;
#endif
} }
if (r == FAIL) if (r == FAIL)
@ -2434,6 +2444,9 @@ slang_clear(lp)
vim_free(lp->sl_prefprog); vim_free(lp->sl_prefprog);
lp->sl_prefprog = NULL; lp->sl_prefprog = NULL;
vim_free(lp->sl_info);
lp->sl_info = NULL;
vim_free(lp->sl_midword); vim_free(lp->sl_midword);
lp->sl_midword = NULL; lp->sl_midword = NULL;
@ -2620,6 +2633,12 @@ spell_load_file(fname, lang, old_lp, silent)
res = 0; res = 0;
switch (n) switch (n)
{ {
case SN_INFO:
lp->sl_info = read_string(fd, len); /* <infotext> */
if (lp->sl_info == NULL)
goto endFAIL;
break;
case SN_REGION: case SN_REGION:
res = read_region_section(fd, lp, len); res = read_region_section(fd, lp, len);
break; break;
@ -3386,7 +3405,7 @@ read_compound(fd, slang, len)
c = MAXWLEN; c = MAXWLEN;
slang->sl_compsylmax = c; slang->sl_compsylmax = c;
/* Turn the COMPOUNDFLAGS items into a regexp pattern: /* Turn the COMPOUNDRULE items into a regexp pattern:
* "a[bc]/a*b+" -> "^\(a[bc]\|a*b\+\)$". * "a[bc]/a*b+" -> "^\(a[bc]\|a*b\+\)$".
* Inserting backslashes may double the length, "^\(\)$<Nul>" is 7 bytes. * Inserting backslashes may double the length, "^\(\)$<Nul>" is 7 bytes.
* Conversion to utf-8 may double the size. */ * Conversion to utf-8 may double the size. */
@ -4711,6 +4730,7 @@ typedef struct spellinfo_S
int si_memtot; /* runtime memory used */ int si_memtot; /* runtime memory used */
int si_verbose; /* verbose messages */ int si_verbose; /* verbose messages */
int si_msg_count; /* number of words added since last message */ int si_msg_count; /* number of words added since last message */
char_u *si_info; /* info text chars or NULL */
int si_region_count; /* number of regions supported (1 when there int si_region_count; /* number of regions supported (1 when there
are no regions) */ are no regions) */
char_u si_region_name[16]; /* region names; used only if char_u si_region_name[16]; /* region names; used only if
@ -4743,6 +4763,7 @@ typedef struct spellinfo_S
} spellinfo_T; } spellinfo_T;
static afffile_T *spell_read_aff __ARGS((spellinfo_T *spin, char_u *fname)); static afffile_T *spell_read_aff __ARGS((spellinfo_T *spin, char_u *fname));
static int spell_info_item __ARGS((char_u *s));
static unsigned affitem2flag __ARGS((int flagtype, char_u *item, char_u *fname, int lnum)); static unsigned affitem2flag __ARGS((int flagtype, char_u *item, char_u *fname, int lnum));
static unsigned get_affitem __ARGS((int flagtype, char_u **pp)); static unsigned get_affitem __ARGS((int flagtype, char_u **pp));
static void process_compflags __ARGS((spellinfo_T *spin, afffile_T *aff, char_u *compflags)); static void process_compflags __ARGS((spellinfo_T *spin, afffile_T *aff, char_u *compflags));
@ -4936,7 +4957,7 @@ spell_read_aff(spin, fname)
int compminlen = 0; /* COMPOUNDMIN value */ int compminlen = 0; /* COMPOUNDMIN value */
int compsylmax = 0; /* COMPOUNDSYLMAX value */ int compsylmax = 0; /* COMPOUNDSYLMAX value */
int compmax = 0; /* COMPOUNDMAX value */ int compmax = 0; /* COMPOUNDMAX value */
char_u *compflags = NULL; /* COMPOUNDFLAG and COMPOUNDFLAGS char_u *compflags = NULL; /* COMPOUNDFLAG and COMPOUNDRULE
concatenated */ concatenated */
char_u *midword = NULL; /* MIDWORD value */ char_u *midword = NULL; /* MIDWORD value */
char_u *syllable = NULL; /* SYLLABLE value */ char_u *syllable = NULL; /* SYLLABLE value */
@ -5023,6 +5044,11 @@ spell_read_aff(spin, fname)
if (itemcnt == MAXITEMCNT) /* too many items */ if (itemcnt == MAXITEMCNT) /* too many items */
break; break;
items[itemcnt++] = p; items[itemcnt++] = p;
/* A few items have arbitrary text argument, don't split them. */
if (itemcnt == 2 && spell_info_item(items[0]))
while (*p >= ' ' || *p == TAB) /* skip until CR/NL */
++p;
else
while (*p > ' ') /* skip until white space or CR/NL */ while (*p > ' ') /* skip until white space or CR/NL */
++p; ++p;
if (*p == NUL) if (*p == NUL)
@ -5073,6 +5099,25 @@ spell_read_aff(spin, fname)
smsg((char_u *)_("FLAG after using flags in %s line %d: %s"), smsg((char_u *)_("FLAG after using flags in %s line %d: %s"),
fname, lnum, items[1]); fname, lnum, items[1]);
} }
else if (spell_info_item(items[0]))
{
p = (char_u *)getroom(spin,
(spin->si_info == NULL ? 0 : STRLEN(spin->si_info))
+ STRLEN(items[0])
+ STRLEN(items[1]) + 3, FALSE);
if (p != NULL)
{
if (spin->si_info != NULL)
{
STRCPY(p, spin->si_info);
STRCAT(p, "\n");
}
STRCAT(p, items[0]);
STRCAT(p, " ");
STRCAT(p, items[1]);
spin->si_info = p;
}
}
else if (STRCMP(items[0], "MIDWORD") == 0 && itemcnt == 2 else if (STRCMP(items[0], "MIDWORD") == 0 && itemcnt == 2
&& midword == NULL) && midword == NULL)
{ {
@ -5125,7 +5170,7 @@ spell_read_aff(spin, fname)
else if (STRCMP(items[0], "COMPOUNDFLAG") == 0 && itemcnt == 2 else if (STRCMP(items[0], "COMPOUNDFLAG") == 0 && itemcnt == 2
&& compflags == NULL) && compflags == NULL)
{ {
/* Turn flag "c" into COMPOUNDFLAGS compatible string "c+", /* Turn flag "c" into COMPOUNDRULE compatible string "c+",
* "Na" into "Na+", "1234" into "1234+". */ * "Na" into "Na+", "1234" into "1234+". */
p = getroom(spin, STRLEN(items[1]) + 2, FALSE); p = getroom(spin, STRLEN(items[1]) + 2, FALSE);
if (p != NULL) if (p != NULL)
@ -5135,7 +5180,7 @@ spell_read_aff(spin, fname)
compflags = p; compflags = p;
} }
} }
else if (STRCMP(items[0], "COMPOUNDFLAGS") == 0 && itemcnt == 2) else if (STRCMP(items[0], "COMPOUNDRULE") == 0 && itemcnt == 2)
{ {
/* Concatenate this string to previously defined ones, using a /* Concatenate this string to previously defined ones, using a
* slash to separate them. */ * slash to separate them. */
@ -5725,6 +5770,21 @@ spell_read_aff(spin, fname)
return aff; return aff;
} }
/*
* Return TRUE if "s" is the name of an info item in the affix file.
*/
static int
spell_info_item(s)
char_u *s;
{
return STRCMP(s, "NAME") == 0
|| STRCMP(s, "HOME") == 0
|| STRCMP(s, "VERSION") == 0
|| STRCMP(s, "AUTHOR") == 0
|| STRCMP(s, "EMAIL") == 0
|| STRCMP(s, "COPYRIGHT") == 0;
}
/* /*
* Turn an affix flag name into a number, according to the FLAG type. * Turn an affix flag name into a number, according to the FLAG type.
* returns zero for failure. * returns zero for failure.
@ -7366,6 +7426,14 @@ put_bytes(fd, nr, len)
putc((int)(nr >> (i * 8)), fd); putc((int)(nr >> (i * 8)), fd);
} }
#ifdef _MSC_VER
# if (_MSC_VER <= 1200)
/* This line is required for VC6 without the service pack. Also see the
* matching #pragma below. */
/* # pragma optimize("", off) */
# endif
#endif
/* /*
* Write spin->si_sugtime to file "fd". * Write spin->si_sugtime to file "fd".
*/ */
@ -7390,6 +7458,12 @@ put_sugtime(spin, fd)
} }
} }
#ifdef _MSC_VER
# if (_MSC_VER <= 1200)
/* # pragma optimize("", on) */
# endif
#endif
static int static int
#ifdef __BORLANDC__ #ifdef __BORLANDC__
_RTLENTRYF _RTLENTRYF
@ -7455,6 +7529,17 @@ write_vim_spell(spin, fname)
* <SECTIONS>: <section> ... <sectionend> * <SECTIONS>: <section> ... <sectionend>
*/ */
/* SN_INFO: <infotext> */
if (spin->si_info != NULL)
{
putc(SN_INFO, fd); /* <sectionID> */
putc(0, fd); /* <sectionflags> */
i = STRLEN(spin->si_info);
put_bytes(fd, (long_u)i, 4); /* <sectionlen> */
fwrite(spin->si_info, (size_t)i, (size_t)1, fd); /* <infotext> */
}
/* SN_REGION: <regionname> ... /* SN_REGION: <regionname> ...
* Write the region names only if there is more than one. */ * Write the region names only if there is more than one. */
if (spin->si_region_count > 1) if (spin->si_region_count > 1)
@ -14823,6 +14908,38 @@ pop:
} }
#endif #endif
/*
* ":spellinfo"
*/
/*ARGSUSED*/
void
ex_spellinfo(eap)
exarg_T *eap;
{
int lpi;
langp_T *lp;
char_u *p;
if (no_spell_checking(curwin))
return;
msg_start();
for (lpi = 0; lpi < curbuf->b_langp.ga_len && !got_int; ++lpi)
{
lp = LANGP_ENTRY(curbuf->b_langp, lpi);
msg_puts((char_u *)"file: ");
msg_puts(lp->lp_slang->sl_fname);
msg_putchar('\n');
p = lp->lp_slang->sl_info;
if (p != NULL)
{
msg_puts(p);
msg_putchar('\n');
}
}
msg_end();
}
#define DUMPFLAG_KEEPCASE 1 /* round 2: keep-case tree */ #define DUMPFLAG_KEEPCASE 1 /* round 2: keep-case tree */
#define DUMPFLAG_COUNT 2 /* include word count */ #define DUMPFLAG_COUNT 2 /* include word count */
#define DUMPFLAG_ICASE 4 /* ignore case when finding matches */ #define DUMPFLAG_ICASE 4 /* ignore case when finding matches */
@ -14902,9 +15019,9 @@ spell_dump_compl(buf, pat, ic, dir, dumpflags_arg)
dumpflags |= DUMPFLAG_ONECAP; dumpflags |= DUMPFLAG_ONECAP;
else if (n == WF_ALLCAP else if (n == WF_ALLCAP
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
&& STRLEN(pat) > mb_ptr2len(pat) && (int)STRLEN(pat) > mb_ptr2len(pat)
#else #else
&& STRLEN(pat) > 1 && (int)STRLEN(pat) > 1
#endif #endif
) )
dumpflags |= DUMPFLAG_ALLCAP; dumpflags |= DUMPFLAG_ALLCAP;

View File

@ -12,7 +12,7 @@
*/ */
#if defined MSDOS || defined WIN32 || defined(_WIN64) #if defined MSDOS || defined WIN32 || defined(_WIN64)
# include <io.h> /* for lseek(), must be before vim.h */ # include "vimio.h" /* for lseek(), must be before vim.h */
#endif #endif
#include "vim.h" #include "vim.h"

View File

@ -390,7 +390,7 @@ Test rules for compounding.
SET ISO8859-1 SET ISO8859-1
COMPOUNDMIN 3 COMPOUNDMIN 3
COMPOUNDFLAGS m* COMPOUNDRULE m*
NEEDCOMPOUND x NEEDCOMPOUND x
3affend 3affend
@ -416,9 +416,9 @@ FOL
LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ
COMPOUNDFLAGS m+ COMPOUNDRULE m+
COMPOUNDFLAGS sm*e COMPOUNDRULE sm*e
COMPOUNDFLAGS sm+ COMPOUNDRULE sm+
COMPOUNDMIN 3 COMPOUNDMIN 3
COMPOUNDMAX 3 COMPOUNDMAX 3
@ -483,7 +483,7 @@ FLAG long
NEEDAFFIX !! NEEDAFFIX !!
COMPOUNDFLAGS ssmm*ee COMPOUNDRULE ssmm*ee
NEEDCOMPOUND xx NEEDCOMPOUND xx
@ -522,7 +522,7 @@ FLAG caplong
NEEDAFFIX A! NEEDAFFIX A!
COMPOUNDFLAGS sMm*Ee COMPOUNDRULE sMm*Ee
NEEDCOMPOUND Xx NEEDCOMPOUND Xx
@ -561,7 +561,7 @@ FLAG num
NEEDAFFIX 9999 NEEDAFFIX 9999
COMPOUNDFLAGS 2,77*123 COMPOUNDRULE 2,77*123
NEEDCOMPOUND 1 NEEDCOMPOUND 1

View File

@ -394,7 +394,7 @@ Test rules for compounding.
SET ISO8859-1 SET ISO8859-1
COMPOUNDMIN 3 COMPOUNDMIN 3
COMPOUNDFLAGS m* COMPOUNDRULE m*
NEEDCOMPOUND x NEEDCOMPOUND x
3affend 3affend
@ -420,9 +420,9 @@ FOL
LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ
COMPOUNDFLAGS m+ COMPOUNDRULE m+
COMPOUNDFLAGS sm*e COMPOUNDRULE sm*e
COMPOUNDFLAGS sm+ COMPOUNDRULE sm+
COMPOUNDMIN 3 COMPOUNDMIN 3
COMPOUNDMAX 3 COMPOUNDMAX 3
@ -490,7 +490,7 @@ FLAG long
NEEDAFFIX !! NEEDAFFIX !!
COMPOUNDFLAGS ssmm*ee COMPOUNDRULE ssmm*ee
NEEDCOMPOUND xx NEEDCOMPOUND xx
@ -529,7 +529,7 @@ FLAG caplong
NEEDAFFIX A! NEEDAFFIX A!
COMPOUNDFLAGS sMm*Ee COMPOUNDRULE sMm*Ee
NEEDCOMPOUND Xx NEEDCOMPOUND Xx
@ -572,7 +572,7 @@ FLAG num
NEEDAFFIX 9999 NEEDAFFIX 9999
COMPOUNDFLAGS 2,77*123 COMPOUNDRULE 2,77*123
NEEDCOMPOUND 1 NEEDCOMPOUND 1

View File

@ -1173,7 +1173,7 @@ clip_copy_modeless_selection(both)
if (enc_dbcs != 0) if (enc_dbcs != 0)
len *= 2; /* max. 2 bytes per display cell */ len *= 2; /* max. 2 bytes per display cell */
else if (enc_utf8) else if (enc_utf8)
len *= 9; /* max. 3 bytes per display cell + 2 composing chars */ len *= MB_MAXBYTES;
#endif #endif
buffer = lalloc((long_u)len, TRUE); buffer = lalloc((long_u)len, TRUE);
if (buffer == NULL) /* out of memory */ if (buffer == NULL) /* out of memory */
@ -1234,6 +1234,7 @@ clip_copy_modeless_selection(both)
else if (enc_utf8) else if (enc_utf8)
{ {
int off; int off;
int i;
off = LineOffset[row]; off = LineOffset[row];
for (i = start_col; i < end_col; ++i) for (i = start_col; i < end_col; ++i)
@ -1245,13 +1246,12 @@ clip_copy_modeless_selection(both)
else else
{ {
bufp += utf_char2bytes(ScreenLinesUC[off + i], bufp); bufp += utf_char2bytes(ScreenLinesUC[off + i], bufp);
if (ScreenLinesC1[off + i] != 0) for (i = 0; i < Screen_mco; ++i)
{ {
/* Add one or two composing characters. */ /* Add a composing character. */
bufp += utf_char2bytes(ScreenLinesC1[off + i], if (ScreenLinesC[i][off + i] == 0)
bufp); break;
if (ScreenLinesC2[off + i] != 0) bufp += utf_char2bytes(ScreenLinesC[i][off + i],
bufp += utf_char2bytes(ScreenLinesC2[off + i],
bufp); bufp);
} }
} }

View File

@ -36,5 +36,5 @@
#define VIM_VERSION_NODOT "vim70aa" #define VIM_VERSION_NODOT "vim70aa"
#define VIM_VERSION_SHORT "7.0aa" #define VIM_VERSION_SHORT "7.0aa"
#define VIM_VERSION_MEDIUM "7.0aa ALPHA" #define VIM_VERSION_MEDIUM "7.0aa ALPHA"
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 4)" #define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 6)"
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 4, compiled " #define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 6, compiled "

View File

@ -93,6 +93,12 @@
# endif # endif
#endif #endif
/* Visual Studio 2005 has 'deprecated' many of the standard CRT functions */
#if _MSC_VER >= 1400
# define _CRT_SECURE_NO_DEPRECATE
# define _CRT_NONSTDC_NO_DEPRECATE
#endif
#if defined(FEAT_GUI_W32) || defined(FEAT_GUI_W16) #if defined(FEAT_GUI_W32) || defined(FEAT_GUI_W16)
# define FEAT_GUI_MSWIN # define FEAT_GUI_MSWIN
#endif #endif
@ -358,12 +364,20 @@ typedef unsigned char sattr_T;
/* /*
* The u8char_T can hold one decoded UTF-8 character. * The u8char_T can hold one decoded UTF-8 character.
* Vim always use an int (32 bits) for characters most places, so that we can * We normally use 32 bits now, since some Asian characters don't fit in 16
* handle 32 bit characters in the file. u8char_T is only used for * bits. u8char_T is only used for displaying, it could be 16 bits to save
* displaying. That should be enough, because there is no font for > 16 bits. * memory.
*/ */
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
typedef unsigned short u8char_T; # ifdef UNICODE16
typedef unsigned short u8char_T; /* short should be 16 bits */
# else
# if SIZEOF_INT >= 4
typedef unsigned int u8char_T; /* int is 32 bits */
# else
typedef unsigned long u8char_T; /* long should be 32 bits or more */
# endif
# endif
#endif #endif
#ifndef UNIX /* For Unix this is included in os_unix.h */ #ifndef UNIX /* For Unix this is included in os_unix.h */
@ -652,6 +666,7 @@ extern char *(*dyn_libintl_textdomain)(const char *domainname);
#define EXPAND_COMPILER 29 #define EXPAND_COMPILER 29
#define EXPAND_USER_DEFINED 30 #define EXPAND_USER_DEFINED 30
#define EXPAND_USER_LIST 31 #define EXPAND_USER_LIST 31
#define EXPAND_SHELLCMD 32
/* Values for exmode_active (0 is no exmode) */ /* Values for exmode_active (0 is no exmode) */
#define EXMODE_NORMAL 1 #define EXMODE_NORMAL 1
@ -676,12 +691,13 @@ extern char *(*dyn_libintl_textdomain)(const char *domainname);
#define WILD_ESCAPE 128 #define WILD_ESCAPE 128
/* Flags for expand_wildcards() */ /* Flags for expand_wildcards() */
#define EW_DIR 1 /* include directory names */ #define EW_DIR 0x01 /* include directory names */
#define EW_FILE 2 /* include file names */ #define EW_FILE 0x02 /* include file names */
#define EW_NOTFOUND 4 /* include not found names */ #define EW_NOTFOUND 0x04 /* include not found names */
#define EW_ADDSLASH 8 /* append slash to directory name */ #define EW_ADDSLASH 0x08 /* append slash to directory name */
#define EW_KEEPALL 16 /* keep all matches */ #define EW_KEEPALL 0x10 /* keep all matches */
#define EW_SILENT 32 /* don't print "1 returned" from shell */ #define EW_SILENT 0x20 /* don't print "1 returned" from shell */
#define EW_EXEC 0x40 /* executable files */
/* Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND /* Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND
* is used when executing commands and EW_SILENT for interactive expanding. */ * is used when executing commands and EW_SILENT for interactive expanding. */
@ -1480,6 +1496,15 @@ int vim_memcmp __ARGS((void *, void *, size_t));
# endif # endif
#endif #endif
#ifdef FEAT_MBYTE
# define MAX_MCO 6 /* maximum value for 'maxcombine' */
/* Maximum number of bytes in a multi-byte character. It can be one 32-bit
* character of up to 6 bytes, or one 16-bit character of up to three bytes
* plus six following composing characters of three bytes each. */
# define MB_MAXBYTES 21
#endif
/* Include option.h before structs.h, because the number of window-local and /* Include option.h before structs.h, because the number of window-local and
* buffer-local options is used there. */ * buffer-local options is used there. */
#include "option.h" /* options and default values */ #include "option.h" /* options and default values */
@ -1783,11 +1808,6 @@ typedef int proftime_T; /* dummy for function prototypes */
#endif #endif
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
/* Maximum number of bytes in a multi-byte character. It can be one 32-bit
* character of up to 6 bytes, or one 16-bit character of up to three bytes
* plus two following composing characters of three bytes each. */
# define MB_MAXBYTES 9
/* /*
* Return byte length of character that starts with byte "b". * Return byte length of character that starts with byte "b".
* Returns 1 for a single-byte character. * Returns 1 for a single-byte character.

View File

@ -12,11 +12,11 @@
#include <winver.h> #include <winver.h>
#include "version.h" #include "version.h"
#include "gui_w32_rc.h" #include "gui_w32_rc.h"
#if defined(__BORLANDC__) || defined(__CYGWIN32__) || defined(__MINGW32__) // #if defined(__BORLANDC__) || defined(__CYGWIN32__) || defined(__MINGW32__)
# include <winresrc.h> # include <winresrc.h>
#else // #else
# include <winres.h> // # include <winres.h>
#endif // #endif
// //
// Icons // Icons

16
src/vimio.h Normal file
View File

@ -0,0 +1,16 @@
/* vi:set ts=8 sts=4 sw=4:
*
* VIM - Vi IMproved by Bram Moolenaar
*
* Do ":help uganda" in Vim to read copying and usage conditions.
* Do ":help credits" in Vim to see a list of people who contributed.
* See README.txt for an overview of the Vim source code.
*/
/* Visual Studio 2005 has 'deprecated' many of the standard CRT functions */
#if _MSC_VER >= 1400
# define _CRT_SECURE_NO_DEPRECATE
# define _CRT_NONSTDC_NO_DEPRECATE
#endif
#include <io.h>

View File

@ -4,7 +4,10 @@
xxd: xxd.exe xxd: xxd.exe
xxd.exe: xxd.c xxd.exe: xxd.c
cl /nologo -DWIN32 xxd.c /link setargv.obj cl /nologo -DWIN32 xxd.c
# This was for an older compiler
# cl /nologo -DWIN32 xxd.c /link setargv.obj
clean: clean:
- if exist xxd.obj del xxd.obj - if exist xxd.obj del xxd.obj

View File

@ -58,6 +58,13 @@
* make money and share with me, * make money and share with me,
* lose money and don't ask me. * lose money and don't ask me.
*/ */
/* Visual Studio 2005 has 'deprecated' many of the standard CRT functions */
#if _MSC_VER >= 1400
# define _CRT_SECURE_NO_DEPRECATE
# define _CRT_NONSTDC_NO_DEPRECATE
#endif
#include <stdio.h> #include <stdio.h>
#ifdef VAXC #ifdef VAXC
# include <file.h> # include <file.h>