]> git.madduck.net Git - etc/vim.git/blob - doc/explainpat.txt

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:

e38bc62631975f3be794d0f2f1e1a5c87e4c40ed
[etc/vim.git] / doc / explainpat.txt
1 *explainpat.txt*    Give detailed help on a regexp pattern.
2
3                     For Vim version 7.0.  Last change: 2012 Dec 19
4                     By Andy Wokula <anwoku@yahoo.de>
5
6                                                 *explainpat* *explainpat.vim*
7 When you want to inspect a given Vim regexp pattern, this script might save
8 you lots of help lookups.  And it will make the structure of a regexp visible.
9 And it helps spotting mistakes.
10
11 If you find that it explains something wrong, drop me an email.
12
13 ==============================================================================
14                                                 *:ExplainPattern*
15 :ExplainPattern [{pattern} | {register}]
16                         parse the given Vim {pattern} and print a line of help
17                         (with color) for each found pattern item.  Nested
18                         items get extra indent.
19
20                         A single-char argument is used as {register} argument:
21                                 /       explain the last search pattern
22                                 *       explain pattern from the clipboard
23                                 a       explain pattern from register a
24
25 Notes:
26 The pattern is first converted into a purely magic pattern using
27 |nwo#magic#MakeMagic()|.  This means that embedded |\V| |\M| |\m| |\V|
28 specifiers are effectively removed from the explanation.
29
30 :ExplainPattern also accepts some invalid patterns: >
31         :ExplainPattern \)
32         Pattern: \)
33         \)         end of group
34
35 ==============================================================================
36 vim:tw=78:fo=tcq2:sts=0:ts=8:sw=8:fdm=marker:fmr=^_\^,^\^:ft=help: