diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-03-18 21:40:56 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-03-18 21:40:56 +0000 |
commit | 97b2ad35425fd589c4ff816d1f1161f2f7f6a93d (patch) | |
tree | a0fed79e1bd28b00c32554c62110903d49ac9b20 | |
parent | 658b74a7360cff23939dbf5075b8e18e38c77a81 (diff) |
updated for version 7.0228
-rw-r--r-- | runtime/doc/eval.txt | 39 | ||||
-rw-r--r-- | runtime/doc/options.txt | 77 | ||||
-rw-r--r-- | runtime/doc/tags | 6 | ||||
-rw-r--r-- | runtime/doc/todo.txt | 31 | ||||
-rw-r--r-- | runtime/doc/version7.txt | 15 | ||||
-rw-r--r-- | runtime/ftplugin.vim | 14 | ||||
-rw-r--r-- | runtime/syntax/synload.vim | 17 | ||||
-rw-r--r-- | runtime/tutor/tutor.vim | 15 | ||||
-rwxr-xr-x | src/auto/configure | 12 | ||||
-rw-r--r-- | src/charset.c | 3 | ||||
-rw-r--r-- | src/configure.in | 11 | ||||
-rw-r--r-- | src/dosinst.c | 80 | ||||
-rw-r--r-- | src/dosinst.h | 4 | ||||
-rw-r--r-- | src/edit.c | 2 | ||||
-rw-r--r-- | src/ex_getln.c | 2 | ||||
-rw-r--r-- | src/gui_gtk_x11.c | 62 | ||||
-rw-r--r-- | src/gui_w32.c | 2 | ||||
-rw-r--r-- | src/misc2.c | 2 | ||||
-rw-r--r-- | src/option.c | 13 | ||||
-rw-r--r-- | src/option.h | 3 | ||||
-rw-r--r-- | src/proto/getchar.pro | 6 | ||||
-rw-r--r-- | src/structs.h | 3 | ||||
-rw-r--r-- | src/version.h | 4 |
23 files changed, 271 insertions, 152 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 3171e96718..79a74ff36a 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 822200c7e2..d0c8a480ae 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 8457b13b14..c846dfad9c 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 65e3c76506..0ec9b3ffff 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 8a7f018718..a7d39a0022 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 922656605a..64294ca5b2 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 3e54b6948b..57de8128f8 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 29eda4c379..85cf4183bf 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 diff --git a/src/auto/configure b/src/auto/configure index 3dfa1b6015..20668eb294 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -7837,6 +7837,18 @@ echo "${ECHO_T}yes" >&6 GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0` GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0` GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0` + + echo "$as_me:$LINENO: checking for FreeBSD" >&5 +echo $ECHO_N "checking for FreeBSD... $ECHO_C" >&6 + if test "`(uname) 2>/dev/null`" = FreeBSD; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE" + GNOME_LIBS="$GNOME_LIBS -pthread" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi have_gnome=yes else echo "$as_me:$LINENO: result: not found" >&5 diff --git a/src/charset.c b/src/charset.c index 7c820d24b7..df8685216f 100644 --- a/src/charset.c +++ b/src/charset.c @@ -1722,9 +1722,10 @@ vim_isblankline(lbuf) * If "len" is not NULL, the length of the number in characters is returned. * If "nptr" is not NULL, the signed result is returned in it. * If "unptr" is not NULL, the unsigned result is returned in it. + * If "unptr" is not NULL, the unsigned result is returned in it. * If "dooct" is non-zero recognize octal numbers, when > 1 always assume * octal number. - * If "dohext" is non-zero recognize hex numbers, when > 1 always assume + * If "dohex" is non-zero recognize hex numbers, when > 1 always assume * hex number. */ void diff --git a/src/configure.in b/src/configure.in index 3412b95d05..90eb33b8a6 100644 --- a/src/configure.in +++ b/src/configure.in @@ -1478,6 +1478,17 @@ AC_DEFUN([GNOME_INIT_HOOK], GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0` GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0` GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0` + + dnl On FreeBSD we need -pthread but pkg-config doesn't include it. + dnl This might not be the right way but it works for me... + AC_MSG_CHECKING(for FreeBSD) + if test "`(uname) 2>/dev/null`" = FreeBSD; then + AC_MSG_RESULT(yes, adding -pthread) + GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE" + GNOME_LIBS="$GNOME_LIBS -pthread" + else + AC_MSG_RESULT(no) + fi $1 else AC_MSG_RESULT(not found) diff --git a/src/dosinst.c b/src/dosinst.c index 41a826708c..1b572a0750 100644 --- a/src/dosinst.c +++ b/src/dosinst.c @@ -751,7 +751,6 @@ install_bat_choice(int idx) char *exename = targets[choices[idx].arg].exenamearg; char *vimarg = targets[choices[idx].arg].exearg; FILE *fd; - char buf[BUFSIZE]; if (*batpath != NUL) { @@ -763,23 +762,29 @@ install_bat_choice(int idx) need_uninstall_entry = 1; fprintf(fd, "@echo off\n"); - fprintf(fd, "rem -- Run Vim --\n\n"); + fprintf(fd, "rem -- Run Vim --\n"); + fprintf(fd, "\n"); - strcpy(buf, installdir); - buf[runtimeidx - 1] = NUL; - /* Don't use double quotes for the value here, also when buf + /* Don't use double quotes for the "set" argument, also when it * contains a space. The quotes would be included in the value - * for MSDOS and NT. */ - fprintf(fd, "set VIM=%s\n\n", buf); - - strcpy(buf, installdir + runtimeidx); - add_pathsep(buf); - strcat(buf, exename); + * for MSDOS and NT. + * The order of preference is: + * 1. $VIMRUNTIME/vim.exe (user preference) + * 2. $VIM/vim70/vim.exe (hard coded version) + * 3. installdir/vim.exe (hard coded install directory) + */ + fprintf(fd, "set VIM_EXE_DIR=%s\n", installdir); + fprintf(fd, "if exist \"%%VIM%%\\%s\\%s\" set VIM_EXE_DIR=%%VIM%%\\%s\n", + VIM_VERSION_NODOT, exename, VIM_VERSION_NODOT); + fprintf(fd, "if exist \"%%VIMRUNTIME%%\\%s\" set VIM_EXE_DIR=%%VIMRUNTIME%%\n", exename); + fprintf(fd, "\n"); /* Give an error message when the executable could not be found. */ - fprintf(fd, "if exist \"%%VIM%%\\%s\" goto havevim\n", buf); - fprintf(fd, "echo \"%%VIM%%\\%s\" not found\n", buf); - fprintf(fd, "goto eof\n\n"); + fprintf(fd, "if exist \"%%VIM_EXE_DIR%%\\%s\" goto havevim\n", + exename); + fprintf(fd, "echo \"%%VIM_EXE_DIR%%\\%s\" not found\n", exename); + fprintf(fd, "goto eof\n"); + fprintf(fd, "\n"); fprintf(fd, ":havevim\n"); fprintf(fd, "rem collect the arguments in VIMARGS for Win95\n"); @@ -796,10 +801,12 @@ install_bat_choice(int idx) } fprintf(fd, "set VIMARGS=%%VIMARGS%% %%1\n"); fprintf(fd, "shift\n"); - fprintf(fd, "goto loopstart\n\n"); + fprintf(fd, "goto loopstart\n"); fprintf(fd, ":loopend\n"); + fprintf(fd, "\n"); - fprintf(fd, "if .%%OS%%==.Windows_NT goto ntaction\n\n"); + fprintf(fd, "if .%%OS%%==.Windows_NT goto ntaction\n"); + fprintf(fd, "\n"); /* For gvim.exe use "start" to avoid that the console window stays * open. */ @@ -809,24 +816,21 @@ install_bat_choice(int idx) fprintf(fd, "start "); } - /* Do use quotes here if the path includes a space. */ - if (strchr(installdir, ' ') != NULL) - fprintf(fd, "\"%%VIM%%\\%s\" %s %%VIMARGS%%\n", buf, vimarg); - else - fprintf(fd, "%%VIM%%\\%s %s %%VIMARGS%%\n", buf, vimarg); - fprintf(fd, "goto eof\n\n"); + /* Always use quotes, $VIM or $VIMRUNTIME might have a space. */ + fprintf(fd, "\"%%VIM_EXE_DIR%%\\%s\" %s %%VIMARGS%%\n", + exename, vimarg); + fprintf(fd, "goto eof\n"); + fprintf(fd, "\n"); if (*exename == 'g') { fprintf(fd, ":nofork\n"); fprintf(fd, "start /w "); - /* Do use quotes here if the path includes a space. */ - if (strchr(installdir, ' ') != NULL) - fprintf(fd, "\"%%VIM%%\\%s\" %s %%VIMARGS%%\n", buf, - vimarg); - else - fprintf(fd, "%%VIM%%\\%s %s %%VIMARGS%%\n", buf, vimarg); - fprintf(fd, "goto eof\n\n"); + /* Always use quotes, $VIM or $VIMRUNTIME might have a space. */ + fprintf(fd, "\"%%VIM_EXE_DIR%%\\%s\" %s %%VIMARGS%%\n", + exename, vimarg); + fprintf(fd, "goto eof\n"); + fprintf(fd, "\n"); } fprintf(fd, ":ntaction\n"); @@ -840,22 +844,18 @@ install_bat_choice(int idx) fprintf(fd, "start \"dummy\" /b "); } - /* Do use quotes here if the path includes a space. */ - if (strchr(installdir, ' ') != NULL) - fprintf(fd, "\"%%VIM%%\\%s\" %s %%*\n", buf, vimarg); - else - fprintf(fd, "%%VIM%%\\%s %s %%*\n", buf, vimarg); - fprintf(fd, "goto eof\n\n"); + /* Always use quotes, $VIM or $VIMRUNTIME might have a space. */ + fprintf(fd, "\"%%VIM_EXE_DIR%%\\%s\" %s %%*\n", exename, vimarg); + fprintf(fd, "goto eof\n"); + fprintf(fd, "\n"); if (*exename == 'g') { fprintf(fd, ":noforknt\n"); fprintf(fd, "start \"dummy\" /b /wait "); - /* Do use quotes here if the path includes a space. */ - if (strchr(installdir, ' ') != NULL) |