diff runtime/doc/pattern.txt @ 39:c16898406ff2

synchorinize version 7.3.081
author one@zeus.cr.ie.u-ryukyu.ac.jp
date Fri, 17 Dec 2010 17:43:06 +0900
parents e170173ecb68
children 67300faee616
line wrap: on
line diff
--- a/runtime/doc/pattern.txt	Wed Nov 26 18:20:31 2008 +0900
+++ b/runtime/doc/pattern.txt	Fri Dec 17 17:43:06 2010 +0900
@@ -1,4 +1,4 @@
-*pattern.txt*   For Vim version 7.2.  Last change: 2008 Jul 16
+*pattern.txt*   For Vim version 7.3.  Last change: 2010 Jul 20
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -32,12 +32,13 @@
 			|linewise|.
 
 							*/<CR>*
-/<CR>			Search forward for the [count]'th latest used
-			pattern |last-pattern| with latest used |{offset}|.
+/<CR>			Search forward for the [count]'th occurrence of the
+			latest used pattern |last-pattern| with latest used
+			|{offset}|.
 
-//{offset}<CR>		Search forward for the [count]'th latest used
-			pattern |last-pattern| with new |{offset}|.  If
-			{offset} is empty no offset is used.
+//{offset}<CR>		Search forward for the [count]'th occurrence of the
+			latest used pattern |last-pattern| with new
+			|{offset}|.  If {offset} is empty no offset is used.
 
 							*?*
 ?{pattern}[?]<CR>	Search backward for the [count]'th previous
@@ -48,12 +49,13 @@
 			down |linewise|.
 
 							*?<CR>*
-?<CR>			Search backward for the [count]'th latest used
-			pattern |last-pattern| with latest used |{offset}|.
+?<CR>			Search backward for the [count]'th occurrence of the
+			latest used pattern |last-pattern| with latest used
+			|{offset}|.
 
-??{offset}<CR>		Search backward for the [count]'th latest used
-			pattern |last-pattern| with new |{offset}|.  If
-			{offset} is empty no offset is used.
+??{offset}<CR>		Search backward for the [count]'th occurrence of the
+			latest used pattern |last-pattern| with new
+			|{offset}|.  If {offset} is empty no offset is used.
 
 							*n*
 n			Repeat the latest "/" or "?" [count] times.
@@ -507,7 +509,7 @@
 |/\Z|	\Z	\Z	ignore differences in Unicode "combining characters".
 			Useful when searching voweled Hebrew or Arabic text.
 
-|/\%d|	\%d	\%d	match specified decimal character (eg \%d123
+|/\%d|	\%d	\%d	match specified decimal character (eg \%d123)
 |/\%x|	\%x	\%x	match specified hex character (eg \%x2a)
 |/\%o|	\%o	\%o	match specified octal character (eg \%o040)
 |/\%u|	\%u	\%u	match specified multibyte character (eg \%u20ac)
@@ -763,7 +765,7 @@
 	branch is used.  Example: >
 		/\(.\{-}\zsFab\)\{3}
 <	Finds the third occurrence of "Fab".
-	{not in Vi} {not available when compiled without the +syntax feature}
+	{not in Vi} {not available when compiled without the |+syntax| feature}
 							*/\ze*
 \ze	Matches at any position, and sets the end of the match there: The
 	previous char is the last char of the whole match. |/zero-width|
@@ -771,7 +773,7 @@
 	branch is used.
 	Example: "end\ze\(if\|for\)" matches the "end" in "endif" and
 	"endfor".
-	{not in Vi} {not available when compiled without the +syntax feature}
+	{not in Vi} {not available when compiled without the |+syntax| feature}
 
 						*/\%^* *start-of-file*
 \%^	Matches start of the file.  When matching with a string, matches the
@@ -794,7 +796,11 @@
 						*/\%V*
 \%V	Match inside the Visual area.  When Visual mode has already been
 	stopped match in the area that |gv| would reselect.
-	Only works for the current buffer.
+	This is a |/zero-width| match.  To make sure the whole pattern is
+	inside the Visual area put it at the start and end of the pattern,
+	e.g.: >
+		/\%Vfoo.*bar\%V
+<	Only works for the current buffer.
 
 						*/\%#* *cursor-position*
 \%#	Matches with the cursor position.  Only works when matching in a
@@ -877,10 +883,13 @@
 	this will clearly show when the match is updated or not.
 	To match the text up to column 17: >
 		/.*\%17v
-<	Column 17 is not included, because that's where the "\%17v" matches,
-	and since this is a |/zero-width| match, column 17 isn't included in
-	the match.  This does the same: >
-		/.*\%<18v
+<	Column 17 is included, because that's where the "\%17v" matches,
+	even though this is a |/zero-width| match.  Adding a dot to match the
+	next character has the same result: >
+		/.*\%17v.
+<	This command does the same thing, but also matches when there is no
+	character in column 17: >
+		/.*\%<18v.
 <
 
 Character classes: {not in Vi}
@@ -986,7 +995,8 @@
 	in the collection: "[^xyz]" matches anything but 'x', 'y' and 'z'.
 	- If two characters in the sequence are separated by '-', this is
 	  shorthand for the full list of ASCII characters between them.  E.g.,
-	  "[0-9]" matches any decimal digit.
+	  "[0-9]" matches any decimal digit.  Non-ASCII characters can be
+	  used, but the character values must not be more than 256 apart.
 	- A character class expression is evaluated to the set of characters
 	  belonging to that character class.  The following character classes
 	  are supported:
@@ -1034,9 +1044,9 @@
 	  "^"):  "[]xyz]" or "[^]xyz]" {not in Vi}.
 	  For '-' you can also make it the first or last character: "[-xyz]",
 	  "[^-xyz]" or "[xyz-]".  For '\' you can also let it be followed by
-	  any character that's not in "^]-\bertn".  "[\xyz]" matches '\', 'x',
-	  'y' and 'z'.  It's better to use "\\" though, future expansions may
-	  use other characters after '\'.
+	  any character that's not in "^]-\bdertnoUux".  "[\xyz]" matches '\',
+	  'x', 'y' and 'z'.  It's better to use "\\" though, future expansions
+	  may use other characters after '\'.
 	- The following translations are accepted when the 'l' flag is not
 	  included in 'cpoptions' {not in Vi}:
 		\e	<Esc>
@@ -1075,7 +1085,7 @@
 	To include a "[" use "[[]" and for "]" use []]", e.g.,: >
 		/index\%[[[]0[]]]
 <	matches "index" "index[", "index[0" and "index[0]".
-	{not available when compiled without the +syntax feature}
+	{not available when compiled without the |+syntax| feature}
 
 				*/\%d* */\%x* */\%o* */\%u* */\%U* *E678*