Mercurial > vim
comparison runtime/doc/pattern.txt @ 25402:bdda48f01a68
Update runtime files
Commit: https://github.com/vim/vim/commit/53f7fccc9413c9f770694b56f40f242d383b2d5f
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 28 20:10:16 2021 +0200
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 28 Jul 2021 20:15:05 +0200 |
parents | 10b269321459 |
children | 3b34837f4538 |
comparison
equal
deleted
inserted
replaced
25401:64c069059e9b | 25402:bdda48f01a68 |
---|---|
1 *pattern.txt* For Vim version 8.2. Last change: 2021 May 02 | 1 *pattern.txt* For Vim version 8.2. Last change: 2021 Jul 16 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
934 \%>.l Matches below the cursor line. | 934 \%>.l Matches below the cursor line. |
935 These three can be used to match specific lines in a buffer. The "23" | 935 These three can be used to match specific lines in a buffer. The "23" |
936 can be any line number. The first line is 1. | 936 can be any line number. The first line is 1. |
937 WARNING: When inserting or deleting lines Vim does not automatically | 937 WARNING: When inserting or deleting lines Vim does not automatically |
938 update the matches. This means Syntax highlighting quickly becomes | 938 update the matches. This means Syntax highlighting quickly becomes |
939 wrong. Also when refering to the cursor position (".") and | 939 wrong. Also when referring to the cursor position (".") and |
940 the cursor moves the display isn't updated for this change. An update | 940 the cursor moves the display isn't updated for this change. An update |
941 is done when using the |CTRL-L| command (the whole screen is updated). | 941 is done when using the |CTRL-L| command (the whole screen is updated). |
942 Example, to highlight the line where the cursor currently is: > | 942 Example, to highlight the line where the cursor currently is: > |
943 :exe '/\%' . line(".") . 'l' | 943 :exe '/\%' . line(".") . 'l' |
944 < Alternatively use: > | 944 < Alternatively use: > |
957 string. The "23" can be any column number. The first column is 1. | 957 string. The "23" can be any column number. The first column is 1. |
958 Actually, the column is the byte number (thus it's not exactly right | 958 Actually, the column is the byte number (thus it's not exactly right |
959 for multibyte characters). | 959 for multibyte characters). |
960 WARNING: When inserting or deleting text Vim does not automatically | 960 WARNING: When inserting or deleting text Vim does not automatically |
961 update the matches. This means Syntax highlighting quickly becomes | 961 update the matches. This means Syntax highlighting quickly becomes |
962 wrong. Also when refering to the cursor position (".") and | 962 wrong. Also when referring to the cursor position (".") and |
963 the cursor moves the display isn't updated for this change. An update | 963 the cursor moves the display isn't updated for this change. An update |
964 is done when using the |CTRL-L| command (the whole screen is updated). | 964 is done when using the |CTRL-L| command (the whole screen is updated). |
965 | 965 |
966 Example, to highlight the column where the cursor currently is: > | 966 Example, to highlight the column where the cursor currently is: > |
967 :exe '/\%' . col(".") . 'c' | 967 :exe '/\%' . col(".") . 'c' |
987 Note that some virtual column positions will never match, because they | 987 Note that some virtual column positions will never match, because they |
988 are halfway through a tab or other character that occupies more than | 988 are halfway through a tab or other character that occupies more than |
989 one screen character. | 989 one screen character. |
990 WARNING: When inserting or deleting text Vim does not automatically | 990 WARNING: When inserting or deleting text Vim does not automatically |
991 update highlighted matches. This means Syntax highlighting quickly | 991 update highlighted matches. This means Syntax highlighting quickly |
992 becomes wrong. Also when refering to the cursor position (".") and | 992 becomes wrong. Also when referring to the cursor position (".") and |
993 the cursor moves the display isn't updated for this change. An update | 993 the cursor moves the display isn't updated for this change. An update |
994 is done when using the |CTRL-L| command (the whole screen is updated). | 994 is done when using the |CTRL-L| command (the whole screen is updated). |
995 Example, to highlight all the characters after virtual column 72: > | 995 Example, to highlight all the characters after virtual column 72: > |
996 /\%>72v.* | 996 /\%>72v.* |
997 < When 'hlsearch' is set and you move the cursor around and make changes | 997 < When 'hlsearch' is set and you move the cursor around and make changes |
1470 criteria: | 1470 criteria: |
1471 - The number of sequentially matching characters. | 1471 - The number of sequentially matching characters. |
1472 - The number of characters (distance) between two consecutive matching | 1472 - The number of characters (distance) between two consecutive matching |
1473 characters. | 1473 characters. |
1474 - Matches at the beginning of a word | 1474 - Matches at the beginning of a word |
1475 - Matches after a camel case character or a path separator or a hyphen. | 1475 - Matches at a camel case character (e.g. Case in CamelCase) |
1476 - Matches after a path separator or a hyphen. | |
1476 - The number of unmatched characters in a string. | 1477 - The number of unmatched characters in a string. |
1477 The matching string with the highest score is returned first. | 1478 The matching string with the highest score is returned first. |
1478 | 1479 |
1479 For example, when you search for the "get pat" string using fuzzy matching, it | 1480 For example, when you search for the "get pat" string using fuzzy matching, it |
1480 will match the strings "GetPattern", "PatternGet", "getPattern", "patGetter", | 1481 will match the strings "GetPattern", "PatternGet", "getPattern", "patGetter", |