diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-01-27 14:41:15 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-01-27 14:41:15 +0000 |
commit | 677ee6890d12218461196f5df92b4dc3d0e52129 (patch) | |
tree | c59a8f9d1b14e8c3abc4929c2b5f7a2b71698bdb /runtime | |
parent | 10de2da0f567ae615913fe6bc9831590436af4e5 (diff) |
updated for version 7.0045
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/autocmd.txt | 4 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 59 | ||||
-rw-r--r-- | runtime/doc/insert.txt | 5 | ||||
-rw-r--r-- | runtime/doc/options.txt | 6 | ||||
-rw-r--r-- | runtime/doc/pattern.txt | 4 | ||||
-rw-r--r-- | runtime/doc/pi_netrw.txt | 2 | ||||
-rw-r--r-- | runtime/doc/syntax.txt | 4 | ||||
-rw-r--r-- | runtime/doc/tags | 34 | ||||
-rw-r--r-- | runtime/doc/various.txt | 8 | ||||
-rw-r--r-- | runtime/doc/version6.txt | 4 | ||||
-rw-r--r-- | runtime/doc/windows.txt | 4 | ||||
-rw-r--r-- | runtime/syntax/c.vim | 10 |
12 files changed, 75 insertions, 69 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 9c69d2cd34..2b7edf5eca 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 7.0aa. Last change: 2004 Dec 24 +*autocmd.txt* For Vim version 7.0aa. Last change: 2005 Jan 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -495,7 +495,7 @@ InsertChange When typing <Insert> while in Insert or anything else that the user does not expect. *InsertLeave* InsertLeave When leaving Insert mode. Also when using - CTRL-O |i_CTRL-O|. + CTRL-O |i_CTRL-O|. But not for |i_CTRL-C|. *FileEncoding* FileEncoding Obsolete. It still works and is equivalent to |EncodingChanged|. diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 5cb961132d..cbd233a398 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.0aa. Last change: 2005 Jan 25 +*eval.txt* For Vim version 7.0aa. Last change: 2005 Jan 27 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1458,6 +1458,7 @@ inputsave() Number save and clear typeahead inputsecret( {prompt} [, {text}]) String like input() but hiding the text insert( {list}, {item} [, {idx}]) List insert {item} in {list} [before {idx}] isdirectory( {directory}) Number TRUE if {directory} is a directory +items( {dict}) List List of key-value pairs in {dict} join( {list} [, {sep}]) String join {list} items into one String keys( {dict}) List List of keys in {dict} len( {expr}) Number the length of {expr} @@ -1519,7 +1520,8 @@ string( {expr}) String String representation of {expr} value strlen( {expr}) Number length of the String {expr} strpart( {src}, {start}[, {len}]) String {len} characters of {src} at {start} -strridx( {haystack}, {needle}) Number last index of {needle} in {haystack} +strridx( {haystack}, {needle} [, {start}]) + Number last index of {needle} in {haystack} strtrans( {expr}) String translate string to make it printable submatch( {nr}) String specific match in ":substitute" substitute( {expr}, {pat}, {sub}, {flags}) @@ -1535,6 +1537,7 @@ toupper( {expr}) String the String {expr} switched to uppercase tr( {src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr} to chars in {tostr} type( {name}) Number type of variable {name} +values( {dict}) List List of values in {dict} virtcol( {expr}) Number screen column of cursor or mark visualmode( [expr]) String last visual mode used winbufnr( {nr}) Number buffer number of window {nr} @@ -2266,7 +2269,7 @@ function({name}) *function()* *E700* {name} can be a user defined function or an internal function. -get({list}, {idx} [, {default}]) *get* +get({list}, {idx} [, {default}]) *get()* Get item {idx} from List {list}. When this item is not available return {default}. Return zero when {default} is omitted. @@ -2780,6 +2783,11 @@ isdirectory({directory}) *isdirectory()* exist, or isn't a directory, the result is FALSE. {directory} is any expression, which is used as a String. +items({dict}) *items()* + Return a List with all the key-value pairs of {dict}. Each + List item is a list with two items: the key of a {dict} entry + and the value of this entry. The List is in arbitrary order. + join({list} [, {sep}]) *join()* Join the items in {list} together into one String. @@ -3517,12 +3525,15 @@ strftime({format} [, {time}]) *strftime()* stridx({haystack}, {needle} [, {start}]) *stridx()* The result is a Number, which gives the byte index in {haystack} of the first occurrence of the String {needle}. - If {start} is specified, the String {needle} is searched from - the byte index {start} in the String {haystack}. - The search is done case-sensitive. + If {start} is specified, the search starts at index {start}. + This can be used to find a second match: > + :let comma1 = stridx(line, ",") + :let comma2 = stridx(line, ",", comma1 + 1) +< The search is done case-sensitive. For pattern searches use |match()|. -1 is returned if the {needle} does not occur in {haystack}. - See also |strridx()|. Examples: > + See also |strridx()|. + Examples: > :echo stridx("An Example", "Example") 3 :echo stridx("Starting point", "Start") 0 :echo stridx("Starting point", "start") -1 @@ -3565,10 +3576,15 @@ strpart({src}, {start}[, {len}]) *strpart()* example, to get three bytes under and after the cursor: > strpart(getline(line(".")), col(".") - 1, 3) < -strridx({haystack}, {needle}) *strridx()* - The result is a Number, which gives the index in {haystack} of - the last occurrence of the String {needle}. - The search is done case-sensitive. +strridx({haystack}, {needle} [, {start}]) *strridx()* + The result is a Number, which gives the byte index in + {haystack} of the last occurrence of the String {needle}. + When {start} is specified, matches beyond this index are + ignored. This can be used to find a match before a previous + match: > + :let lastcomma = strridx(line, ",") + :let comma2 = strridx(line, ",", lastcomma - 1) +< The search is done case-sensitive. For pattern searches use |match()|. -1 is returned if the {needle} does not occur in {haystack}. If the {needle} is empty the length of {haystack} is returned. @@ -3742,6 +3758,11 @@ type({expr}) The result is a Number, depending on the type of {expr}: :if type(myvar) == type(function("tr")) :if type(myvar) == type([]) +values({dict}) *values()* + Return a List with all the values of {dict}. The List is in + arbitrary order. + + virtcol({expr}) *virtcol()* The result is a Number, which is the screen column of the file position given with {expr}. That is, the last screen position @@ -4161,17 +4182,15 @@ Example: > : echohl Title : echo a:title : echohl None - : let idx = 1 - : while idx <= a:0 - : echo a:{idx} . ' ' - : let idx = idx + 1 - : endwhile - : return idx + : echo a:0 . " items:" + : for s in a:000 + : echon ' ' . s + : endfor :endfunction This function can then be called with: > - let lines = Table("Table", "line1", "line2") - let lines = Table("Empty Table") + call Table("Table", "line1", "line2") + call Table("Empty Table") To return more than one value, pass the name of a global variable: > :function Compute(n1, n2, divname) @@ -4411,7 +4430,7 @@ This would call the function "my_func_whizz(parameter)". List item. :let [{name}, ..., ; {lastname}] = {expr1} - Like |let-unpack| above, but the List may have more + Like |:let-unpack| above, but the List may have more items than there are names. A list of the remaining items is assigned to {lastname}. If there are no remaining items {lastname} is set to an empty list. diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt index 579068c586..74b68e16a2 100644 --- a/runtime/doc/insert.txt +++ b/runtime/doc/insert.txt @@ -1,4 +1,4 @@ -*insert.txt* For Vim version 7.0aa. Last change: 2005 Jan 05 +*insert.txt* For Vim version 7.0aa. Last change: 2005 Jan 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -53,7 +53,8 @@ char action ~ yourself to use CTRL-[. *i_CTRL-C* CTRL-C Quit insert mode, go back to Normal mode. Do not check for - abbreviations. + abbreviations. Does not trigger the |InsertLeave| autocommand + event. *i_CTRL-@* CTRL-@ Insert previously inserted text and stop insert. {Vi: only diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 62b6de999f..0adbb8d3b8 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.0aa. Last change: 2005 Jan 14 +*options.txt* For Vim version 7.0aa. Last change: 2005 Jan 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2738,7 +2738,7 @@ A jump table for the options with a short description can be found at |Q_op|. A pattern that is used to recognize a list header. This is used for the "n" flag in 'formatoptions'. The pattern must match exactly the text that will be the indent for - the line below it. You can use |\ze| to mark the end of the match + the line below it. You can use |/\ze| to mark the end of the match while still checking more characters. There must be a character following the pattern, when it matches the whole line it is handled like there is no match. @@ -4656,7 +4656,7 @@ A jump table for the options with a short description can be found at |Q_op|. List of items that control the format of the output of |:hardcopy|. See |popt-option|. - *'quoteescape''* *'qe'* + *'quoteescape'* *'qe'* 'quoteescape' 'qe' string (default "\") local to buffer {not in Vi} diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index 21c9f57c09..2ff676ac2d 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1,4 +1,4 @@ -*pattern.txt* For Vim version 7.0aa. Last change: 2005 Jan 24 +*pattern.txt* For Vim version 7.0aa. Last change: 2005 Jan 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1027,7 +1027,7 @@ x A single character, with no special meaning, matches itself < Matches the words "r", "re", "ro", "rea", "roa", "read" and "road". {not available when compiled without the +syntax feature} - */\%d* */\%x* */\%o* */\%u* */\%U/* *E678* + */\%d* */\%x* */\%o* */\%u* */\%U* *E678* \%d123 Matches the character specified with a decimal number. Must be followed by a non-digit. diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt index 4e8243dcdf..3f202da1b8 100644 --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -740,7 +740,7 @@ One may rename a block of files and directories by selecting them with the V (|linewise-visual|). -HIDING FILES OR DIRECTORIES *g:netrw-a* *g:netrw_list_hide* +HIDING FILES OR DIRECTORIES *netrw-a* *g:netrw_list_hide* Netrw's browsing facility allows one to use the hiding list in one of three ways: ignore it, hide files which match, and show only those files diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 583a784e4a..c421a22982 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.0aa. Last change: 2004 Dec 09 +*syntax.txt* For Vim version 7.0aa. Last change: 2005 Jan 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -631,6 +631,8 @@ c_space_errors trailing white space and spaces before a <Tab> c_no_trail_space_error ... but no trailing spaces c_no_tab_space_error ... but no spaces before a <Tab> c_no_bracket_error don't highlight {}; inside [] as errors +c_no_curly_error don't highlight {}; inside [] and () as errors; + except { and } in first column c_no_ansi don't do standard ANSI types and constants c_ansi_typedefs ... but do standard ANSI types c_ansi_constants ... but do standard ANSI constants diff --git a/runtime/doc/tags b/runtime/doc/tags index ab5781e74d..e86052cbf1 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -639,7 +639,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* 'pvw' options.txt /*'pvw'* 'qe' options.txt /*'qe'* 'quote motion.txt /*'quote* -'quoteescape'' options.txt /*'quoteescape''* +'quoteescape' options.txt /*'quoteescape'* 'readonly' options.txt /*'readonly'* 'redraw' vi_diff.txt /*'redraw'* 'remap' options.txt /*'remap'* @@ -1226,7 +1226,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* /\%>c pattern.txt /*\/\\%>c* /\%>l pattern.txt /*\/\\%>l* /\%>v pattern.txt /*\/\\%>v* -/\%U/ pattern.txt /*\/\\%U\/* +/\%U pattern.txt /*\/\\%U* /\%[] pattern.txt /*\/\\%[]* /\%^ pattern.txt /*\/\\%^* /\%c pattern.txt /*\/\\%c* @@ -1581,6 +1581,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :, cmdline.txt /*:,* :. cmdline.txt /*:.* :/ cmdline.txt /*:\/* +:0file editing.txt /*:0file* ::. cmdline.txt /*::.* ::8 cmdline.txt /*::8* ::e cmdline.txt /*::e* @@ -1606,13 +1607,11 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME* :@ repeat.txt /*:@* :@: repeat.txt /*:@:* :@@ repeat.txt /*:@@* -:Explore pi_expl.txt /*:Explore* :Man filetype.txt /*:Man* :N editing.txt /*:N* :Next editing.txt /*:Next* :P various.txt /*:P* :Print various.txt /*:Print* -:Sexplore pi_expl.txt /*:Sexplore* :TOhtml syntax.txt /*:TOhtml* :X editing.txt /*:X* :\bar cmdline.txt /*:\\bar* @@ -4655,9 +4654,6 @@ exists() eval.txt /*exists()* expand() eval.txt /*expand()* expand-env options.txt /*expand-env* expand-environment-var options.txt /*expand-environment-var* -expl-starting pi_expl.txt /*expl-starting* -explorer-delete pi_expl.txt /*explorer-delete* -explorer-rename pi_expl.txt /*explorer-rename* expr eval.txt /*expr* expr-! eval.txt /*expr-!* expr-!= eval.txt /*expr-!=* @@ -4732,9 +4728,7 @@ farsi.txt farsi.txt /*farsi.txt* fasm.vim syntax.txt /*fasm.vim* feature-list eval.txt /*feature-list* fetch pi_netrw.txt /*fetch* -file-browser pi_expl.txt /*file-browser* file-browser-5.2 version5.txt /*file-browser-5.2* -file-explorer pi_expl.txt /*file-explorer* file-formats editing.txt /*file-formats* file-pattern autocmd.txt /*file-pattern* file-read insert.txt /*file-read* @@ -4850,22 +4844,6 @@ g'a motion.txt /*g'a* g, motion.txt /*g,* g0 motion.txt /*g0* g8 various.txt /*g8* -g:explDateFormat pi_expl.txt /*g:explDateFormat* -g:explDetailedHelp pi_expl.txt /*g:explDetailedHelp* -g:explDetailedList pi_expl.txt /*g:explDetailedList* -g:explDirsFirst pi_expl.txt /*g:explDirsFirst* -g:explFileHandler pi_expl.txt /*g:explFileHandler* -g:explHideFiles pi_expl.txt /*g:explHideFiles* -g:explSortBy pi_expl.txt /*g:explSortBy* -g:explSplitBelow pi_expl.txt /*g:explSplitBelow* -g:explSplitRight pi_expl.txt /*g:explSplitRight* -g:explStartBelow pi_expl.txt /*g:explStartBelow* -g:explStartRight pi_expl.txt /*g:explStartRight* -g:explSuffixesLast pi_expl.txt /*g:explSuffixesLast* -g:explUseSeparators pi_expl.txt /*g:explUseSeparators* -g:explVertical pi_expl.txt /*g:explVertical* -g:explWinSize pi_expl.txt /*g:explWinSize* -g:netrw-a pi_netrw.txt /*g:netrw-a* g:netrw_list_cmd pi_netrw.txt /*g:netrw_list_cmd* g:netrw_list_hide pi_netrw.txt /*g:netrw_list_hide* g:netrw_rm_cmd pi_netrw.txt /*g:netrw_rm_cmd* @@ -4906,7 +4884,7 @@ g`a motion.txt /*g`a* ga various.txt /*ga* gd pattern.txt /*gd* ge motion.txt /*ge* -get eval.txt /*get* +get() eval.txt /*get()* getbufvar() eval.txt /*getbufvar()* getchar() eval.txt /*getchar()* getcharmod() eval.txt /*getcharmod()* @@ -5314,6 +5292,7 @@ ip motion.txt /*ip* iquote motion.txt /*iquote* is motion.txt /*is* isdirectory() eval.txt /*isdirectory()* +items() eval.txt /*items()* iw motion.txt /*iw* i{ motion.txt /*i{* i} motion.txt /*i}* @@ -5593,6 +5572,7 @@ netrw-D pi_netrw.txt /*netrw-D* netrw-R pi_netrw.txt /*netrw-R* netrw-S pi_netrw.txt /*netrw-S* netrw-U pi_netrw.txt /*netrw-U* +netrw-a pi_netrw.txt /*netrw-a* netrw-activate pi_netrw.txt /*netrw-activate* netrw-b pi_netrw.txt /*netrw-b* netrw-bookmark pi_netrw.txt /*netrw-bookmark* @@ -5823,7 +5803,6 @@ php3-syntax syntax.txt /*php3-syntax* php3.vim syntax.txt /*php3.vim* phtml-syntax syntax.txt /*phtml-syntax* phtml.vim syntax.txt /*phtml.vim* -pi_expl.txt pi_expl.txt /*pi_expl.txt* pi_gzip.txt pi_gzip.txt /*pi_gzip.txt* pi_netrw.txt pi_netrw.txt /*pi_netrw.txt* pi_spec.txt pi_spec.txt /*pi_spec.txt* @@ -6693,6 +6672,7 @@ v_x change.txt /*v_x* v_y change.txt /*v_y* v_~ change.txt /*v_~* val-variable eval.txt /*val-variable* +values() eval.txt /*values()* variables eval.txt /*variables* various various.txt /*various* various-cmds various.txt /*various-cmds* diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index a04dd30cb5..eb5cc8b82c 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 7.0aa. Last change: 2005 Jan 20 +*various.txt* For Vim version 7.0aa. Last change: 2005 Jan 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -492,9 +492,9 @@ K Run a program to lookup the keyword under the :sleep 100m "sleep for a hundred milliseconds 10gs "sleep for ten seconds < Can be interrupted with CTRL-C (CTRL-Break on MS-DOS). - "gs" stands for "goto sleep". While sleeping the - cursor is positioned in the text (if visible). {not - in Vi} + "gs" stands for "goto sleep". + While sleeping the cursor is positioned in the text, + if at a visible position. {not in Vi} *g_CTRL-A* g CTRL-A Only when Vim was compiled with MEM_PROFILING defined diff --git a/runtime/doc/version6.txt b/runtime/doc/version6.txt index bb04a6b4be..1712754a7a 100644 --- a/runtime/doc/version6.txt +++ b/runtime/doc/version6.txt @@ -1,4 +1,4 @@ -*version6.txt* For Vim version 7.0aa. Last change: 2004 Jun 16 +*version6.txt* For Vim version 7.0aa. Last change: 2005 Jan 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -865,8 +865,6 @@ on a directory moves the browser to that directory. There are several other possibilities, such as opening a file in the preview window, renaming files and deleting files. -See |file-explorer|. - Editing files over a network *new-network-files* ---------------------------- diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index 4ba6d4a268..f9616a72b9 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -1,4 +1,4 @@ -*windows.txt* For Vim version 7.0aa. Last change: 2004 Dec 29 +*windows.txt* For Vim version 7.0aa. Last change: 2005 Jan 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1098,7 +1098,7 @@ help Contains a help file. Will only be created with the |:help| and can't be changed. The 'buflisted' option will be reset for a help buffer. -directory Displays directory contents. Used by the |file-explorer| +directory Displays directory contents. Can be used by a file explorer plugin. The buffer is created with these settings: > :set buftype=nowrite :set bufhidden=delete diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim index ee739b9e09..eef33822b7 100644 --- a/runtime/syntax/c.vim +++ b/runtime/syntax/c.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: C " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2004 Dec 09 +" Last Change: 2005 Jan 26 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -67,7 +67,13 @@ endif " also accept <% for {, %> for }, <: for [ and :> for ] (C99) " But avoid matching <::. syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cCommentSkip,cOctalZero,cCppOut,cCppOut2,cCppSkip,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom -if exists("c_no_bracket_error") +if exists("c_no_curly_error") + syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cCppString,@Spell + " cCppParen: same as cParen but ends at end-of-line; used in cDefine + syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell + syn match cParenError display ")" + syn match cErrInParen display contained "^[{}]\|^<%\|^%>" +elseif exists("c_no_bracket_error") syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cCppString,@Spell " cCppParen: same as cParen but ends at end-of-line; used in cDefine syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell |