RegexExplainTip
SublimeText 3 plugin for displaying regular expression explanations
Details
Installs
- Total 3K
- Win 2K
- Mac 984
- Linux 599
Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | Feb 12 | Feb 11 | Feb 10 | Feb 9 | Feb 8 | Feb 7 | Feb 6 | Feb 5 | Feb 4 | Feb 3 | Feb 2 | Feb 1 | Jan 31 | Jan 30 | Jan 29 | Jan 28 | Jan 27 | Jan 26 | Jan 25 | Jan 24 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 2 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 2 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
SublimeRegexExplainTip
SublimeText 3 plugin for displaying regular expression explanations
What it looks like
Why?
As some regular expressions are write-only code, it's sometimes useful to obtain a description of what a particular regex actually does. Having it available in a text editor can be an asset.
Installation
Install via Package Control.
Alternatively, clone this repository to Packages
directory.
How to use
Press Shift+Super+Alt+R to display the explanation of selected text. Currently, a region must be explicitly selected.
Customization
It is possible to use custom CSS files. You can define the CSS file in settings file (navigate to Preferences
-> Package Settings
-> RegexExplainTip
-> Settings - User
) under css_file
key:
{
"css_file": "Packages/User/my-custom.css"
}
You should locate the file somewhere under Packages
(Preferences
-> Browse Packages...
) directory.
Dependencies
The plugin uses YAPE::Regex::Explain to obtain the regex explanation.
Therefore, Perl with YAPE::Regex::Explain
module installed is required.
Caveats
As this plugin relies on external Perl installation and modules, one must have correct environment setup.
This includes proper value if Perl's @INC
variable, which allows Perl to find required modules.
This directory depends on you environment settings, OS, CPAN configuration and so on.
For example, you might need to define the paths in PERL5LIB
variable:
export PERL5LIB=/some/perl/installation/directory/lib
.
Alternatively, one may add the following line to Perl code declared in get_explanation
method:
use lib 'c:/StrawberryPERL/perl/site/lib';