diff options
| author | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-03 22:21:25 +0300 |
|---|---|---|
| committer | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-04 00:23:03 +0300 |
| commit | 2eae5db069dc171f74cd863487655f6a88e5384d (patch) | |
| tree | 2d9d05e09978a2a44acbfbb8d651f240df3ca052 /uvim/runtime/doc/pattern.txt | |
| parent | 473d922faed49241a5d29d9e37dc4819cd512006 (diff) | |
| download | Project-Tick-2eae5db069dc171f74cd863487655f6a88e5384d.tar.gz Project-Tick-2eae5db069dc171f74cd863487655f6a88e5384d.zip | |
NOISSUE rebrand vim to MNV's not Vim
Signed-off-by: Mehmet Samet Duman <yongdohyun@projecttick.org>
Diffstat (limited to 'uvim/runtime/doc/pattern.txt')
| -rw-r--r-- | uvim/runtime/doc/pattern.txt | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/uvim/runtime/doc/pattern.txt b/uvim/runtime/doc/pattern.txt index 18d7a41120..21a351530d 100644 --- a/uvim/runtime/doc/pattern.txt +++ b/uvim/runtime/doc/pattern.txt @@ -1,7 +1,7 @@ -*pattern.txt* For Vim version 9.2. Last change: 2026 Feb 14 +*pattern.txt* For MNV version 9.2. Last change: 2026 Feb 14 - VIM REFERENCE MANUAL by Bram Moolenaar + MNV REFERENCE MANUAL by Bram Moolenaar Patterns and search commands *pattern-searches* @@ -86,7 +86,7 @@ N Repeat the latest "/" or "?" [count] times in # Same as "*", but search backward. The pound sign (character 163) also works. If the "#" key works as backspace, try using "stty erase <BS>" before starting - Vim (<BS> is CTRL-H or a real backspace). + MNV (<BS> is CTRL-H or a real backspace). *gstar* g* Like "*", but don't put "\<" and "\>" around the word. @@ -103,14 +103,14 @@ gd Goto local Declaration. When the cursor is on a local variable, this command will jump to its declaration. This was made to work for C code, in other languages it may not work well. - First Vim searches for the start of the current + First MNV searches for the start of the current function, just like "[[". If it is not found the - search stops in line 1. If it is found, Vim goes back - until a blank line is found. From this position Vim + search stops in line 1. If it is found, MNV goes back + until a blank line is found. From this position MNV searches for the keyword under the cursor, like with "*", but lines that look like a comment are ignored (see 'comments' option). - Note that this is not guaranteed to work, Vim does not + Note that this is not guaranteed to work, MNV does not really check the syntax, it only searches for a match with the keyword. If included files also need to be searched use the commands listed in |include-search|. @@ -136,9 +136,9 @@ gD Goto global Declaration. When the cursor is on a CTRL-C Interrupt current (search) command. Use CTRL-Break on MS-Windows |dos-CTRL-Break|. In Normal mode, any pending command is aborted. - When Vim was started with output redirected and there - are no changed buffers CTRL-C exits Vim. That is to - help users who use "vim file | grep word" and don't + When MNV was started with output redirected and there + are no changed buffers CTRL-C exits MNV. That is to + help users who use "mnv file | grep word" and don't know how to get out (blindly typing :qa<CR> would work). If a popup with a |popup-filter| is open, the popup @@ -165,7 +165,7 @@ the 'hlsearch' option. This can be suspended with the |:nohlsearch| command or auto suspended with nohlsearch plugin. See |nohlsearch-install|. -When 'shortmess' does not include the "S" flag, Vim will automatically show an +When 'shortmess' does not include the "S" flag, MNV will automatically show an index, on which the cursor is. This can look like this: > [1/5] Cursor is on first of 5 matches. @@ -179,13 +179,13 @@ Note: the count does not take offset into account. When no match is found you get the error: *E486* Pattern not found Note that for the `:global` command, when used in legacy script, you get a normal message "Pattern not found", for Vi compatibility. -In |Vim9| script you get E486 for "pattern not found" or *E538* when the pattern +In |MNV9| script you get E486 for "pattern not found" or *E538* when the pattern matches in every line with `:vglobal`. For the |:s| command the "e" flag can be used to avoid the error message |:s_flags|. *search-options* -The following options affect how a search is performed in Vim: +The following options affect how a search is performed in MNV: 'hlsearch' highlight matches 'ignorecase' ignore case when searching 'imsearch' use |IME| when entering the search pattern @@ -273,7 +273,7 @@ the 'hlsearch' option. To clear the last used search pattern: > :let @/ = "" This will not set the pattern to an empty string, because that would match -everywhere. The pattern is really cleared, like when starting Vim. +everywhere. The pattern is really cleared, like when starting MNV. The search usually skips matches that don't move the cursor. Whether the next match is found at the next character or after the skipped match depends on the @@ -288,7 +288,7 @@ When searching backwards, searching starts at the start of the line, using the cursor position is used. In Vi the ":tag" command sets the last search pattern when the tag is searched -for. In Vim this is not done, the previous search pattern is still +for. In MNV this is not done, the previous search pattern is still remembered, unless the 't' flag is present in 'cpoptions'. The search pattern is always put in the search history. @@ -399,12 +399,12 @@ For starters, read chapter 27 of the user manual |usr_27.txt|. */\%#=* *two-engines* *NFA* -Vim includes two regexp engines: +MNV includes two regexp engines: 1. An old, backtracking engine that supports everything. 2. A new, NFA engine that works much faster on some patterns, possibly slower on some patterns. *E1281* -Vim will automatically select the right engine for you. However, if you run +MNV will automatically select the right engine for you. However, if you run into a problem or want to specifically select one engine or the other, you can prepend one of the following to the pattern: @@ -417,7 +417,7 @@ You can also use the 'regexpengine' option to change the default. *E864* *E868* *E874* *E875* *E876* *E877* *E878* If selecting the NFA engine and it runs into something that is not implemented -the pattern will not match. This is only useful when debugging Vim. +the pattern will not match. This is only useful when debugging MNV. ============================================================================== 3. Magic */magic* @@ -461,7 +461,7 @@ after: \v \m \M \V matches ~ \\ \\ \\ \\ literal backslash \{ { { { literal curly brace -{only Vim supports \m, \M, \v and \V} +{only MNV supports \m, \M, \v and \V} If you want to you can make a pattern immune to the 'magic' option being set or not by putting "\m" or "\M" at the start of the pattern. @@ -742,7 +742,7 @@ overview. */\@<=* \@<= Matches with zero width if the preceding atom matches just before what follows. |/zero-width| - Like "(?<=pattern)" in Perl, but Vim allows non-fixed-width patterns. + Like "(?<=pattern)" in Perl, but MNV allows non-fixed-width patterns. Example matches ~ \(an\_s\+\)\@<=file "file" after "an" and white space or an end-of-line @@ -786,7 +786,7 @@ overview. before what follows. Thus this matches if there is no position in the current or previous line where the atom matches such that it ends just before what follows. |/zero-width| - Like "(?<!pattern)" in Perl, but Vim allows non-fixed-width patterns. + Like "(?<!pattern)" in Perl, but MNV allows non-fixed-width patterns. The match with the preceding atom is made to end just before the match with what follows, thus an atom that ends in ".*" will work. Warning: This can be slow (because many positions need to be checked @@ -898,19 +898,19 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on): */\%^* *start-of-file* \%^ Matches start of the file. When matching with a string, matches the start of the string. - For example, to find the first "VIM" in a file: > - /\%^\_.\{-}\zsVIM + For example, to find the first "MNV" in a file: > + /\%^\_.\{-}\zsMNV < */\%$* *end-of-file* \%$ Matches end of the file. When matching with a string, matches the end of the string. - Note that this does NOT find the last "VIM" in a file: > - /VIM\_.\{-}\%$ -< It will find the next VIM, because the part after it will always - match. This one will find the last "VIM" in the file: > - /VIM\ze\(\(VIM\)\@!\_.\)*\%$ -< This uses |/\@!| to ascertain that "VIM" does NOT match in any - position after the first "VIM". + Note that this does NOT find the last "MNV" in a file: > + /MNV\_.\{-}\%$ +< It will find the next MNV, because the part after it will always + match. This one will find the last "MNV" in the file: > + /MNV\ze\(\(MNV\)\@!\_.\)*\%$ +< This uses |/\@!| to ascertain that "MNV" does NOT match in any + position after the first "MNV". Searching from the end of the file backwards is easier! */\%V* @@ -929,7 +929,7 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on): \%# Matches with the cursor position. Only works when matching in a buffer displayed in a window. WARNING: When the cursor is moved after the pattern was used, the - result becomes invalid. Vim doesn't automatically update the matches. + result becomes invalid. MNV doesn't automatically update the matches. This is especially relevant for syntax highlighting and 'hlsearch'. In other words: When the cursor moves the display isn't updated for this change. An update is done for lines which are changed (the whole @@ -949,7 +949,7 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on): is because "\%<'e" matches at the character before the 'e mark, and since it's a |/zero-width| match it doesn't include that character. WARNING: When the mark is moved after the pattern was used, the result - becomes invalid. Vim doesn't automatically update the matches. + becomes invalid. MNV doesn't automatically update the matches. Similar to moving the cursor for "\%#" |/\%#|. */\%l* */\%>l* */\%<l* *E951* *E1204* *E1273* @@ -961,7 +961,7 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on): \%>.l Matches below the cursor line. These six can be used to match specific lines in a buffer. The "23" can be any line number. The first line is 1. - WARNING: When inserting or deleting lines Vim does not automatically + WARNING: When inserting or deleting lines MNV does not automatically update the matches. This means Syntax highlighting quickly becomes wrong. Also when referring to the cursor position (".") and the cursor moves the display isn't updated for this change. An update @@ -984,7 +984,7 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on): The "23" can be any column number. The first column is 1. Actually, the column is the byte number (thus it's not exactly right for multibyte characters). - WARNING: When inserting or deleting text Vim does not automatically + WARNING: When inserting or deleting text MNV does not automatically update the matches. This means Syntax highlighting quickly becomes wrong. Also when referring to the cursor position (".") and the cursor moves the display isn't updated for this change. An update @@ -1013,7 +1013,7 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on): Note that some virtual column positions will never match, because they are halfway through a tab or other character that occupies more than one screen character. - WARNING: When inserting or deleting text Vim does not automatically + WARNING: When inserting or deleting text MNV does not automatically update highlighted matches. This means Syntax highlighting quickly becomes wrong. Also when referring to the cursor position (".") and the cursor moves the display isn't updated for this change. An update @@ -1139,7 +1139,7 @@ x A single character, with no special meaning, matches itself This makes it Vi compatible: Without the "\_" or "\n" the collection does not match an end-of-line. *E769* - When the ']' is not there Vim will not give an error message but + When the ']' is not there MNV will not give an error message but assume no collection is used. Useful to search for '['. However, you do get E769 for internal searching. And be aware that in a `:substitute` command the whole command becomes the pattern. E.g. @@ -1200,9 +1200,9 @@ x A single character, with no special meaning, matches itself The "Func" column shows what library function is used. The implementation depends on the system. Otherwise: - (1) Uses islower() for ASCII and Vim builtin rules for other + (1) Uses islower() for ASCII and MNV builtin rules for other characters. - (2) Uses Vim builtin rules + (2) Uses MNV builtin rules (3) As with (1) but using isupper() */[[=* *[==]* - An equivalence class. This means that characters are matched that @@ -1292,7 +1292,7 @@ letters only. When "\c" appears anywhere in the pattern, the whole pattern is handled like 'ignorecase' is on. The actual value of 'ignorecase' and 'smartcase' is ignored. "\C" does the opposite: Force matching case for the whole pattern. -{only Vim supports \c and \C} +{only MNV supports \c and \C} Note that 'ignorecase', "\c" and "\C" are not used for the character classes. Examples: @@ -1370,11 +1370,11 @@ Suppose B is a base character and x and y are composing characters: ============================================================================== 9. Compare with Perl patterns *perl-patterns* -Vim's regexes are most similar to Perl's, in terms of what you can do. The +MNV's regexes are most similar to Perl's, in terms of what you can do. The difference between them is mostly just notation; here's a summary of where they differ: -Capability in Vimspeak in Perlspeak ~ +Capability in MNVspeak in Perlspeak ~ ---------------------------------------------------------------- force case insensitivity \c (?i) force case sensitivity \C (?-i) @@ -1386,7 +1386,7 @@ conservative quantifiers \{-n,m} *?, +?, ??, {}? 0-width preceding non-match atom\@<! (?<!atom) match without retry atom\@> (?>atom) -Vim and Perl handle newline characters inside a string a bit differently: +MNV and Perl handle newline characters inside a string a bit differently: In Perl, ^ and $ only match at the very beginning and end of the text, by default, but you can set the 'm' flag, which lets them match at @@ -1394,9 +1394,9 @@ embedded newlines as well. You can also set the 's' flag, which causes a . to match newlines as well. (Both these flags can be changed inside a pattern using the same syntax used for the i flag above, BTW.) -On the other hand, Vim's ^ and $ always match at embedded newlines, and +On the other hand, MNV's ^ and $ always match at embedded newlines, and you get two separate atoms, \%^ and \%$, which only match at the very -start and end of the text, respectively. Vim solves the second problem +start and end of the text, respectively. MNV solves the second problem by giving you the \_ "modifier": put it in front of a . or a character class, and they will match newlines as well. @@ -1404,7 +1404,7 @@ Finally, these constructs are unique to Perl: - execution of arbitrary code in the regex: (?{perl code}) - conditional expressions: (?(condition)true-expr|false-expr) -...and these are unique to Vim: +...and these are unique to MNV: - changing the magic-ness of a pattern: \v \V \m \M (very useful for avoiding backslashitis) - sequence of optionally matching atoms: \%[atoms] @@ -1458,8 +1458,8 @@ Finally, these constructs are unique to Perl: 'redrawtime' defines the maximum time searched for pattern matches. - When matching end-of-line and Vim redraws only part of the - display you may get unexpected results. That is because Vim + When matching end-of-line and MNV redraws only part of the + display you may get unexpected results. That is because MNV looks for a match in the line where redrawing starts. Also see |matcharg()| and |getmatches()|. The former returns @@ -1497,7 +1497,7 @@ Finally, these constructs are unique to Perl: there can be three matches active at the same time. The match with the lowest number has priority if several match at the same position. It uses the match id 3. - The ":3match" command is used by (Vim < 9.0.2054) |matchparen| + The ":3match" command is used by (MNV < 9.0.2054) |matchparen| plugin. You are suggested to use ":match" for manual matching and ":2match" for another plugin or even better make use of the more flexible |matchadd()| (and similar) functions instead. @@ -1509,10 +1509,10 @@ Fuzzy matching scores how well a string matches a pattern when the pattern characters appear in order but not necessarily contiguously. Example: > - Pattern: "vim" - Candidates: "vim" -> perfect - "vimeo" -> good (v i m) - "voice mail" -> weaker (v _ i _ _ _ m) + Pattern: "mnv" + Candidates: "mnv" -> perfect + "mnveo" -> good (m n v) + "voice mail" -> weaker (m _ n _ _ _ v) "vintage" -> no match (no "m") < If the search string has multiple words, each word is matched separately and @@ -1523,7 +1523,7 @@ may appear in any order in the candidate. For example "get pat" matches The 'ignorecase' and 'smartcase' options do not apply, case is ignored if the pattern is all lower case. -Vim's implementation is based on the algorithm from the fzy project: +MNV's implementation is based on the algorithm from the fzy project: https://github.com/jhawthorn/fzy It uses dynamic programming to compute an optimal score for a given pattern @@ -1541,7 +1541,7 @@ The algorithm works in two stages: Start from the best-scoring end position and step back to find match positions, ensuring the alignment is optimal. -Vim extends the original algorithm to support multibyte codepoints, allowing +MNV extends the original algorithm to support multibyte codepoints, allowing correct matching for UTF-8 and other encodings. Time complexity is O(pattern * candidate). Memory usage is proportional @@ -1551,10 +1551,10 @@ The |matchfuzzy()| and |matchfuzzypos()| functions perform fuzzy searching in a List of strings. |matchfuzzy()| returns the matching strings, while |matchfuzzypos()| returns the matches along with their positions and scores. -The "f" flag of `:vimgrep` enables fuzzy matching. +The "f" flag of `:mnvgrep` enables fuzzy matching. To enable fuzzy matching for |ins-completion|, add "fuzzy" to the 'completeopt' option. For |cmdline-completion|, add "fuzzy" to the 'wildoptions' option. - vim:tw=78:ts=8:noet:ft=help:norl: + mnv:tw=78:ts=8:noet:ft=help:norl: |
