ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/perl/matcher
(Generate patch)

Comparing rxvt-unicode/src/perl/matcher (file contents):
Revision 1.19 by sf-exg, Sat Jun 7 20:07:38 2014 UTC vs.
Revision 1.20 by sf-exg, Thu Jun 12 06:03:49 2014 UTC

28C<matcher.pattern.0> resource, and additional patterns can be specified 28C<matcher.pattern.0> resource, and additional patterns can be specified
29with numbered patterns, in a manner similar to the "selection" extension. 29with numbered patterns, in a manner similar to the "selection" extension.
30The launcher can also be overridden on a per-pattern basis. 30The launcher can also be overridden on a per-pattern basis.
31 31
32It is possible to activate the most recently seen match or a list of matches 32It is possible to activate the most recently seen match or a list of matches
33from the keyboard. Simply bind a keysym to "perl:matcher:last" or 33from the keyboard. Simply bind a keysym to "matcher:last" or
34"perl:matcher:list" as seen in the example below. 34"matcher:list" as seen in the example below.
35 35
36Example: load and use the matcher extension with defaults. 36Example: load and use the matcher extension with defaults.
37 37
38 URxvt.perl-ext: default,matcher 38 URxvt.perl-ext: default,matcher
39 39
40Example: use a custom configuration. 40Example: use a custom configuration.
41 41
42 URxvt.url-launcher: sensible-browser 42 URxvt.url-launcher: sensible-browser
43 URxvt.keysym.C-Delete: perl:matcher:last 43 URxvt.keysym.C-Delete: matcher:last
44 URxvt.keysym.M-Delete: perl:matcher:list 44 URxvt.keysym.M-Delete: matcher:list
45 URxvt.matcher.button: 1 45 URxvt.matcher.button: 1
46 URxvt.matcher.pattern.1: \\bwww\\.[\\w-]+\\.[\\w./?&@#-]*[\\w/-] 46 URxvt.matcher.pattern.1: \\bwww\\.[\\w-]+\\.[\\w./?&@#-]*[\\w/-]
47 URxvt.matcher.pattern.2: \\B(/\\S+?):(\\d+)(?=:|$) 47 URxvt.matcher.pattern.2: \\B(/\\S+?):(\\d+)(?=:|$)
48 URxvt.matcher.launcher.2: gvim +$2 $1 48 URxvt.matcher.launcher.2: gvim +$2 $1
49 49
87 $self->most_recent; 87 $self->most_recent;
88 } elsif ($cmd =~ s/^matcher\b//) { 88 } elsif ($cmd =~ s/^matcher\b//) {
89 # for backward compatibility 89 # for backward compatibility
90 $self->most_recent; 90 $self->most_recent;
91 } 91 }
92 }
93
94 ()
95}
96
97sub on_action {
98 my ($self, $action) = @_;
99
100 if ($action eq "list") {
101 $self->matchlist;
102 } elsif ($action eq "last") {
103 $self->most_recent;
92 } 104 }
93 105
94 () 106 ()
95} 107}
96 108

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines