Mercurial > vim
comparison runtime/doc/pattern.txt @ 5901:10fc95f48546 v7.4.293
updated for version 7.4.293
Problem: It is not possible to ignore composing characters at a specific
point in a pattern.
Solution: Add the %C item.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 13 May 2014 19:37:29 +0200 |
parents | 1dea14d4c738 |
children | 32de51778c27 |
comparison
equal
deleted
inserted
replaced
5900:20c0da43f879 | 5901:10fc95f48546 |
---|---|
543 |/\%x| \%x \%x match specified hex character (eg \%x2a) | 543 |/\%x| \%x \%x match specified hex character (eg \%x2a) |
544 |/\%o| \%o \%o match specified octal character (eg \%o040) | 544 |/\%o| \%o \%o match specified octal character (eg \%o040) |
545 |/\%u| \%u \%u match specified multibyte character (eg \%u20ac) | 545 |/\%u| \%u \%u match specified multibyte character (eg \%u20ac) |
546 |/\%U| \%U \%U match specified large multibyte character (eg | 546 |/\%U| \%U \%U match specified large multibyte character (eg |
547 \%U12345678) | 547 \%U12345678) |
548 |/\%C| \%C \%C match any composing characters | |
548 | 549 |
549 Example matches ~ | 550 Example matches ~ |
550 \<\I\i* or | 551 \<\I\i* or |
551 \<\h\w* | 552 \<\h\w* |
552 \<[a-zA-Z_][a-zA-Z0-9_]* | 553 \<[a-zA-Z_][a-zA-Z0-9_]* |
1205 | 1206 |
1206 ============================================================================== | 1207 ============================================================================== |
1207 8. Composing characters *patterns-composing* | 1208 8. Composing characters *patterns-composing* |
1208 | 1209 |
1209 */\Z* | 1210 */\Z* |
1210 When "\Z" appears anywhere in the pattern, composing characters are ignored. | 1211 When "\Z" appears anywhere in the pattern, all composing characters are |
1211 Thus only the base characters need to match, the composing characters may be | 1212 ignored. Thus only the base characters need to match, the composing |
1212 different and the number of composing characters may differ. Only relevant | 1213 characters may be different and the number of composing characters may differ. |
1213 when 'encoding' is "utf-8". | 1214 Only relevant when 'encoding' is "utf-8". |
1214 Exception: If the pattern starts with one or more composing characters, these | 1215 Exception: If the pattern starts with one or more composing characters, these |
1215 must match. | 1216 must match. |
1217 */\%C* | |
1218 Use "\%C" to skip any composing characters. For example, the pattern "a" does | |
1219 not match in "càt" (where the a has the composing character 0x0300), but | |
1220 "a\%C" does. Note that this does not match "cát" (where the á is character | |
1221 0xe1, it does not have a compositing character). It does match "cat" (where | |
1222 the a is just an a). | |
1216 | 1223 |
1217 When a composing character appears at the start of the pattern of after an | 1224 When a composing character appears at the start of the pattern of after an |
1218 item that doesn't include the composing character, a match is found at any | 1225 item that doesn't include the composing character, a match is found at any |
1219 character that includes this composing character. | 1226 character that includes this composing character. |
1220 | 1227 |