Mercurial > vim
diff runtime/doc/eval.txt @ 3967:fdb8a9c7bd91
Updated runtime files.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 28 Nov 2012 18:21:11 +0100 |
parents | c53344bacabf |
children | 56bb88c68f98 |
line wrap: on
line diff
--- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.3. Last change: 2012 Nov 14 +*eval.txt* For Vim version 7.3. Last change: 2012 Nov 21 VIM REFERENCE MANUAL by Bram Moolenaar @@ -4878,9 +4878,9 @@ search({pattern} [, {flags} [, {stopline Search for regexp pattern {pattern}. The search starts at the cursor position (you can use |cursor()| to set it). + When a match has been found its line number is returned. If there is no match a 0 is returned and the cursor doesn't move. No error message is given. - When a match has been found its line number is returned. {flags} is a String, which can contain these character flags: 'b' search backward instead of forward @@ -5694,8 +5694,10 @@ substitute({expr}, {pat}, {sub}, {flags} This works like the ":substitute" command (without any flags). But the matching with {pat} is always done like the 'magic' option is set and 'cpoptions' is empty (to make scripts - portable). 'ignorecase' is still relevant. 'smartcase' is - not used. See |string-match| for how {pat} is used. + portable). 'ignorecase' is still relevant, use |/\c| or |/\C| + if you want to ignore or match case and ignore 'ignorecase'. + 'smartcase' is not used. See |string-match| for how {pat} is + used. A "~" in {sub} is not replaced with the previous {sub}. Note that some codes in {sub} have a special meaning @@ -6160,8 +6162,9 @@ winline() The result is a Number, which winnr([{arg}]) The result is a Number, which is the number of the current window. The top window has number 1. When the optional argument is "$", the number of the - last window is returned (the window count). - When the optional argument is "#", the number of the last + last window is returned (the window count). > + let window_count = winnr('$') +< When the optional argument is "#", the number of the last accessed window is returned (where |CTRL-W_p| goes to). If there is no previous window or it is in another tab page 0 is returned. @@ -6532,6 +6535,8 @@ See |:verbose-cmd| for more information. is excluded, ":{range}call" will call the function for each line in the range, with the cursor on the start of each line. See |function-range-example|. + The cursor is still moved to the first line of the + range, as is the case with all Ex commands. When the [abort] argument is added, the function will abort as soon as an error is detected.