All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 This is a mirror of http://www.vim.org/scripts/script.php?script_id=4364
3 :ExplainPattern {pattern} or
4 :ExplainPattern {register}
6 parse the given Vim {pattern} and print a line of help
7 (with color) for each found pattern item. Nested
8 items get extra indent.
10 A single-char argument is used as {register} argument:
11 / explain the last search pattern
12 * explain pattern from the clipboard
13 a explain pattern from register a
16 Example: :ExplainPattern *
19 Pattern: \C^\%(\\\%(@<.\|%[dxouU[(^$V#<>]\=\|z[1-9se(]\|@[>=!]\|_[[^$.]\=\|.\)\|.\)
20 \C match case while matching the pattern
21 ^ match at start of line (or string)
22 \%( start of non-capturing group
23 | \\ literal string (1 atom(s))
24 | \%( start of non-capturing group
25 | | @< literal string (2 atom(s))
26 | | . match any character
28 | | % literal string (1 atom(s))
29 | | [dxouU[(^$V#<>] collection
30 | | \= (multi) zero or one of the preceding atom
32 | | z literal string (1 atom(s))
33 | | [1-9se(] collection
35 | | @ literal string (1 atom(s))
38 | | _ literal string (1 atom(s))
40 | | \= (multi) zero or one of the preceding atom
42 | | . match any character
45 | . match any character