Mercurial > vim
diff runtime/doc/eval.txt @ 7358:6fbeef3b65e6 v7.4.984
commit https://github.com/vim/vim/commit/ad4d8a192abf44b89371af87d70b971cd654b799
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Dec 28 19:20:36 2015 +0100
patch 7.4.984
Problem: searchpos() always starts searching in the first column, which is
not what some people expect. (Brett Stahlman)
Solution: Add the 'z' flag: start at the specified column.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 28 Dec 2015 19:30:04 +0100 |
parents | 444efa5f5015 |
children | aea5ebf352c4 |
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.4. Last change: 2015 Dec 03 +*eval.txt* For Vim version 7.4. Last change: 2015 Dec 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -5228,14 +5228,15 @@ search({pattern} [, {flags} [, {stopline move. No error message is given. {flags} is a String, which can contain these character flags: - 'b' search backward instead of forward - 'c' accept a match at the cursor position + 'b' search Backward instead of forward + 'c' accept a match at the Cursor position 'e' move to the End of the match 'n' do Not move the cursor - 'p' return number of matching sub-pattern (see below) - 's' set the ' mark at the previous location of the cursor - 'w' wrap around the end of the file - 'W' don't wrap around the end of the file + 'p' return number of matching sub-Pattern (see below) + 's' Set the ' mark at the previous location of the cursor + 'w' Wrap around the end of the file + 'W' don't Wrap around the end of the file + 'z' start searching at the cursor column instead of zero If neither 'w' or 'W' is given, the 'wrapscan' option applies. If the 's' flag is supplied, the ' mark is set, only if the @@ -5243,6 +5244,12 @@ search({pattern} [, {flags} [, {stopline flag. 'ignorecase', 'smartcase' and 'magic' are used. + + When the 'z' flag is not given seaching always starts in + column zero and then matches before the cursor are skipped. + When the 'c' flag is present in 'cpo' the next search starts + after the match. Without the 'c' flag the next search starts + one column further. When the {stopline} argument is given then the search stops after searching this line. This is useful to restrict the