--- rxvt-unicode/doc/rxvtperl.3.html 2006/01/12 05:37:34 1.25 +++ rxvt-unicode/doc/rxvtperl.3.html 2006/01/12 12:10:06 1.26 @@ -97,7 +97,32 @@ will enlarge the selection.

-

It also offers the following bindable keyboard command:

+

The selection works by trying to match a number of regexes and displaying +them in increasing order of length. You can add your own regexes by +specifying resources of the form:

+
+
+
+   URxvt.selection.pattern-0: perl-regex
+   URxvt.selection.pattern-1: perl-regex
+   ...
+
+
+

The index number (0, 1...) must not have any holes, and each regex must +contain at least one pair of capturing parentheses, which will be used for +the match. For example, the followign adds a regex that matches everything +between two vertical bars:

+
+
+
+   URxvt.selection.pattern-0: \\|([^|]+)\\|
+
+
+

You can look at the source of the selection extension to see more +interesting uses, such as parsing a line from beginning to end.

+
+
+

This extension also offers the following bindable keyboard command:

rot13
@@ -143,10 +168,38 @@ selection.

-
digital-clock
+
selection-autotransform
-Displays a digital clock using the built-in overlay. +This selection allows you to do automatic transforms on a selection +whenever a selection is made. +
+
+

It works by specifying perl snippets (most useful is a single s/// +operator) that modify $_ as resources:

+
+
+
+   URxvt.selection-autotransform.0: transform
+   URxvt.selection-autotransform.1: transform
+   ...
+
+
+

For example, the following will transform selections of the form +filename:number, often seen in compiler messages, into vi +$filename +$word:

+
+
+
+   URxvt.selection-autotransform.0: s/^(\\S+):(\\d+):?$/vi +$2 \\Q$1\\E\\x0d/
+
+
+

And this example matches the same,but replaces it with vi-commands you can +paste directly into your (vi :) editor:

+
+
+
+   URxvt.selection-autotransform.0: s/^(S+):(d+):?$/\\x1b:e \\Q$1\\E\\x0d:$2\\x0d/

mark-urls
@@ -166,6 +219,12 @@ similar-looking ascii character.

+
digital-clock
+
+
+Displays a digital clock using the built-in overlay. +
+

example-refresh-hooks