RegexExplainTip
SublimeText 3 plugin for displaying regular expression explanations
Details
Installs
- Total 3K
- Win 2K
- Mac 986
- Linux 599
May 6 | May 5 | May 4 | May 3 | May 2 | May 1 | Apr 30 | Apr 29 | Apr 28 | Apr 27 | Apr 26 | Apr 25 | Apr 24 | Apr 23 | Apr 22 | Apr 21 | Apr 20 | Apr 19 | Apr 18 | Apr 17 | Apr 16 | Apr 15 | Apr 14 | Apr 13 | Apr 12 | Apr 11 | Apr 10 | Apr 9 | Apr 8 | Apr 7 | Apr 6 | Apr 5 | Apr 4 | Apr 3 | Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | Mar 24 | Mar 23 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 1 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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';