diff options
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r-- | runtime/doc/eval.txt | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index bf89ee6bf..94c8f3129 100644 --- 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} [, {timeout}]]]) *search()* 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}) *substitute()* 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 is the screen line of the cursor 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. |