summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-03-18 21:40:56 +0000
committerBram Moolenaar <Bram@vim.org>2006-03-18 21:40:56 +0000
commit97b2ad35425fd589c4ff816d1f1161f2f7f6a93d (patch)
treea0fed79e1bd28b00c32554c62110903d49ac9b20 /runtime
parent658b74a7360cff23939dbf5075b8e18e38c77a81 (diff)
downloadvim-97b2ad35425fd589c4ff816d1f1161f2f7f6a93d.zip
updated for version 7.0228
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt39
-rw-r--r--runtime/doc/options.txt77
-rw-r--r--runtime/doc/tags6
-rw-r--r--runtime/doc/todo.txt31
-rw-r--r--runtime/doc/version7.txt15
-rw-r--r--runtime/ftplugin.vim14
-rw-r--r--runtime/syntax/synload.vim17
-rw-r--r--runtime/tutor/tutor.vim15
8 files changed, 140 insertions, 74 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 3171e9671..79a74ff36 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.0aa. Last change: 2006 Mar 17
+*eval.txt* For Vim version 7.0aa. Last change: 2006 Mar 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -77,6 +77,10 @@ the String doesn't start with digits, the result is zero. Examples: >
To force conversion from String to Number, add zero to it: >
:echo "0100" + 0
+< 64 ~
+
+To avoid a leading zero to cause octal conversion, or for using a different
+base, use |str2nr()|.
For boolean operators Numbers are used. Zero is FALSE, non-zero is TRUE.
@@ -1584,7 +1588,8 @@ glob( {expr}) String expand file wildcards in {expr}
globpath( {path}, {expr}) String do glob({expr}) for all dirs in {path}
has( {feature}) Number TRUE if feature {feature} supported
has_key( {dict}, {key}) Number TRUE if {dict} has entry {key}
-hasmapto( {what} [, {mode}]) Number TRUE if mapping to {what} exists
+hasmapto( {what} [, {mode} [, {abbr}]])
+ Number TRUE if mapping to {what} exists
histadd( {history},{item}) String add an item to a history
histdel( {history} [, {item}]) String remove an item from a history
histget( {history} [, {index}]) String get the item {index} from a history
@@ -1616,8 +1621,10 @@ line2byte( {lnum}) Number byte count of line {lnum}
lispindent( {lnum}) Number Lisp indent for line {lnum}
localtime() Number current time
map( {expr}, {string}) List/Dict change each item in {expr} to {expr}
-maparg( {name}[, {mode}]) String rhs of mapping {name} in mode {mode}
-mapcheck( {name}[, {mode}]) String check for mappings matching {name}
+maparg( {name}[, {mode} [, {abbr}]])
+ String rhs of mapping {name} in mode {mode}
+mapcheck( {name}[, {mode} [, {abbr}]])
+ String check for mappings matching {name}
match( {expr}, {pat}[, {start}[, {count}]])
Number position where {pat} matches in {expr}
matchend( {expr}, {pat}[, {start}[, {count}]])
@@ -1682,6 +1689,7 @@ spellsuggest( {word} [, {max} [, {capital}]])
List spelling suggestions
split( {expr} [, {pat} [, {keepempty}]])
List make |List| from {pat} separated {expr}
+str2nr( {expr} [, {base}]) Number convert string to number
strftime( {format}[, {time}]) String time in specified format
stridx( {haystack}, {needle}[, {start}])
Number index of {needle} in {haystack}
@@ -2896,11 +2904,13 @@ has_key({dict}, {key}) *has_key()*
an entry with key {key}. Zero otherwise.
-hasmapto({what} [, {mode}]) *hasmapto()*
+hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()*
The result is a Number, which is 1 if there is a mapping that
contains {what} in somewhere in the rhs (what it is mapped to)
and this mapping exists in one of the modes indicated by
{mode}.
+ When {abbr} is there and it is non-zero use abbreviations
+ instead of mappings.
Both the global mappings and the mappings local to the current
buffer are checked for a match.
If no matching mapping is found 0 is returned.
@@ -3348,7 +3358,7 @@ map({expr}, {string}) *map()*
further items in {expr} are processed.
-maparg({name}[, {mode}]) *maparg()*
+maparg({name}[, {mode} [, {abbr}]]) *maparg()*
Return the rhs of mapping {name} in mode {mode}. When there
is no mapping for {name}, an empty String is returned.
{mode} can be one of these strings:
@@ -3360,6 +3370,8 @@ maparg({name}[, {mode}]) *maparg()*
"l" langmap |language-mapping|
"" Normal, Visual and Operator-pending
When {mode} is omitted, the modes for "" are used.
+ When {abbr} is there and it is non-zero use abbreviations
+ instead of mappings.
The {name} can have special key names, like in the ":map"
command. The returned String has special characters
translated like in the output of the ":map" command listing.
@@ -3370,10 +3382,12 @@ maparg({name}[, {mode}]) *maparg()*
exe 'nnoremap <Tab> ==' . maparg('<Tab>', 'n')
-mapcheck({name}[, {mode}]) *mapcheck()*
+mapcheck({name}[, {mode} [, {abbr}]]) *mapcheck()*
Check if there is a mapping that matches with {name} in mode
{mode}. See |maparg()| for {mode} and special names in
{name}.
+ When {abbr} is there and it is non-zero use abbreviations
+ instead of mappings.
A match happens with a mapping that starts with {name} and
with a mapping which is equal to the start of {name}.
@@ -4393,6 +4407,17 @@ split({expr} [, {pattern} [, {keepempty}]]) *split()*
< The opposite function is |join()|.
+str2nr( {expr} [, {base}]) *str2nr()*
+ Convert string {expr} to a number.
+ {base} is the conversion base, it can be 8, 10 or 16.
+ When {base} is omitted base 10 is used. This also means that
+ a leading zero doesn't cause octal conversion to be used, as
+ with the default String to Number conversion.
+ When {base} is 16 a leading "0x" or "0X" is ignored. With a
+ different base the result will be zero.
+ Text after the number is silently ignored.
+
+
strftime({format} [, {time}]) *strftime()*
The result is a String, which is a formatted date and time, as
specified by the {format} string. The given {time} is used,
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 822200c7e..d0c8a480a 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 7.0aa. Last change: 2006 Mar 17
+*options.txt* For Vim version 7.0aa. Last change: 2006 Mar 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -447,8 +447,8 @@ There are two forms of modelines. The first form:
where each part between ':' is the argument for a ":set"
command
-Example: >
- vi:noai:sw=3 ts=6
+Example:
+ vi:noai:sw=3 ts=6 ~
The second form (this is compatible with some versions of Vi):
@@ -464,8 +464,8 @@ se[t] the string "set " or "se " (note the space)
: a colon
[text] any text or empty
-Example: >
- /* vim: set ai tw=75: */
+Example:
+ /* vim: set ai tw=75: */ ~
The white space before {vi:|vim:|ex:} is required. This minimizes the chance
that a normal word like "lex:" is caught. There is one exception: "vi:" and
@@ -493,10 +493,10 @@ number can be specified where "vim:" is used:
vim={vers}: version {vers}
vim>{vers}: version after {vers}
{vers} is 600 for Vim 6.0 (hundred times the major version plus minor).
-For example, to use a modeline only for Vim 6.0 and later: >
- /* vim600: set foldmethod=marker: */
-To use a modeline for Vim before version 5.7: >
- /* vim<570: set sw=4: */
+For example, to use a modeline only for Vim 6.0 and later:
+ /* vim600: set foldmethod=marker: */ ~
+To use a modeline for Vim before version 5.7:
+ /* vim<570: set sw=4: */ ~
There can be no blanks between "vim" and the ":".
@@ -504,16 +504,16 @@ The number of lines that are checked can be set with the 'modelines' option.
If 'modeline' is off or 'modelines' is 0 no lines are checked.
Note that for the first form all of the rest of the line is used, thus a line
-like: >
- /* vi:ts=4: */
-will give an error message for the trailing "*/". This line is OK: >
- /* vi:set ts=4: */
+like:
+ /* vi:ts=4: */ ~
+will give an error message for the trailing "*/". This line is OK:
+ /* vi:set ts=4: */ ~
If an error is detected the rest of the line is skipped.
If you want to include a ':' in a set command precede it with a '\'. The
-backslash in front of the ':' will be removed. Example: >
- /* vi:set dir=c\:\tmp: */
+backslash in front of the ':' will be removed. Example:
+ /* vi:set dir=c\:\tmp: */ ~
This sets the 'dir' option to "c:\tmp". Only a single backslash before the
':' is removed. Thus to include "\:" you have to specify "\\:".
@@ -1017,8 +1017,8 @@ A jump table for the options with a short description can be found at |Q_op|.
{not in Vi}
{only available when compiled with the |+balloon_eval|
feature}
- Expression to show in evaluation balloon. It is only used when
- 'ballooneval' is on. These variables can be used:
+ Expression for text to show in evaluation balloon. It is only used
+ when 'ballooneval' is on. These variables can be used:
v:beval_bufnr number of the buffer in which balloon is going to show
v:beval_winnr number of the window
@@ -2665,9 +2665,15 @@ A jump table for the options with a short description can be found at |Q_op|.
this use the ":filetype on" command. |:filetype|
Setting this option to a different value is most useful in a modeline,
for a file for which the file type is not automatically recognized.
- Example, for in an IDL file: >
- /* vim: set filetype=idl : */
-< |FileType| |filetypes|
+ Example, for in an IDL file:
+ /* vim: set filetype=idl : */ ~
+ |FileType| |filetypes|
+ When a dot appears in the value then this separates two filetype
+ names. Example:
+ /* vim: set filetype=c.doxygen : */ ~
+ This will use the "c" filetype first, then the "doxygen" filetype.
+ This works both for filetype plugins and for syntax files. More than
+ one dot may appear.
Do not confuse this option with 'osfiletype', which is for the file
type that is actually stored with the file.
This option is not copied to another buffer, independent of the 's' or
@@ -2760,7 +2766,7 @@ A jump table for the options with a short description can be found at |Q_op|.
or |+eval| feature}
The expression used for when 'foldmethod' is "expr". It is evaluated
for each line to obtain its fold level. See |fold-expr|.
-
+
The expression may be evaluated in the |sandbox|, see
|sandbox-option|.
@@ -6362,9 +6368,15 @@ A jump table for the options with a short description can be found at |Q_op|.
Otherwise this option does not always reflect the current syntax (the
b:current_syntax variable does).
This option is most useful in a modeline, for a file which syntax is
- not automatically recognized. Example, in an IDL file: >
- /* vim: set syntax=idl : */
-< To switch off syntax highlighting for the current file, use: >
+ not automatically recognized. Example, in an IDL file:
+ /* vim: set syntax=idl : */ ~
+ When a dot appears in the value then this separates two filetype
+ names. Example:
+ /* vim: set syntax=c.doxygen : */ ~
+ This will use the "c" syntax first, then the "doxygen" syntax.
+ Note that the second one must be prepared to be loaded as an addition,
+ otherwise it will be skipped. More than one dot may appear.
+ To switch off syntax highlighting for the current file, use: >
:set syntax=OFF
< To switch syntax highlighting on according to the current value of the
'filetype' option: >
@@ -7190,6 +7202,7 @@ A jump table for the options with a short description can be found at |Q_op|.
insert Allow virtual editing in Insert mode.
all Allow virtual editing in all modes.
onemore Allow the cursor to move just past the end of the line
+
Virtual editing means that the cursor can be positioned where there is
no actual character. This can be halfway into a Tab or beyond the end
of the line. Useful for selecting a rectangle in Visual mode and
@@ -7198,8 +7211,10 @@ A jump table for the options with a short description can be found at |Q_op|.
after the last character of the line. This makes some commands more
consistent. Previously the cursor was always past the end of the line
if the line was empty. But it is far from Vi compatible. It may also
- break some plugins or Vim scripts. For example because |$| moves to a
- different position. Use with care!
+ break some plugins or Vim scripts. For example because |l| can move
+ the cursor after the last character. Use with care!
+ Using the |$| command will move to the last character in the line, not
+ past it. This may actually move the cursor to the left!
It doesn't make sense to combine "all" with "onemore", but you will
not get a warning for it.
@@ -7466,6 +7481,16 @@ A jump table for the options with a short description can be found at |Q_op|.
|quickfix-window|.
The height may be changed anyway when running out of room.
+ *'winfixwidth'* *'wfw'* *'nowinfixwidth'* *'nowfw'*
+'winfixwidth' 'wfw' boolean (default off)
+ local to window
+ {not in Vi}
+ {not available when compiled without the +windows
+ feature}
+ Keep the window width when windows are opened or closed and
+ 'equalalways' is set.
+ The width may be changed anyway when running out of room.
+
*'winminheight'* *'wmh'*
'winminheight' 'wmh' number (default 1)
global
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 8457b13b1..c846dfad9 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -608,8 +608,10 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'nowb' options.txt /*'nowb'*
'noweirdinvert' options.txt /*'noweirdinvert'*
'nowfh' options.txt /*'nowfh'*
+'nowfw' options.txt /*'nowfw'*
'nowildmenu' options.txt /*'nowildmenu'*
'nowinfixheight' options.txt /*'nowinfixheight'*
+'nowinfixwidth' options.txt /*'nowinfixwidth'*
'nowiv' options.txt /*'nowiv'*
'nowmnu' options.txt /*'nowmnu'*
'nowrap' options.txt /*'nowrap'*
@@ -996,6 +998,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'wd' options.txt /*'wd'*
'weirdinvert' options.txt /*'weirdinvert'*
'wfh' options.txt /*'wfh'*
+'wfw' options.txt /*'wfw'*
'wh' options.txt /*'wh'*
'whichwrap' options.txt /*'whichwrap'*
'wi' options.txt /*'wi'*
@@ -1010,6 +1013,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'winaltkeys' options.txt /*'winaltkeys'*
'window' options.txt /*'window'*
'winfixheight' options.txt /*'winfixheight'*
+'winfixwidth' options.txt /*'winfixwidth'*
'winheight' options.txt /*'winheight'*
'winminheight' options.txt /*'winminheight'*
'winminwidth' options.txt /*'winminwidth'*
@@ -5524,7 +5528,6 @@ hebrew hebrew.txt /*hebrew*
hebrew.txt hebrew.txt /*hebrew.txt*
help various.txt /*help*
help-context help.txt /*help-context*
-help-tags tags 1
help-translated various.txt /*help-translated*
help-xterm-window various.txt /*help-xterm-window*
help.txt help.txt /*help.txt*
@@ -6857,6 +6860,7 @@ startup-terminal term.txt /*startup-terminal*
static-tag tagsrch.txt /*static-tag*
status-line windows.txt /*status-line*
statusmsg-variable eval.txt /*statusmsg-variable*
+str2nr() eval.txt /*str2nr()*
strcasestr() eval.txt /*strcasestr()*
strchr() eval.txt /*strchr()*
strcspn() eval.txt /*strcspn()*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 65e3c7650..0ec9b3fff 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.0aa. Last change: 2006 Mar 17
+*todo.txt* For Vim version 7.0aa. Last change: 2006 Mar 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,6 +30,12 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
+'cindent' isn't remove when Esc is typed.
+
+Gnome GUI: lots of error messages during startup. These go away when not
+using the notebook for tab labels. Still similar error messages when moving
+the toolbar to another location.
+
Win32: Describe how to do debugging. (George Reilly)
Mac unicode patch (Da Woon Jung, Eckehard Berns):
@@ -44,22 +50,6 @@ Mac unicode patch (Da Woon Jung, Eckehard Berns):
EMBEDDING: Make it possible to run Vim inside a window of another program.
For GTK Neil Bird has a patch to use Vim like a widget.
-Support ":set syntax=cpp.doxygen"? Suggested patch by Michael Geddes (9 Aug
-2004). Should also work for 'filetype'.
-
-Add strtol() to avoid the problems with leading zero causing octal conversion.
-
-Add a 'tool' window: behaves like a preview window but there can be several.
-Don't count it in only_one_window(). (Alexei Alexandrov)
-
-Adjust src/main.aap for installing manpages like in Makefile.
- And for generating Vim.app for the Mac.
- Install spell files with src/main.aap.
-
-Win32: In the generated batch files, use $VIMRUNTIME if it's set. Examples by
-Mathias Michaelis (2004 Sep 6)
-Also place vimtutor.bat in %windir%?
-
Ctags still hasn't included the patch. Darren is looking for someone to do
maintanance. Is there another solution?
@@ -78,6 +68,10 @@ Jan 6)
Add a flag to check for a match with the next item first? Helps for
continuation lines that may contain just about anything.
+Adjust src/main.aap for installing manpages like in Makefile.
+ And for generating Vim.app for the Mac.
+ Install spell files with src/main.aap.
+
Add ":smap", Select mode mapping? Otherwise: ":sunmap", so that Visual mode
mappings for normal keys can be removed from Select mode.
@@ -2913,7 +2907,8 @@ Multiple Windows:
7 Use CTRL-W <Tab>, like alt-tab, to switch between buffers. Repeat <Tab>
to select another buffer (only loaded ones?), <BS> to go back, <Enter> to
select buffer, <Esc> to go back to original buffer.
-7 Add a 'winfixwidth' option, similar to 'winfixheight'.
+7 Add a 'tool' window: behaves like a preview window but there can be
+ several. Don't count it in only_one_window(). (Alexei Alexandrov)
6 Add an option to resize the shell when splitting and/or closing a window.
":vsp" would make the shell wider by as many columns as needed for the new
window. Specify a maximum size (or use the screen size). ":close" would
diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt
index 8a7f01871..a7d39a002 100644
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -1,4 +1,4 @@
-*version7.txt* For Vim version 7.0aa. Last change: 2006 Mar 17
+*version7.txt* For Vim version 7.0aa. Last change: 2006 Mar 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -562,6 +562,7 @@ Options: ~
'synmaxcol' maximum column to look for syntax items; avoids very
slow redrawing when there are very long lines
'verbosefile' Log messages in a file.
+'winfixwidth' window with fixed width, similar to 'winfixheight'
Ex commands: ~
@@ -714,6 +715,7 @@ New and extended functions: ~
|split()| split a String into a List
|spellbadword()| get a badly spelled word
|spellsuggest()| get suggestions for correct spelling
+|str2nr()| convert a string to a number, base 8, 10 or 16
|string()| string representation of a List or Dictionary
|system()| filters {input} through a shell command
|taglist()| get list of matching tags (Yegappan Lakshmanan)
@@ -899,6 +901,8 @@ When editing a search pattern for a "/" or "?" command and 'incsearch' is set
CTRL-L can be used to add a character from the current match. CTRL-R CTRL-W
will add a word, but exclude the part of the word that was already typed.
+Ruby interface: add line number methods. (Ryan Paul)
+
==============================================================================
IMPROVEMENTS *improvements-7*
@@ -972,9 +976,11 @@ delete the raw text. Helps if the file has a .gz extension but is not
actually compressed. (Andrew Pimlott)
When C, C++ or IDL syntax is used, may additionally load doxygen syntax.
-Also support setting the filetype to "cdoxygen" for C plus doxygen syntax.
(Michael Geddes)
+Support setting 'filetype' and 'syntax' to "aaa.bbb" for "aaa" plus "bbb"
+filetype or syntax.
+
The ":registers" command now displays multi-byte characters properly.
VMS: In the usage message mention that a slash can be used to make a flag
@@ -1223,6 +1229,9 @@ was set in an error handler.
When there are several matching tags, the ":tag <name>" and CTRL-] commands
jump to the [count] matching tag. (Yegappan Lakshmanan)
+Win32: In the batch files generated by the install program, use $VIMRUNTIME or
+$VIM if it's set. Example provided by Mathias Michaelis.
+Also create a vimtutor.bat batch file.
==============================================================================
COMPILE TIME CHANGES *compile-changes-7*
@@ -2012,5 +2021,7 @@ redrawing.
Win32: When using Korean IME making it active didn't work properly. (Moon,
Yu-sung, 2005 March 21)
+Ruby interface: when inserting/deleting lines display wasn't updated. (Ryan
+Paul)
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/ftplugin.vim b/runtime/ftplugin.vim
index 922656605..64294ca5b 100644
--- a/runtime/ftplugin.vim
+++ b/runtime/ftplugin.vim
@@ -1,7 +1,7 @@
" Vim support file to switch on loading plugins for file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last change: 2005 Mar 25
+" Last change: 2006 Mar 18
if exists("did_load_ftplugin")
finish
@@ -10,18 +10,26 @@ let did_load_ftplugin = 1
augroup filetypeplugin
au FileType * call s:LoadFTPlugin()
+
func! s:LoadFTPlugin()
if exists("b:undo_ftplugin")
exe b:undo_ftplugin
unlet! b:undo_ftplugin b:did_ftplugin
endif
- if expand("<amatch>") != ""
+
+ let s = expand("<amatch>")
+ if s != ""
if &cpo =~# "S" && exists("b:did_ftplugin")
" In compatible mode options are reset to the global values, need to
" set the local values also when a plugin was already used.
unlet b:did_ftplugin
endif
- runtime! ftplugin/<amatch>.vim ftplugin/<amatch>_*.vim ftplugin/<amatch>/*.vim
+
+ " When there is a dot it is used to separate filetype names. Thus for
+ " "aaa.bbb" load "aaa" and then "bbb".
+ for name in split(s, '\.')
+ exe 'runtime! ftplugin/' . name . '.vim ftplugin/' . name . '_*.vim ftplugin/' . name . '/*.vim'
+ endfor
endif
endfunc
augroup END
diff --git a/runtime/syntax/synload.vim b/runtime/syntax/synload.vim
index 3e54b6948..57de8128f 100644
--- a/runtime/syntax/synload.vim
+++ b/runtime/syntax/synload.vim
@@ -1,6 +1,6 @@
" Vim syntax support file
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2005 Feb 08
+" Last Change: 2006 Mar 18
" This file sets up for syntax highlighting.
" It is loaded from "syntax.vim" and "manual.vim".
@@ -49,8 +49,11 @@ fun! s:SynSet()
endif
if s != ""
- " Load the syntax file(s)
- exe "runtime! syntax/" . s . ".vim syntax/" . s . "/*.vim"
+ " Load the syntax file(s). When there are several, separated by dots,
+ " load each in sequence.
+ for name in split(s, '\.')
+ exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim"
+ endfor
endif
endfun
@@ -59,15 +62,9 @@ endfun
au Syntax cpp,c,idl
\ if (exists('b:load_doxygen_syntax') && b:load_doxygen_syntax)
\ || (exists('g:load_doxygen_syntax') && g:load_doxygen_syntax)
- \ | runtime syntax/doxygen.vim
+ \ | runtime! syntax/doxygen.vim
\ | endif
-au Syntax *doxygen
- \ if exists("b:current_syntax") | finish | endif
- \ | let syn = substitute(expand("<amatch>"), 'doxygen$', '', '')
- \ | if syn != '' | exe 'runtime syntax/'.syn.'.vim' | endif
- \ | if b:current_syntax !~ 'doxygen' | runtime syntax/doxygen.vim | endif
-
" Source the user-specified syntax highlighting file
if exists("mysyntaxfile") && filereadable(expand(mysyntaxfile))
diff --git a/runtime/tutor/tutor.vim b/runtime/tutor/tutor.vim
index 29eda4c37..85cf4183b 100644
--- a/runtime/tutor/tutor.vim
+++ b/runtime/tutor/tutor.vim
@@ -1,6 +1,6 @@
" Vim tutor support file
" Author: Eduardo F. Amatria <eferna1@platea.pntic.mec.es>
-" Last Change: 2005 Oct 16
+" Last Change: 2006 Mar 18
" This small source file is used for detecting if a translation of the
" tutor file exist, i.e., a tutor.xx file, where xx is the language.
@@ -15,16 +15,15 @@ if strlen($xx) > 1
let s:ext = "." . $xx
else
let s:lang = ""
- if exists("v:lang")
+ " Check that a potential value has at least two letters.
+ " Ignore "1043" and "C".
+ if exists("v:lang") && v:lang =~ '\a\a'
let s:lang = v:lang
- elseif strlen($LC_ALL) > 0
+ elseif $LC_ALL =~ '\a\a'
let s:lang = $LC_ALL
- elseif strlen($LANG) > 0
+ elseif $LANG =~ '\a\a'
let s:lang = $LANG
endif
- if s:lang == "C"
- let s:lang = ""
- endif
if s:lang != ""
" Remove "@euro" (ignoring case), it may be at the end
let s:lang = substitute(s:lang, '\c@euro', '', '')
@@ -36,6 +35,8 @@ else
let s:ext = ".pl"
elseif s:lang =~ "Slovak"
let s:ext = ".sk"
+ elseif s:lang =~ "Dutch"
+ let s:ext = ".nl"
else
let s:ext = "." . strpart(s:lang, 0, 2)
endif