]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/explainpat/README

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

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.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

use artesanal colour scheme
[etc/vim.git] / .vim / bundle / explainpat / README
1 This is a mirror of http://www.vim.org/scripts/script.php?script_id=4364
2
3 :ExplainPattern {pattern}               or
4 :ExplainPattern {register}
5
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.
9
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
14
15
16 Example:  :ExplainPattern *
17
18 Register: *
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
27   |   | \|         OR branch
28   |   |   %          literal string (1 atom(s))
29   |   |   [dxouU[(^$V#<>] collection
30   |   |   \=         (multi) zero or one of the preceding atom
31   |   | \|         OR branch
32   |   |   z          literal string (1 atom(s))
33   |   |   [1-9se(]   collection
34   |   | \|         OR branch
35   |   |   @          literal string (1 atom(s))
36   |   |   [>=!]      collection
37   |   | \|         OR branch
38   |   |   _          literal string (1 atom(s))
39   |   |   [[^$.]     collection
40   |   |   \=         (multi) zero or one of the preceding atom
41   |   | \|         OR branch
42   |   |   .          match any character
43   |   \)         end of group
44   | \|         OR branch
45   |   .          match any character
46   \)         end of group
47
48 2013 Jan 17