ExplainPattern : Give detailed help on a given regexp pattern.
script karma |
Rating 13/7,
Downloaded by 2277 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Andy Wokula |
|
script type |
utility |
|
description |
Continued here: https://github.com/Houl/ExplainPattern-vim (2017 Aug 06)
:ExplainPattern {pattern} or
:ExplainPattern {register}
parse the given Vim {pattern} and print a line of help
(with color) for each found pattern item. Nested
items get extra indent.
A single-char argument is used as {register} argument:
/ explain the last search pattern
* explain pattern from the clipboard
a explain pattern from register a
Example: :ExplainPattern *
Register: *
Pattern: \C^\%(\\\%(@<.\|%[dxouU[(^$V#<>]\=\|z[1-9se(]\|@[>=!]\|_[[^$.]\=\|.\)\|.\)
\C match case while matching the pattern
^ match at start of line (or string)
\%( start of non-capturing group
| \\ literal string (1 atom(s))
| \%( start of non-capturing group
| | @< literal string (2 atom(s))
| | . match any character
| | \| OR branch
| | % literal string (1 atom(s))
| | [dxouU[(^$V#<>] collection
| | \= (multi) zero or one of the preceding atom
| | \| OR branch
| | z literal string (1 atom(s))
| | [1-9se(] collection
| | \| OR branch
| | @ literal string (1 atom(s))
| | [>=!] collection
| | \| OR branch
| | _ literal string (1 atom(s))
| | [[^$.] collection
| | \= (multi) zero or one of the preceding atom
| | \| OR branch
| | . match any character
| \) end of group
| \| OR branch
| . match any character
\) end of group
2013 Jan 17 |
|
install details |
This is a vimball archive, edit it in vim, do :so % , then restart. |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 142.132.191.50
|