1urxvt-selection-autotransform(1) RXVT-UNICODE urxvt-selection-autotransform(1)
2
3
4

NAME

6       selection-autotransform - automatically transform select text
7

DESCRIPTION

9       This selection allows you to do automatic transforms on a selection
10       whenever a selection is made.
11
12       It works by specifying perl snippets (most useful is a single "s///"
13       operator) that modify $_ as resources:
14
15          URxvt.selection-autotransform.0: transform
16          URxvt.selection-autotransform.1: transform
17          ...
18
19       For example, the following will transform selections of the form
20       "filename:number", often seen in compiler messages, into "vi +$filename
21       $word":
22
23          URxvt.selection-autotransform.0: s/^([^:[:space:]]+):(\\d+):?$/vi +$2 \\Q$1\\E\\x0d/
24
25       And this example matches the same,but replaces it with vi-commands you
26       can paste directly into your (vi :) editor:
27
28          URxvt.selection-autotransform.0: s/^([^:[:space:]]+(\\d+):?$/:e \\Q$1\\E\\x0d:$2\\x0d/
29
30       Of course, this can be modified to suit your needs and your editor :)
31
32       To expand the example above to typical perl error messages ("XXX at
33       FILENAME line YYY."), you need a slightly more elaborate solution:
34
35          URxvt.selection.pattern-0: ( at .*? line \\d+[,.])
36          URxvt.selection-autotransform.0: s/^ at (.*?) line (\\d+)[,.]$/:e \\Q$1\E\\x0d:$2\\x0d/
37
38       The first line tells the selection code to treat the unchanging part of
39       every error message as a selection pattern, and the second line
40       transforms the message into vi commands to load the file.
41
42
43
449.30                              2022-01-22  urxvt-selection-autotransform(1)
Impressum