From: root Date: Thu, 12 Jan 2006 12:05:28 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=01f761448a17c23a318d4bfa98329e1e4ef9d028;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/src/urxvt.pm b/src/urxvt.pm index 04b95caa..33000c18 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -50,7 +50,25 @@ C<--quoting-style=shell>. A double-click usually selects the word under the cursor, further clicks 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: =over 4 @@ -88,9 +106,27 @@ was started, while C or C stay at the current position and additionally stores the first match in the current line into the primary selection. -=item digital-clock +=item 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 C +operator) that modify C<$_> as resources: + + URxvt.selection-autotransform.0: transform + URxvt.selection-autotransform.1: transform + ... + +For example, the following will transform selections of the form +C into C: + + URxvt.selection-autotransform.0: s/^(S+):(d+):?$/vi +$2 $1\\x0d/ + +And this example matches the same,but replaces it with vi-commands you can +paste directory into your (vi :) editor: + + URxvt.selection-autotransform.0: s/^(S+):(d+):?$/\\x1b:e $1\\x0d:$2\\x0d/ =item mark-urls @@ -105,6 +141,10 @@ A not very useful example of filtering all text output to the terminal, by replacing all line-drawing characters (U+2500 .. U+259F) by a similar-looking ascii character. +=item digital-clock + +Displays a digital clock using the built-in overlay. + =item example-refresh-hooks Displays a very simple digital clock in the upper right corner of the