Some checks failed
Detach Plugins / check (FlyGrep.vim) (push) Has been cancelled
Detach Plugins / check (GitHub.vim) (push) Has been cancelled
Detach Plugins / check (JavaUnit.vim) (push) Has been cancelled
Detach Plugins / check (SourceCounter.vim) (push) Has been cancelled
Detach Plugins / check (cpicker.nvim) (push) Has been cancelled
Detach Plugins / check (dein-ui.vim) (push) Has been cancelled
Detach Plugins / check (git.vim) (push) Has been cancelled
Detach Plugins / check (iedit.vim) (push) Has been cancelled
Detach Plugins / check (scrollbar.vim) (push) Has been cancelled
Detach Plugins / check (vim-chat) (push) Has been cancelled
Detach Plugins / check (vim-cheat) (push) Has been cancelled
Detach Plugins / check (vim-todo) (push) Has been cancelled
Detach Plugins / check (xmake.vim) (push) Has been cancelled
test / Linux (nvim, nightly) (push) Has been cancelled
test / Linux (nvim, v0.3.8) (push) Has been cancelled
test / Linux (nvim, v0.4.0) (push) Has been cancelled
test / Linux (nvim, v0.4.2) (push) Has been cancelled
test / Linux (nvim, v0.4.3) (push) Has been cancelled
test / Linux (nvim, v0.4.4) (push) Has been cancelled
test / Linux (nvim, v0.5.0) (push) Has been cancelled
test / Linux (nvim, v0.5.1) (push) Has been cancelled
test / Linux (nvim, v0.6.0) (push) Has been cancelled
test / Linux (nvim, v0.6.1) (push) Has been cancelled
test / Linux (nvim, v0.7.0) (push) Has been cancelled
test / Linux (nvim, v0.7.2) (push) Has been cancelled
test / Linux (nvim, v0.8.0) (push) Has been cancelled
test / Linux (nvim, v0.8.1) (push) Has been cancelled
test / Linux (nvim, v0.8.2) (push) Has been cancelled
test / Linux (nvim, v0.8.3) (push) Has been cancelled
test / Linux (nvim, v0.9.0) (push) Has been cancelled
test / Linux (nvim, v0.9.1) (push) Has been cancelled
test / Linux (true, vim, v7.4.052) (push) Has been cancelled
test / Linux (true, vim, v7.4.1689) (push) Has been cancelled
test / Linux (true, vim, v7.4.629) (push) Has been cancelled
test / Linux (true, vim, v8.0.0027) (push) Has been cancelled
test / Linux (true, vim, v8.0.0183) (push) Has been cancelled
test / Linux (vim, nightly) (push) Has been cancelled
test / Linux (vim, v8.0.0184) (push) Has been cancelled
test / Linux (vim, v8.0.1453) (push) Has been cancelled
test / Linux (vim, v8.1.2269) (push) Has been cancelled
test / Linux (vim, v8.2.2434) (push) Has been cancelled
test / Linux (vim, v8.2.3995) (push) Has been cancelled
test / Windows (nvim, nightly) (push) Has been cancelled
test / Windows (nvim, v0.3.8) (push) Has been cancelled
test / Windows (nvim, v0.4.2) (push) Has been cancelled
test / Windows (nvim, v0.4.3) (push) Has been cancelled
test / Windows (nvim, v0.4.4) (push) Has been cancelled
test / Windows (nvim, v0.5.0) (push) Has been cancelled
test / Windows (nvim, v0.5.1) (push) Has been cancelled
test / Windows (nvim, v0.6.0) (push) Has been cancelled
test / Windows (nvim, v0.6.1) (push) Has been cancelled
test / Windows (nvim, v0.7.0) (push) Has been cancelled
test / Windows (nvim, v0.7.2) (push) Has been cancelled
test / Windows (nvim, v0.8.0) (push) Has been cancelled
test / Windows (nvim, v0.8.1) (push) Has been cancelled
test / Windows (nvim, v0.8.2) (push) Has been cancelled
test / Windows (nvim, v0.8.3) (push) Has been cancelled
test / Windows (nvim, v0.9.0) (push) Has been cancelled
test / Windows (nvim, v0.9.1) (push) Has been cancelled
test / Windows (vim, nightly) (push) Has been cancelled
test / Windows (vim, v7.4.1185) (push) Has been cancelled
test / Windows (vim, v7.4.1689) (push) Has been cancelled
test / Windows (vim, v8.0.0027) (push) Has been cancelled
test / Windows (vim, v8.0.1453) (push) Has been cancelled
test / Windows (vim, v8.1.2269) (push) Has been cancelled
test / Windows (vim, v8.2.2434) (push) Has been cancelled
test / Windows (vim, v8.2.3995) (push) Has been cancelled
docker / docker (push) Has been cancelled
mirror / check (coding) (push) Has been cancelled
mirror / check (gitee) (push) Has been cancelled
mirror / check (gitlab) (push) Has been cancelled
130 lines
5.1 KiB
Plaintext
130 lines
5.1 KiB
Plaintext
*vimregstyle.txt* Extended regular expressions & pattern library
|
||
|
||
|
||
VIM REFERENCE MANUAL by Barry Arthur
|
||
|
||
|
||
Help on using vimregstyle *vimregstyle*
|
||
|
||
1. Introduction |vimregstyle-intro|
|
||
2. Functions |vimregstyle-functions|
|
||
3. Patterns |vimregstyle-patterns|
|
||
4. External Resources |vimregstyle-resources|
|
||
|
||
==============================================================================
|
||
1. INTRODUCTION *vimregstyle-intro*
|
||
|
||
VimRegStyle is a Regular Expression Pattern Library and suite of
|
||
utilities for operating on matches within text.
|
||
|
||
==============================================================================
|
||
2. FUNCTIONS *vimregstyle-functions*
|
||
|
||
VimRegStyle maintains an internal library of named patterns. This section
|
||
details the public interface for that library.
|
||
|
||
*vimregstyle-set*
|
||
vrs#set({name}, {flavour}, {pattern})
|
||
|
||
Used to add new patterns to the library. {flavour} should be either 'vim' or
|
||
'pcre'. There is a single namespace per {flavour} for all VimRegStyle patterns
|
||
and attempting to add a pattern with a name that already exists in the library
|
||
will generate an error message like:
|
||
|
||
*Error* VRS: A pattern of that flavour (vim) already exists under "ip4".
|
||
|
||
NOTE: Casual users will almost never use the |vrs#set()| function. The better
|
||
way to add patterns is through additions to the |vrs-files|. See
|
||
|vimregstyle-contribute| for contributing patterns back to the library.
|
||
|
||
*vimregstyle-get*
|
||
vrs#get({name}[, {flavour}='vim')
|
||
|
||
Get the pattern for the given {name} and {flavour} (defaulting to 'vim').
|
||
|
||
|
||
*vimregstyle-match*
|
||
vrs#match({string}, {named-pattern} [, {start}[, {count}]])
|
||
|
||
Replica of builtin |match()| function.
|
||
|
||
*vimregstyle-matchend*
|
||
vrs#matchend({string}, {named-pattern} [, {start}[, {count}]])
|
||
|
||
Replica of builtin |matchend()| function.
|
||
|
||
*vimregstyle-matches*
|
||
vrs#matches({string}, {named-pattern} [, {start}[, {count}]])
|
||
|
||
Predicate returning true if {string} contains {named-pattern} anywhere within
|
||
it. Anchoring to the start and end of the {string} will only occur if the
|
||
{named-pattern} specifically includes the associated anchors. Use
|
||
|vrs#exactly()| to force an anchored match.
|
||
|
||
*vimregstyle-exactly*
|
||
vrs#exactly({string}, {named-pattern} [, {start}[, {count}]])
|
||
|
||
Predicate returning true if {string} exactly matches {named-pattern}. Use
|
||
|vrs#matches()| to check if the {string} contains the {named-pattern} anywhere
|
||
within the {string}.
|
||
|
||
|
||
==============================================================================
|
||
*vrs-files*
|
||
3. PATTERNS *vimregstyle-patterns*
|
||
|
||
The patterns are stored in {*.vrs} files within the plugin's
|
||
{/patterns/} directory. The {.vrs} files have the following format:
|
||
|
||
name flavour pattern ~
|
||
|
||
Where:~
|
||
|
||
* {name} contains no whitespace and must not be preceded by whitespace
|
||
* {flavour} can be {vim} or {pcre}
|
||
* {pattern} is not delimited — use a bare regex
|
||
|
||
The patterns are further enhanced in that they:
|
||
|
||
* Accept PCRE style multiline, whitespace insensitive syntax. All multiline
|
||
patterns must commence on the line below the named entry and must be
|
||
indented with whitespace.
|
||
|
||
* Accept a new regex atom: \%{name,count,separator} providing pattern
|
||
composition by inline-expanding the {name}d pattern at the current point in
|
||
the regex optionally {count} times, each one separated by {separator} (which
|
||
is a multicharacter string literal, not using regular syntax).
|
||
|
||
Example:~
|
||
|
||
Assuming the VRS library had a pattern called <_ip4_segment>
|
||
that represented a single 0-255 chunk, an <ip4> regex could then be written
|
||
using this composition atom as:
|
||
>
|
||
ip4 vim \<\%{_ip4_segment,4,.}>
|
||
<
|
||
Which would concatenate four copies of the <_ip4_segment> partial pattern,
|
||
each separated by the literal string '.'.
|
||
|
||
------------------------------------------------------------------------------
|
||
*vimregstyle-contribute*
|
||
Pattern contributors can submit additional patterns to VimRegStyle through
|
||
pull requests on the main Github repository:
|
||
https://github.com/Raimondi/VimRegStyle
|
||
|
||
Please ensure that all patterns are accompanied with tests. VimRegStyle uses
|
||
the runVimTests (https://github.com/vim-scripts/runVimTests) unit testing
|
||
framework.
|
||
|
||
*TODO* Allow user-crafted patterns in a nominal directory (defaulting
|
||
to ~/.vim/patterns/ ?)
|
||
|
||
==============================================================================
|
||
4. EXTERNAL RESOURCES *vimregstyle-resources*
|
||
|
||
* http://www.regexlib.com/
|
||
* http://www.programmersheaven.com/2/Regex
|
||
* http://www.asiteaboutnothing.net/regex/
|
||
|
||
vim:tw=78:ts=8:ft=help:norl:
|